fetch_mcp_doc
Retrieve complete MCP documentation content from URLs to access full specifications, API references, tutorials, and configuration instructions when search snippets are insufficient.
Instructions
Fetch full document content by URL.
Retrieves complete MCP or FastMCP documentation content from URLs found via search_mcp_docs or provided directly. Use this to get full documentation pages including:
Complete protocol specifications
Detailed API reference documentation
Full tutorial and example code
Configuration and deployment instructions
This provides the full content when search snippets aren't sufficient for understanding or implementing MCP features.
Args: uri: Document URI (supports http/https URLs)
Returns: Dictionary containing: - url: Canonical document URL - title: Document title - content: Full document text content - error: Error message (if fetch failed)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | Yes |
Input Schema (JSON Schema)
Implementation Reference
- The handler function implementing the fetch_mcp_doc tool. It fetches the full content of an MCP documentation page by URI using the cache, returning structured data with URL, title, content, or an error.def fetch_mcp_doc(uri: str) -> dict[str, Any]: """Fetch full document content by URL. Retrieves complete MCP or FastMCP documentation content from URLs found via search_mcp_docs or provided directly. Use this to get full documentation pages including: - Complete protocol specifications - Detailed API reference documentation - Full tutorial and example code - Configuration and deployment instructions This provides the full content when search snippets aren't sufficient for understanding or implementing MCP features. Args: uri: Document URI (supports http/https URLs) Returns: Dictionary containing: - url: Canonical document URL - title: Document title - content: Full document text content - error: Error message (if fetch failed) """ cache.ensure_ready() page = cache.ensure_page(uri) if page is None: return {"error": "fetch failed", "url": uri} return { "url": page.url, "title": page.title, "content": page.content, }
- src/mcp_server_builder/server.py:14-16 (registration)Registration of the fetch_mcp_doc tool (and search_mcp_docs) using the FastMCP @tool() decorator in the main server file.# Register tools mcp.tool()(docs.search_mcp_docs) mcp.tool()(docs.fetch_mcp_doc)