docs(tutorials): fix MCPToolset reference links and remote server example#62
docs(tutorials): fix MCPToolset reference links and remote server example#62Adam-D-Lewis wants to merge 2 commits into
Conversation
…mple Point the MCPToolset reference links at the proper API anchor instead of the generic client guide page, and expand the remote MCP server snippet to show the full toolsets config block.
pmeier
left a comment
There was a problem hiding this comment.
Linking to the correct objects in our or external API references is completely automated by mkdocstrings. Please just use this syntax across the whole tutorial
|
|
||
| # %% [markdown] | ||
| # Second, an MCP server. pydantic-ai connects to one with [`MCPToolset`](https://ai.pydantic.dev/mcp/client/), and | ||
| # Second, an MCP server. pydantic-ai connects to one with [`MCPToolset`](https://ai.pydantic.dev/api/mcp/#pydantic_ai.mcp.MCPToolset), and |
There was a problem hiding this comment.
Why not link that as Python ref?
| # Second, an MCP server. pydantic-ai connects to one with [`MCPToolset`](https://ai.pydantic.dev/api/mcp/#pydantic_ai.mcp.MCPToolset), and | |
| # Second, an MCP server. pydantic-ai connects to one with [pydantic_ai.mcp.MCPToolset][], and |
| # [configuration import mechanism](../../references/config/#plugins) resolves nested `cls_or_fn`/`params` definitions | ||
| # recursively, so we declare the whole agent tree — model, wrapper, the in-process `tools`, and the MCP `toolsets` — | ||
| # as a single config block. [`MCPToolset`](https://ai.pydantic.dev/mcp/client/) takes the path to a script and | ||
| # as a single config block. [`MCPToolset`](https://ai.pydantic.dev/api/mcp/#pydantic_ai.mcp.MCPToolset) takes the path to a script and |
…I links Replace the hardcoded ai.pydantic.dev API URLs with autoref cross-reference syntax so the links resolve against pydantic-ai's published inventory instead of rotting when upstream docs move. Addresses review feedback on #62. MCPToolset and TestModel use the [full.path][] form (matching the house style in config.md / authentication.py); RunContext keeps the short code-span form since it is embedded in the RunContext[User] and RunContext.deps expressions.
|
Thanks @pmeier — done. All the hardcoded One small deviation: I kept Verified locally with |
Follow-up to #59 — these small fixes to the agent tutorial were inadvertently left out before that PR merged.
MCPToolsetreference links at the proper API anchor (https://ai.pydantic.dev/api/mcp/#pydantic_ai.mcp.MCPToolset) instead of the generic client guide page.toolsetsconfig block, matching the rest of the tutorial.