Skip to content

Conversation

@agents-git-bot
Copy link
Contributor

@agents-git-bot agents-git-bot bot commented Nov 21, 2025

Summary

This PR syncs documentation changes from cloudflare/agents PR #659.

Changes

Updates all MCP server documentation examples to use the new registerTool API from @modelcontextprotocol/sdk v1.22.0.

Breaking API Change:

  • Old API: server.tool(name, description, schema, handler)
  • New API: server.registerTool(name, { description, inputSchema }, handler)

The new API improves clarity by explicitly separating the tool description and input schema into a configuration object.

Files Updated

  • src/content/docs/agents/model-context-protocol/mcp-agent-api.mdx - Updated McpAgent examples
  • src/content/docs/agents/model-context-protocol/tools.mdx - Updated tool registration examples
  • src/content/docs/agents/model-context-protocol/mcp-handler-api.mdx - Updated handler examples
  • src/content/docs/agents/model-context-protocol/authorization.mdx - Updated authorization examples
  • src/content/docs/agents/x402.mdx - Updated x402 MCP examples

Testing

All code examples have been verified against the source changes in the original PR.


🤖 Generated with Claude Code

Source PR: cloudflare/agents#659

@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

This updates all MCP server examples to use the new registerTool API from @modelcontextprotocol/sdk v1.22.0, which introduces a breaking change to the tool registration syntax.

Changes:
- Replace server.tool() with server.registerTool()
- Update tool registration to use object-based configuration with description and inputSchema properties
- Update examples across all MCP-related documentation pages

The new API improves clarity by explicitly separating the tool description and input schema into a configuration object.

Synced from cloudflare/agents PR #659

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

Co-Authored-By: Claude <noreply@anthropic.com>
@agents-git-bot agents-git-bot bot changed the title update dependencies Sync docs: update dependencies Nov 25, 2025
@mattzcarey mattzcarey closed this Dec 3, 2025
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.

6 participants