Rebasely Beta: data may be purged

examples/MCP-tools Public

YAML · 22 lines · 1.6 KiB · at dae155a

title: An agent calling a tooldescription: >-  A model asks for the time in Tokyo. Its MCP client connects, lists the tools and calls  time_in_zone. Every message is its own POST to /mcp, answered by a fresh server.actors: [agent, mcp-client]steps:  - { from: agent, to: mcp-client, label: "needs the current time in Tokyo" }  - { from: mcp-client, to: mcp-server, label: "POST /mcp: initialize" }  - { from: mcp-server, to: mcp-client, label: server info and the tools capability }  - { from: mcp-client, to: mcp-server, label: "POST /mcp: tools/list" }  - { from: mcp-server, to: tools, label: "read each tool's name, description and schemas" }  - { from: mcp-server, to: mcp-client, label: three tools with JSON Schema inputs and outputs }  - { from: agent, to: mcp-client, label: "call time_in_zone with zone tokyo" }  - { from: mcp-client, to: mcp-server, label: "POST /mcp: tools/call time_in_zone" }  - { from: mcp-server, to: mcp-sdk, label: check the arguments against the input schema }  - { from: mcp-server, to: rate-limiter, label: "take a token from this client's bucket" }  - { from: rate-limiter, to: mcp-server, label: "allowed, 29 tokens left" }  - { from: mcp-server, to: tools, label: "run it: resolve tokyo to Asia/Tokyo, read the offset" }  - { from: tools, to: mcp-server, label: "local time, or a ToolError saying what to fix" }  - { from: mcp-server, to: mcp-client, label: "structuredContent and JSON text, isError on failure" }  - { from: mcp-server, to: usage, label: "count the call for today, after the response" }  - { from: mcp-client, to: agent, label: the result as a tool message }