fetch_mcp_doc
Retrieve complete documentation content from MCP protocol and FastMCP framework URLs to access full specifications, tutorials, and API references when search snippets are insufficient.
Instructions
Fetch full document content by URL from MCP protocol or FastMCP framework docs.
Retrieves complete documentation content from URLs found via search_mcp_docs or provided directly. Works with both documentation sources:
Supported domains:
modelcontextprotocol.io - Official MCP protocol specification
gofastmcp.com - FastMCP Python framework documentation
Use this to get full documentation pages when search snippets aren't sufficient, including:
Complete protocol specifications and API references
Full tutorial and example code
Configuration, authentication, and deployment instructions
Args: uri: Document URI (http/https URLs from supported domains)
Returns: Dictionary containing: - url: Canonical document URL - title: Document title - content: Full document text content - source: Documentation source ("mcp" or "fastmcp") - error: Error message (only present if fetch failed)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | Yes |
Implementation Reference
- The handler function that fetches the full content of an MCP or FastMCP documentation page by URI, using the cache system. Includes comprehensive docstring defining input (uri: str) and output schema.def fetch_mcp_doc(uri: str) -> dict[str, Any]: """Fetch full document content by URL from MCP protocol or FastMCP framework docs. Retrieves complete documentation content from URLs found via search_mcp_docs or provided directly. Works with both documentation sources: **Supported domains:** - modelcontextprotocol.io - Official MCP protocol specification - gofastmcp.com - FastMCP Python framework documentation Use this to get full documentation pages when search snippets aren't sufficient, including: - Complete protocol specifications and API references - Full tutorial and example code - Configuration, authentication, and deployment instructions Args: uri: Document URI (http/https URLs from supported domains) Returns: Dictionary containing: - url: Canonical document URL - title: Document title - content: Full document text content - source: Documentation source ("mcp" or "fastmcp") - error: Error message (only present if fetch failed) """ cache.ensure_ready() page = cache.ensure_page(uri) if page is None: return {"error": "fetch failed", "url": uri, "source": _get_source_from_url(uri)} return { "url": page.url, "title": page.title, "content": page.content, "source": _get_source_from_url(page.url), }
- src/mcp_server_builder/server.py:16-16 (registration)Registers the fetch_mcp_doc tool with the FastMCP server using the mcp.tool() decorator/factory.mcp.tool()(docs.fetch_mcp_doc)