Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
uriYes

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), }
  • Registers the fetch_mcp_doc tool with the FastMCP server using the mcp.tool() decorator/factory.
    mcp.tool()(docs.fetch_mcp_doc)
Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/praveenc/mcp-server-builder'

If you have feedback or need assistance with the MCP directory API, please join our Discord server