Skip to content

Commit cb8010d

Browse files
committed
Scaffold out a few more things
1 parent 1b68329 commit cb8010d

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/content/docs/agents/model-context-protocol/mcp-client.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,9 @@ sidebar:
66
---
77

88
import { Render } from "~/components";
9+
10+
WIP
11+
12+
- Explain use cases for Agent as an MCP Client, and the connection to this and using MCP Servers to provide tools
13+
- Show example of using the Agents SDK to call an MCP Server
14+
- Explain how this gets translated into the format of tools that people are used to from ai-sdk and from agents-sdk

src/content/docs/agents/model-context-protocol/mcp-server/tools.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,15 @@ In this example, the `add` method is decorated with the `@mcp.tool` decorator, w
3939
:::note
4040
Because decorators are a [Stage 3 TC39 proposed addition to the JavaScript language](https://github.com/tc39/proposal-decorators), to use decorators in your code, and to use the Cloudflare MCP Server SDK, you must use Wrangler v4.0.0 or later, or [`@cloudflare/vite-plugin`](https://www.npmjs.com/package/@cloudflare/vite-plugin). This ensures that decorators in your code are automatically transpiled into code that the [Cloudflare Workers runtime](/workers/reference/how-workers-works/) can understand.
4141
:::
42+
43+
### How it works
44+
45+
WIP
46+
47+
- Explain what is functionally happening here with decorators
48+
- You add JSDOC to `@mcp.tool` to describe the tool
49+
- The MCP Server SDK parses the JSDOC to extract the tool's description, input parameters, and return type
50+
- The MCP Server SDK then uses the tool's description, input parameters, and return type to serialize and deserialize the tool's input and output
51+
- The MCP Server SDK then uses the serialized input and output to call the tool
52+
53+
- Show the equivalent before/after using the raw @modelcontextprotocol/typescript-sdk — and ideally move this up to the top so that the reader "gets it" — maybe use tabs?

0 commit comments

Comments
 (0)