Skip to main content
Glama
OpenGerwin

mcp-google-agent-platform-docs

by OpenGerwin

get_doc

Fetch full documentation page content from Google Agent Platform or Vertex AI docs. Provide the page path and optional source to get complete markdown content, retrieved live if not cached.

Instructions

Get full content of a specific documentation page.

Args: path: Documentation page path, e.g.: GEAP paths: - "models/gemini/3-1-pro" - "build/runtime/quickstart" - "scale/memory-bank/setup" - "govern/policies/overview" - "optimize/evaluation/agent-evaluation" - "agent-studio/overview" Vertex AI paths: - "multimodal/function-calling" - "rag-engine/rag-overview" - "models/gemini/2-5-flash" source: "geap" (default) or "vertex-ai"

Returns: Complete page content in Markdown format. If not cached, fetches live from the documentation site.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
sourceNogeap

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The get_doc MCP tool handler: takes a documentation page path and optional source, fetches the page content (from cache or live) and returns it as Markdown. It's decorated with @mcp.tool() which registers it as an MCP tool named 'get_doc'.
    @mcp.tool()
    async def get_doc(path: str, source: str = "geap") -> str:
        """Get full content of a specific documentation page.
    
        Args:
            path: Documentation page path, e.g.:
                  GEAP paths:
                    - "models/gemini/3-1-pro"
                    - "build/runtime/quickstart"
                    - "scale/memory-bank/setup"
                    - "govern/policies/overview"
                    - "optimize/evaluation/agent-evaluation"
                    - "agent-studio/overview"
                  Vertex AI paths:
                    - "multimodal/function-calling"
                    - "rag-engine/rag-overview"
                    - "models/gemini/2-5-flash"
            source: "geap" (default) or "vertex-ai"
    
        Returns:
            Complete page content in Markdown format.
            If not cached, fetches live from the documentation site.
        """
        await _ensure_initialized()
    
        src = _get_source(source)
        if not src:
            available = ", ".join(_sources.keys())
            return f"❌ Unknown source '{source}'. Available: {available}"
    
        content = await _get_or_fetch_page(src, path)
    
        if content:
            return content
    
        return (
            f"❌ Page not found: `{path}` (source: {source})\n\n"
            f"Try using `search_docs()` to find the correct path, "
            f"or `list_sections()` to browse available documentation."
        )
  • The @mcp.tool() decorator registers the get_doc function as an MCP tool with the FastMCP server instance, making it callable by name 'get_doc'.
    @mcp.tool()
    async def get_doc(path: str, source: str = "geap") -> str:
  • Helper function used by get_doc: implements cache-first with live-fetch fallback strategy. Checks cache freshness, fetches via PageFetcher if stale/missing, saves to cache, and updates search index.
    async def _get_or_fetch_page(source: Source, path: str) -> str | None:
        """Get a page from cache, or fetch and cache it."""
        # Check cache
        cached = _cache.get_page(source, path)
        if cached and not _cache.is_stale(cached):
            return cached.content
    
        # Fetch live
        fetcher = PageFetcher(source)
        content = await fetcher.fetch_page(path)
    
        if content:
            _cache.save_page(source, path, content)
            # Update search index with new content
            _search.build_index({path: content}, source.id)
            return content
    
        # Fallback to stale cache
        if cached:
            logger.info("Using stale cache for %s/%s", source.id, path)
            return cached.content
    
        return None
  • Helper function used by get_doc: resolves a source ID string to a Source object, returning None if unknown.
    def _get_source(source_id: str) -> Source | None:
        """Get a source by ID, defaulting to config.DEFAULT_SOURCE."""
        if source_id in _sources:
            return _sources[source_id]
        logger.warning("Unknown source: %s", source_id)
        return None
Behavior2/5

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

With no annotations provided, the description carries the full burden. It mentions caching behavior and return format, but fails to disclose authentication requirements, rate limits, error handling, or what happens with invalid paths.

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

Conciseness4/5

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

The description is concise and well-structured with a clear purpose sentence followed by Args/Returns. The examples are useful and do not feel excessive. Every sentence contributes to understanding.

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

Completeness4/5

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

For a simple retrieval tool with two parameters and an output schema (implied), the description covers key aspects: purpose, parameters with examples, caching behavior, and return format. It is largely complete given the tool's complexity, though missing error state details.

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

Parameters3/5

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

Schema coverage is 0%, so the description must compensate. It adds value by providing concrete path examples and explaining the source parameter's allowed values ('geap' or 'vertex-ai'). However, it doesn't clarify the exact format required for paths beyond examples.

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 'Get full content of a specific documentation page', using a specific verb and resource. It distinguishes from sibling tools like list_models, list_sections, and search_docs by focusing on a single page's full content.

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

Usage Guidelines4/5

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

The description provides context by listing example paths for different sources and explaining the source parameter. It implicitly guides when to use this tool versus alternatives, but lacks explicit 'when not to use' instructions or direct comparisons.

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/OpenGerwin/mcp-google-agent-platform-docs'

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