[[tool]] name = "add_task" description = "Adds a new task to your todo list." input_parameters = [ { name = "task_description", type = "string", description = "The task to add to your todo list." } ]
[[prompt]] name = "plan_daily_tasks" description = "Plans the day by breaking down a user goal into actionable tasks." input_parameters = [ { name = "user_goal", type = "string", description = "The user's goal for the day." } ] template = """Based on the user's goal: '{user_goal}', generate 2-3 specific, actionable tasks that would help the user achieve it. For each task, call the `add_task` tool with a helpful task description."""
Calendar MCP Server
[[tool]] name = "schedule_event" description = "Schedules an event in your calendar." input_parameters = [ { name = "task_description", type = "string", description = "The task or event to be scheduled." }, { name = "time", type = "string", description = "The time when the event should be scheduled (e.g., '2pm today')." } ]
[[prompt]] name = "schedule_todo_task" description = "Schedules a task from the todo list into your calendar." input_parameters = [ { name = "task_description", type = "string", description = "The task to schedule." } ] template = """The user wants to schedule the task: '{task_description}'. Suggest a good time for today and call the `schedule_event` tool to add it to the calendar."""
好的,现在想象你有一个聊天机器人,可以访问这些 MCP 服务器提供的上下文。当用户提供一个高级目标,例如“我今天想专注于深度工作”时,MCP 客户端会协调一个模块化的、多服务器的工作流程来满足请求。它将用户消息与来自所有连接的 MCP 服务器的工具元数据和提示指令打包在一起,并将其发送到 LLM。LLM 首先从 Todo Server 中选择一个高级规划工具plan_daily_tasks,该工具返回一个提示,指示 LLM 使用add_task将目标分解为可操作的任务。