API Reference¶
Config reference¶
Generated from 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:
- Default:
[]- Registered by:
-
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:
- Default:
{}- Registered by:
-
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:
- Default:
''- Registered by:
-
fastmcp_model_classes¶fastmcp_model_classes¶
Iterable of model class names within
fastmcp_model_moduleto autodoc. Empty default skips model rendering entirely.- Type:
- Default:
()- Registered by:
-
fastmcp_section_badge_map¶fastmcp_section_badge_map¶
Mapping of docstring section heading (e.g.
"Inspect") to the badge it renders with, either"term"or"axis:term"naming a term declared infastmcp_axes. Drives the inline section pills next to grouped tool lists.- Type:
- Default:
{}- Registered by:
-
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:
- Default:
()- Registered by:
-
fastmcp_axes¶fastmcp_axes¶
Independent ways of classifying a tool, each rendering its own badge. Every entry is a mapping with
"name", an optional"source"("tags","annotations"or"meta:<key>") and"terms". A term is a tag name or a mapping with"term"and optional"label"/"tooltip"/"icon"/"tone"/"style"/"fill"/"classes". Empty declares no axes. A tool matching no term on an axis renders no badge for it rather than being reported as the lowest term.- Type:
- Default:
()- Registered by:
-
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:
- Default:
'register'- Registered by:
-
fastmcp_server_module¶fastmcp_server_module¶
"pkg.module:attribute"path to a liveFastMCPinstance. When set, the collector walks the server’s providers – mounted servers, aggregates and the transforms each applies – so docs enumerate the same surface the server serves: tools, prompts, resources and resource templates. Tools read this way take precedence overfastmcp_tool_modules.- Type:
- Default:
''- Registered by:
Directive and role reference¶
Generated from add_directive() and
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:
- 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 one axis.
- Python path:
sphinx_autodoc_fastmcp._directives.FastMCPToolSummaryDirective- Required arguments:
0- Optional arguments:
1- Final argument whitespace:
False- Has content:
False
-
.. fastmcp-prompt::¶.. fastmcp-prompt::¶
Autodocument one MCP prompt: section + card body.
Options:
- Python path:
- 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).
Options:
- Python path:
- 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).
Options:
- Python path:
sphinx_autodoc_fastmcp._directives.FastMCPResourceTemplateDirective- Required arguments:
1- Optional arguments:
0- Final argument whitespace:
False- Has content:
True