Skip to main content

Sphinx extension for documenting FastMCP tools (cards, badges, cross-refs)

Project description

sphinx-autodoc-fastmcp

Sphinx extension that documents FastMCP tools with card-style section entries built from the shared api-* layout regions, plus safety badges, parameter tables, and cross-reference roles.

The shipped output intentionally keeps a section wrapper for stable ToC labels and :tool: / :toolref: behavior, but the inner card, badges, and type rendering now come from sphinx_ux_autodoc_layout, sphinx_ux_badges, and sphinx_autodoc_typehints_gp.

Features

  • fastmcp-tool: Renders a tool entry as a section card with shared api-header / api-content regions plus a section target for ToC and {ref} labels.
  • fastmcp-tool-input: Parameter table for a tool (place after prose in MyST).
  • fastmcp-tool-summary: Summary tables grouped by safety tier.
  • Roles: :tool:, :toolref:, :toolicon / :tooliconl / :tooliconr / :tooliconil / :tooliconir:, :badge:

Configuration

In conf.py after sphinx_autodoc_fastmcp is listed in extensions:

fastmcp_tool_modules = [
    "myproject.tools.server_tools",
    "myproject.tools.session_tools",
]
fastmcp_area_map = {
    "server_tools": "sessions",
    "session_tools": "sessions",
}
fastmcp_model_module = "myproject.models"
fastmcp_model_classes = {"SessionInfo", "WindowInfo"}
fastmcp_section_badge_map = {"Inspect": "readonly", "Act": "mutating", "Destroy": "destructive"}
fastmcp_section_badge_pages = {"tools/index", "index"}
fastmcp_collector_mode = "register"  # or "introspect"

See the package docstrings and sphinx_autodoc_fastmcp.setup() for defaults.

Dependencies

  • Python 3.10+
  • Sphinx 8.1+
  • sphinx-ux-badges, sphinx-ux-autodoc-layout, and sphinx-autodoc-typehints-gp are declared dependencies and installed automatically with this package.

sphinx_autodoc_fastmcp automatically registers sphinx_ux_badges, sphinx_ux_autodoc_layout, and sphinx_autodoc_typehints_gp via app.setup_extension(). You do not need to add them separately to your extensions list.

Documentation

See the full documentation for directive options, role reference, and live tool card demos.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx_autodoc_fastmcp-0.0.1a16.dev1.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file sphinx_autodoc_fastmcp-0.0.1a16.dev1.tar.gz.

File metadata

File hashes

Hashes for sphinx_autodoc_fastmcp-0.0.1a16.dev1.tar.gz
Algorithm Hash digest
SHA256 d49a6580aad32ee9a2430d63f9ef2c6b19ae1acef655699dd0d9a7e30e94fa3b
MD5 eb9fefafd9649aa9e5bd91c5aa6625a8
BLAKE2b-256 c7b996535aae0a0046cad5feafdded3de948e62d6f508752a2e15e4280617931

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_autodoc_fastmcp-0.0.1a16.dev1.tar.gz:

Publisher: release.yml on git-pull/gp-sphinx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sphinx_autodoc_fastmcp-0.0.1a16.dev1-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_autodoc_fastmcp-0.0.1a16.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 ba9a41230b01c68f6bfe7070c02908641f40aa9fda9b56c2d65518a716071bcf
MD5 440364c8f0ec713553d8cf9d2416e49d
BLAKE2b-256 6b9b4bc9d1977cf721d31802d27ce312f40c9a3229ed6ee2d6bf10c6ad77fc4f

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_autodoc_fastmcp-0.0.1a16.dev1-py3-none-any.whl:

Publisher: release.yml on git-pull/gp-sphinx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page