Skip to main content
Glama
python-docs-mcp-server

python-docs-mcp-server

get_docs

Read-onlyIdempotent

Retrieve official Python standard library documentation pages or specific sections by slug and anchor, with version selection and pagination to keep responses compact.

Instructions

Retrieve a documentation page or specific section. Provide anchor for section-only retrieval (much cheaper). Pagination via start_index.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "slug": "<slug>"
    },
    "name": "get_docs"
  }
}

Input Schema

NameRequiredDescriptionDefault
slugYesPage slug from a search_docs hit, e.g. 'library/asyncio-task' ('.html' suffix accepted)
anchorNoSection anchor for section-only retrieval
versionNoPython version (e.g. '3.13'). Defaults to latest.
max_charsNoMaximum characters to return
start_indexNoStart position for pagination

Output Schema

NameRequiredDescriptionDefault
slugYesPage slug
titleYesPage or section title
anchorNoSection anchor if section-level
contentYesDocumentation content in markdown
versionYesPython version
truncatedNoWhether content was truncated
char_countYesTotal character count of full content
next_start_indexNoNext start_index for pagination, if truncated

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.1
    • changedInput schema / properties / slug / description
      Previous value: -"Page slug (e.g. 'library/asyncio-task.html')"New value: +"Page slug from a search_docs hit, e.g. 'library/asyncio-task' ('.html' suffix accepted)"
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and non-destructive behavior, so the bar is lower. The description adds real operational context: section-only retrieval is materially cheaper and results are paginated via start_index, which matters for an agent managing context budget.

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?

Three short sentences with zero filler; the primary retrieval action is front-loaded and the cost tradeoff plus pagination mechanism follow immediately.

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?

With full schema coverage, annotations, and an output schema that covers return values, the description supplies everything needed to call correctly. Minor remaining gap: nothing about behavior on an unknown slug or anchor.

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?

Schema coverage is 100%, so baseline is 3, but the description adds semantic meaning beyond the schema by framing anchor retrieval as a cheaper mode and start_index as the pagination control. The slug-to-search_docs relationship lives in the schema rather than the description, keeping it from a 5.

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

Purpose4/5

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

States a specific verb ('Retrieve') and resource ('documentation page or specific section'), which clearly distinguishes it from search_docs and lookup_package_docs. It stops short of explicitly naming those siblings as alternatives, so it lands just below the top mark.

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?

Gives actionable guidance: supply an anchor for section-only retrieval because it is 'much cheaper', and use start_index for pagination. It does not state when to prefer this over lookup_package_docs or compare_versions, so there is no explicit routing between siblings.

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