Skip to main content
Glama

GroundDocs

Official
by GroundDocs

python_get_documentation

Retrieve Python library documentation with a natural language query. Specify library, version, and number of results to access consolidated, up-to-date reference material in one call.

Instructions

Primary Python documentation lookup tool. Use this for every Python documentation-related query.

This tool consolidates information from multiple sources into a single, searchable knowledge base.
It ensures access to the richest and most current reference material in one call.

Args:
    query: A natural language question (e.g., "How do I define a Deployment?").
    library: Python library to search documentation for.
    version: Optional Library version (e.g., "4.46.1"). Defaults to detected library version if not specified.
    top_k: Optional number of top matching documents to return. Defaults to 10.

Returns:
    A list of dictionaries, each containing document path and corresponding content.

Example Usage:
    # Search Python docs for Transformers
    python_get_documentation(query="what is a transformers mlm token", library="transformers", version="4.46.1")

Notes:
    - This tool automatically loads or builds a RAG (Retrieval-Augmented Generation) index for the
      specified version.
    - If an index is not found locally, the tool will fetch and index the documentation before responding.
    - You should call this function for any question that needs project documentation context.

Input Schema

NameRequiredDescriptionDefault
libraryYesPython library to search documentation for.
queryYesA natural language question (e.g., "How do I use transformers?").
top_kNoOptional number of top matching documents to return. Defaults to 10.
versionNoOptional Library version (e.g., "4.46.1"). Defaults to detected library version if not specified.

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "library": { "description": "Python library to search documentation for.", "type": "string" }, "query": { "description": "A natural language question (e.g., \"How do I use transformers?\").", "type": "string" }, "top_k": { "default": 10, "description": "Optional number of top matching documents to return. Defaults to 10.", "type": "number" }, "version": { "description": "Optional Library version (e.g., \"4.46.1\"). Defaults to detected library version if not specified.", "type": "string" } }, "required": [ "query", "library" ], "type": "object" }

Other Tools from GroundDocs

Related Tools

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/GroundDocs/grounddocs'

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