Skip to content

Conversation

@agents-git-bot
Copy link

Summary

This PR syncs documentation updates from cloudflare/agents PR #659 (cloudflare/agents#659).

Changes

Updated MCP tool registration API documentation to reflect the breaking change in @modelcontextprotocol/sdk v1.22.0:

Old API:

server.tool(name, description, schema, handler)

New API:

server.registerTool(name, { description, inputSchema }, handler)

Updated Files

  • model-context-protocol/mcp-agent-api.mdx - Updated basic and stateful examples
  • model-context-protocol/tools.mdx - Updated tool registration example
  • model-context-protocol/authorization.mdx - Updated auth context and permission examples
  • model-context-protocol/mcp-handler-api.mdx - Updated stateless and authenticated examples
  • x402.mdx - Updated free tool registration (paid tools unchanged)

Source PR

🤖 Generated with Claude Code

This sync updates the documentation to reflect the breaking API change
in @modelcontextprotocol/sdk v1.22.0, which changed tool registration
from:
  server.tool(name, description, schema, handler)
to:
  server.registerTool(name, { description, inputSchema }, handler)

Updated files:
- model-context-protocol/mcp-agent-api.mdx
- model-context-protocol/tools.mdx
- model-context-protocol/authorization.mdx
- model-context-protocol/mcp-handler-api.mdx
- x402.mdx

Synced from cloudflare/agents PR #659
cloudflare/agents#659

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions bot added product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. size/m labels Nov 21, 2025
@github-actions
Copy link
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/agents/ @irvinebroque, @rita3ko, @elithrar, @thomasgauvin, @threepointone, @cloudflare/pcx-technical-writing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants