get_docs
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
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Page slug from a search_docs hit, e.g. 'library/asyncio-task' ('.html' suffix accepted) | |
| anchor | No | Section anchor for section-only retrieval | |
| version | No | Python version (e.g. '3.13'). Defaults to latest. | |
| max_chars | No | Maximum characters to return | |
| start_index | No | Start position for pagination |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Page slug | |
| title | Yes | Page or section title | |
| anchor | No | Section anchor if section-level | |
| content | Yes | Documentation content in markdown | |
| version | Yes | Python version | |
| truncated | No | Whether content was truncated | |
| char_count | Yes | Total character count of full content | |
| next_start_index | No | Next start_index for pagination, if truncated |