Module

docs.tools

MCP tool definitions for AI agent access to documentation.

Three tools expose theDocsCollectionto agents:

  • search_docs(query)— keyword search across all pages
  • get_doc(slug)— retrieve a specific page by slug
  • list_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).

Functions

make_search_docs 1
Create a ``search_docs`` tool function bound to the collection.
def make_search_docs(holder: _CollectionHolder)
Parameters
Name Type Description
holder _CollectionHolder
make_get_doc 1
Create a ``get_doc`` tool function bound to the collection.
def make_get_doc(holder: _CollectionHolder)
Parameters
Name Type Description
holder _CollectionHolder
make_list_docs 1
Create a ``list_docs`` tool function bound to the collection.
def make_list_docs(holder: _CollectionHolder)
Parameters
Name Type Description
holder _CollectionHolder