API Reference¶
Config reference¶
Generated from app.add_config_value() registrations in
sphinx_autodoc_fastmcp/__init__.py.
-
fastmcp_tool_modules¶fastmcp_tool_modules¶
Dotted module paths whose
register(server)hooks expose FastMCP tools to autodoc. Each module is imported once atbuilder-initedand its tools are added to the rendered reference.- Type:
list- Default:
[]- Registered by:
sphinx_autodoc_fastmcp.setup()
-
fastmcp_area_map¶fastmcp_area_map¶
Mapping of tool-module suffix (e.g.
"session_tools") to the docs area page that owns its tools (e.g."sessions"). Drives cross-reference resolution and the area badge in card layouts.- Type:
dict- Default:
{}- Registered by:
sphinx_autodoc_fastmcp.setup()
-
fastmcp_model_module¶fastmcp_model_module¶
Dotted module containing the Pydantic model classes referenced by tool return types. Used to resolve
{fastmcp-model}cross-references.- Type:
str- Default:
''- Registered by:
sphinx_autodoc_fastmcp.setup()
-
fastmcp_model_classes¶fastmcp_model_classes¶
Iterable of model class names within
fastmcp_model_moduleto autodoc. Empty default skips model rendering entirely.- Type:
tuple- Default:
()- Registered by:
sphinx_autodoc_fastmcp.setup()
-
fastmcp_section_badge_map¶fastmcp_section_badge_map¶
Mapping of docstring section heading (e.g.
"Inspect") to the safety badge it should render with (e.g."readonly","mutating","destructive"). Drives the inline section pills next to grouped tool lists.- Type:
dict- Default:
{}- Registered by:
sphinx_autodoc_fastmcp.setup()
-
fastmcp_section_badge_pages¶fastmcp_section_badge_pages¶
Iterable of docnames where
fastmcp_section_badge_mapshould be applied. Pages outside this list render plain section headings.- Type:
tuple- Default:
()- Registered by:
sphinx_autodoc_fastmcp.setup()
-
fastmcp_collector_mode¶fastmcp_collector_mode¶
How tools are gathered from each
fastmcp_tool_modulesentry."register"calls the module’sregister(server)hook (the FastMCP convention);"introspect"walks module attributes for@server.tool-decorated callables.- Type:
str- Default:
'register'- Registered by:
sphinx_autodoc_fastmcp.setup()
-
fastmcp_server_module¶fastmcp_server_module¶
"pkg.module:attribute"path to a liveFastMCPinstance. When set, the prompt / resource collector readslocal_provider._componentsdirectly so docs enumerate the same surface as the running server.- Type:
str- Default:
''- Registered by:
sphinx_autodoc_fastmcp.setup()
Directive and role reference¶
Generated from app.add_directive() and app.add_role() registrations in
sphinx_autodoc_fastmcp/__init__.py
via sphinx-autodoc-docutils.
-
.. fastmcp-tool::¶.. fastmcp-tool::¶
Autodocument one MCP tool: section (ToC/labels) + card body.
Options:
- Python path:
sphinx_autodoc_fastmcp._directives.FastMCPToolDirective- Required arguments:
1- Optional arguments:
0- Final argument whitespace:
False- Has content:
True
-
.. fastmcp-tool-input::¶.. fastmcp-tool-input::¶
Emit the parameter table for a tool.
- Python path:
sphinx_autodoc_fastmcp._directives.FastMCPToolInputDirective- Required arguments:
1- Optional arguments:
0- Final argument whitespace:
False- Has content:
False
-
.. fastmcp-tool-summary::¶.. fastmcp-tool-summary::¶
Summary tables of tools grouped by safety tier.
- Python path:
sphinx_autodoc_fastmcp._directives.FastMCPToolSummaryDirective- Required arguments:
0- Optional arguments:
0- Final argument whitespace:
False- Has content:
False
-
.. fastmcp-prompt::¶.. fastmcp-prompt::¶
Autodocument one MCP prompt: section + card body.
- Python path:
sphinx_autodoc_fastmcp._directives.FastMCPPromptDirective- Required arguments:
1- Optional arguments:
0- Final argument whitespace:
False- Has content:
True
-
.. fastmcp-prompt-input::¶.. fastmcp-prompt-input::¶
Emit the argument table for a prompt.
- Python path:
sphinx_autodoc_fastmcp._directives.FastMCPPromptInputDirective- Required arguments:
1- Optional arguments:
0- Final argument whitespace:
False- Has content:
False
-
.. fastmcp-resource::¶.. fastmcp-resource::¶
Autodocument one MCP resource (fixed URI).
- Python path:
sphinx_autodoc_fastmcp._directives.FastMCPResourceDirective- Required arguments:
1- Optional arguments:
0- Final argument whitespace:
False- Has content:
True
-
.. fastmcp-resource-template::¶.. fastmcp-resource-template::¶
Autodocument one MCP resource template (parameterised URI).
- Python path:
sphinx_autodoc_fastmcp._directives.FastMCPResourceTemplateDirective- Required arguments:
1- Optional arguments:
0- Final argument whitespace:
False- Has content:
True
-
:tool:¶:tool:¶
Role
:tool:`name`→ link + badge (resolved later).- Python path:
sphinx_autodoc_fastmcp._roles._tool_role
-
:toolref:¶:toolref:¶
Role
:toolref:`name`→ link without badge.- Python path:
sphinx_autodoc_fastmcp._roles._toolref_role
-
:toolicon:¶:toolicon:¶
Autodocumented role callable.
- Python path:
sphinx_autodoc_fastmcp._roles.role_fn
-
:tooliconl:¶:tooliconl:¶
Autodocumented role callable.
- Python path:
sphinx_autodoc_fastmcp._roles.role_fn
-
:tooliconr:¶:tooliconr:¶
Autodocumented role callable.
- Python path:
sphinx_autodoc_fastmcp._roles.role_fn
-
:tooliconil:¶:tooliconil:¶
Autodocumented role callable.
- Python path:
sphinx_autodoc_fastmcp._roles.role_fn