Raxol. Headless. DocsResource
(Raxol v2.8.0)
View Source
Exposes the Raxol documentation tree as MCP resources under raxol://docs/....
An agent connected to mix mcp.server can pull Raxol's own docs mid-task
(resources/read on raxol://docs/features/AGENT_FRAMEWORK.md, and so on),
because doc-serving is just another registry surface alongside the headless
tools. Neither a static llms.txt nor a hosted docs site can do this.
Docs are read from the repo docs/ tree, located relative to the working
directory. When no docs/ tree is present (a Hex-installed library rather
than a checkout), no resources are registered and this is a no-op.
Summary
Functions
Register the docs resources with the MCP registry. Safe to call when
raxol_mcp is unavailable or no docs/ tree is found: returns :ok.
opts go to Raxol.MCP.Registry.register_resources/3 (owner: pid).
Build the resource definitions from a docs/ root, without registering.
Functions
@spec register(GenServer.server(), keyword()) :: :ok
Register the docs resources with the MCP registry. Safe to call when
raxol_mcp is unavailable or no docs/ tree is found: returns :ok.
opts go to Raxol.MCP.Registry.register_resources/3 (owner: pid).
Build the resource definitions from a docs/ root, without registering.