Skip to content

docs(design): FastMCP native registration investigation (#209)#250

Merged
bokelley merged 1 commit intomainfrom
bokelley/209-mcp-native-design
Apr 21, 2026
Merged

docs(design): FastMCP native registration investigation (#209)#250
bokelley merged 1 commit intomainfrom
bokelley/209-mcp-native-design

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

Summary

  • Investigation for mcp: investigate FastMCP native Pydantic-typed tool registration to delete generation layer #209. Recommendation: stay with the current generation layer.
  • FastMCP native @tool() with a pydantic-typed param nests args under the param name; AdCP needs request fields flat at the tool-argument level. No unwrap option in FastMCP.
  • Full writeup at docs/design/mcp-native-registration.md — covers wire-shape mismatch, behavior that would need reimplementation (_inline_refs, additionalProperties: true, MRO-walk filtering, per-instance handler binding), startup-cost comparison, and re-open triggers.
  • Notes two smaller follow-up wins that are not native migrations: consolidating ADCP_TOOL_DEFINITIONS + _tool_to_request into one declarative table, and dropping unused hand-crafted inputSchema stubs.

Closes #209.

Test plan

  • Doc-only change; no code modified. Review the writeup for accuracy of the FastMCP source-level claims and the recommendation.

🤖 Generated with Claude Code

Recommendation: stay with generation layer. FastMCP native path cannot
produce the flat tool-arg surface AdCP requires without rebuilding the
generation logic at registration time. Writeup documents the wire-shape
mismatch, behavior that would need reimplementation, and re-open triggers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bokelley bokelley merged commit d32694f into main Apr 21, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mcp: investigate FastMCP native Pydantic-typed tool registration to delete generation layer

1 participant