Skip to main content
Glama
praveenc
by praveenc

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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)
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses behavioral traits such as supported domains, error handling ('error message if fetch failed'), and return structure, though it lacks details on rate limits, authentication needs, or potential side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, usage, args, returns), uses bullet points efficiently, and every sentence adds value without redundancy, making it easy to scan and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity, lack of annotations, and presence of an output schema, the description is complete: it covers purpose, usage, parameters, return values, error handling, and sibling relationships, providing all necessary context for an AI agent to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage for the single parameter 'uri', the description fully compensates by explaining its semantics ('Document URI from supported domains'), providing examples of valid URLs, and linking it to the sibling tool, adding significant value beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('fetch full document content') and resources ('from MCP protocol or FastMCP framework docs'), distinguishing it from its sibling 'search_mcp_docs' by emphasizing retrieval of complete content rather than search functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidance is provided on when to use this tool ('when search snippets aren't sufficient') and references the sibling tool 'search_mcp_docs' as a source for URLs, with clear domains and use cases listed, including complete specifications, tutorials, and configuration instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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