MCP tool definitions for AI agent access to documentation.
Three tools expose theDocsCollectionto agents:
search_docs(query)— keyword search across all pagesget_doc(slug)— retrieve a specific page by sluglist_docs(category?)— list pages, optionally filtered by category
All tools return raw markdown (not HTML) in thecontentfield —
more useful for LLM consumption.
These functions are factories that close over a_CollectionHolder
so they see the live collection (including autodoc pages merged at
startup).
docs.tools
| Name | Type | Default | Description |
|---|---|---|---|
type
|
|
— | |
qualified_name
|
|
— | |
element_type
|
|
— | |
description
|
|
— | |
source_file
|
|
— | |
line_number
|
|
— | |
is_autodoc
|
|
— | |
autodoc_element
|
|
— | |
_autodoc_template
|
|
— | |
_autodoc_url_path
|
|
— | |
_autodoc_page_type
|
|
— | |
title
|
|
— | |
doc_content_hash
|
|
— |
Symbols on this page
make_search_docs
function
def make_search_docs(holder: _CollectionHolder)
Create asearch_docstool function bound to the collection.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
holder
|
_CollectionHolder
|
— |
make_get_doc
function
def make_get_doc(holder: _CollectionHolder)
Create aget_doctool function bound to the collection.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
holder
|
_CollectionHolder
|
— |
make_list_docs
function
def make_list_docs(holder: _CollectionHolder)
Create alist_docstool function bound to the collection.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
holder
|
_CollectionHolder
|
— |
View source · /home/runner/work/chirp/chirp/site/../src/chirp/docs/tools.py:1