Skip to main content
Glama
Melbourneandrew

docs2prompt MCP Server

get_docs2prompt_docs

Retrieves documentation from a specified GitHub repository to generate prompts for LLMs.

Instructions

Use this tool to get the documentation from a GitHub repository.

Args:
    github_repo: The GitHub repository to get the documentation for.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
github_repoYes

Implementation Reference

  • The handler function for the 'get_docs2prompt_docs' tool. It extracts the owner/repo from a GitHub URL or accepts a direct 'owner/repo' string, calls get_github_documentation from the docs2prompt library, and returns the result truncated to 10000 characters.
    @mcp.tool()
    async def get_docs2prompt_docs(github_repo: str):
        """
        Use this tool to get the documentation from a GitHub repository.
    
        Args:
            github_repo: The GitHub repository to get the documentation for.
        """
    
        if "github.com/" in github_repo:
            parts = github_repo.split("github.com/")[1].split("/")
            github_repo = f"{parts[0]}/{parts[1]}"
        
        github_token = os.getenv("GITHUB_TOKEN", None)     
        result = get_github_documentation(github_repo, github_token)
        # Limit for longest possible response needs to be explored
        # Asking for https://github.com/browser-use/browser-use seems to crash the server
    
        return result[:10000] if result else result
  • The tool definition and input schema: the @mcp.tool() decorator registers the tool, and the function signature defines the only required parameter 'github_repo' as a string.
    async def get_docs2prompt_docs(github_repo: str):
        """
        Use this tool to get the documentation from a GitHub repository.
    
        Args:
            github_repo: The GitHub repository to get the documentation for.
        """
  • src/main.py:7-7 (registration)
    Registration of the tool via the @mcp.tool() decorator on the FastMCP instance.
    @mcp.tool()
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It only describes a read operation but lacks details on rate limits, output format, or 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 two sentences, front-loaded with the purpose, and every word is useful with no redundancy.

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

Completeness2/5

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

Given the lack of output schema and annotations, the description fails to specify what the tool returns, leaving the agent without crucial context for a tool that fetches documentation.

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

Parameters4/5

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

The description adds meaning to the 'github_repo' parameter beyond the schema, explaining it is the repository to fetch documentation from. Since schema coverage is 0%, this provides necessary context.

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 verb 'get' and resource 'documentation from a GitHub repository', distinguishing it from the sibling 'get_url_docs' which likely targets URLs.

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?

It explicitly says when to use (to get documentation from a GitHub repo), but does not mention when not to use or provide comparisons with the sibling tool.

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/Melbourneandrew/docs2prompt-mcp'

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