120 lines
8.5 KiB
JSON
120 lines
8.5 KiB
JSON
{
|
|
"module": "docforge.cli.mcp_utils",
|
|
"content": {
|
|
"path": "docforge.cli.mcp_utils",
|
|
"docstring": null,
|
|
"objects": {
|
|
"Path": {
|
|
"name": "Path",
|
|
"kind": "alias",
|
|
"path": "docforge.cli.mcp_utils.Path",
|
|
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
|
"docstring": null
|
|
},
|
|
"click": {
|
|
"name": "click",
|
|
"kind": "alias",
|
|
"path": "docforge.cli.mcp_utils.click",
|
|
"signature": "<bound method Alias.signature of Alias('click', 'click')>",
|
|
"docstring": null
|
|
},
|
|
"GriffeLoader": {
|
|
"name": "GriffeLoader",
|
|
"kind": "class",
|
|
"path": "docforge.cli.mcp_utils.GriffeLoader",
|
|
"signature": "<bound method Alias.signature of Alias('GriffeLoader', 'docforge.loaders.GriffeLoader')>",
|
|
"docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into ``Project``, ``Module``,\nand ``DocObject`` instances used by doc-forge.",
|
|
"members": {
|
|
"load_project": {
|
|
"name": "load_project",
|
|
"kind": "function",
|
|
"path": "docforge.cli.mcp_utils.GriffeLoader.load_project",
|
|
"signature": "<bound method Alias.signature of Alias('load_project', 'docforge.loaders.griffe_loader.GriffeLoader.load_project')>",
|
|
"docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a ``Module``\ninstance. All modules are then aggregated into a single ``Project``\nobject.\n\nArgs:\n module_paths: List of dotted module import paths to load.\n project_name: Optional override for the project name. Defaults\n to the top-level name of the first module.\n skip_import_errors: If True, modules that fail to load will be\n skipped instead of raising an error.\n\nReturns:\n A populated ``Project`` instance containing the loaded modules.\n\nRaises:\n ValueError: If no module paths are provided.\n ImportError: If a module fails to load and\n ``skip_import_errors`` is False."
|
|
},
|
|
"load_module": {
|
|
"name": "load_module",
|
|
"kind": "function",
|
|
"path": "docforge.cli.mcp_utils.GriffeLoader.load_module",
|
|
"signature": "<bound method Alias.signature of Alias('load_module', 'docforge.loaders.griffe_loader.GriffeLoader.load_module')>",
|
|
"docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge ``Module`` model.\n\nArgs:\n path: Dotted import path of the module.\n\nReturns:\n A populated ``Module`` instance."
|
|
}
|
|
}
|
|
},
|
|
"discover_module_paths": {
|
|
"name": "discover_module_paths",
|
|
"kind": "function",
|
|
"path": "docforge.cli.mcp_utils.discover_module_paths",
|
|
"signature": "<bound method Alias.signature of Alias('discover_module_paths', 'docforge.loaders.discover_module_paths')>",
|
|
"docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for ``.py`` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing ``__init__.py`` are treated as packages.\n- Each ``.py`` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name: Top-level package name to discover modules from.\n project_root: Root directory used to resolve module paths. If not\n provided, the current working directory is used.\n\nReturns:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError: If the specified package directory does not exist."
|
|
},
|
|
"MCPRenderer": {
|
|
"name": "MCPRenderer",
|
|
"kind": "class",
|
|
"path": "docforge.cli.mcp_utils.MCPRenderer",
|
|
"signature": "<bound method Alias.signature of Alias('MCPRenderer', 'docforge.renderers.MCPRenderer')>",
|
|
"docstring": "Renderer that generates MCP-compatible documentation resources.\n\nThis renderer converts doc-forge project models into structured JSON\nresources suitable for consumption by systems implementing the Model\nContext Protocol (MCP).",
|
|
"members": {
|
|
"name": {
|
|
"name": "name",
|
|
"kind": "attribute",
|
|
"path": "docforge.cli.mcp_utils.MCPRenderer.name",
|
|
"signature": "<bound method Alias.signature of Alias('name', 'docforge.renderers.mcp_renderer.MCPRenderer.name')>",
|
|
"docstring": null
|
|
},
|
|
"generate_sources": {
|
|
"name": "generate_sources",
|
|
"kind": "function",
|
|
"path": "docforge.cli.mcp_utils.MCPRenderer.generate_sources",
|
|
"signature": "<bound method Alias.signature of Alias('generate_sources', 'docforge.renderers.mcp_renderer.MCPRenderer.generate_sources')>",
|
|
"docstring": "Generate MCP documentation resources for a project.\n\nThe renderer serializes each module into a JSON resource and produces\nsupporting metadata files such as ``nav.json`` and ``index.json``.\n\nArgs:\n project: Documentation project model to render.\n out_dir: Directory where MCP resources will be written."
|
|
}
|
|
}
|
|
},
|
|
"MCPServer": {
|
|
"name": "MCPServer",
|
|
"kind": "class",
|
|
"path": "docforge.cli.mcp_utils.MCPServer",
|
|
"signature": "<bound method Alias.signature of Alias('MCPServer', 'docforge.servers.MCPServer')>",
|
|
"docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.",
|
|
"members": {
|
|
"mcp_root": {
|
|
"name": "mcp_root",
|
|
"kind": "attribute",
|
|
"path": "docforge.cli.mcp_utils.MCPServer.mcp_root",
|
|
"signature": "<bound method Alias.signature of Alias('mcp_root', 'docforge.servers.mcp_server.MCPServer.mcp_root')>",
|
|
"docstring": null
|
|
},
|
|
"app": {
|
|
"name": "app",
|
|
"kind": "attribute",
|
|
"path": "docforge.cli.mcp_utils.MCPServer.app",
|
|
"signature": "<bound method Alias.signature of Alias('app', 'docforge.servers.mcp_server.MCPServer.app')>",
|
|
"docstring": null
|
|
},
|
|
"run": {
|
|
"name": "run",
|
|
"kind": "function",
|
|
"path": "docforge.cli.mcp_utils.MCPServer.run",
|
|
"signature": "<bound method Alias.signature of Alias('run', 'docforge.servers.mcp_server.MCPServer.run')>",
|
|
"docstring": "Start the MCP server.\n\nArgs:\n transport: Transport mechanism used by the MCP server. Supported\n options include ``stdio``, ``sse``, and ``streamable-http``."
|
|
}
|
|
}
|
|
},
|
|
"generate_resources": {
|
|
"name": "generate_resources",
|
|
"kind": "function",
|
|
"path": "docforge.cli.mcp_utils.generate_resources",
|
|
"signature": "<bound method Function.signature of Function('generate_resources', 8, 29)>",
|
|
"docstring": "Generate MCP documentation resources from a Python module.\n\nThe function performs project introspection, builds the internal\ndocumentation model, and renders MCP-compatible JSON resources\nto the specified output directory.\n\nArgs:\n module: Python module import path used as the entry point for\n documentation generation.\n project_name: Optional override for the project name used in\n generated documentation metadata.\n out_dir: Directory where MCP resources (index.json, nav.json,\n and module data) will be written."
|
|
},
|
|
"serve": {
|
|
"name": "serve",
|
|
"kind": "function",
|
|
"path": "docforge.cli.mcp_utils.serve",
|
|
"signature": "<bound method Function.signature of Function('serve', 32, 66)>",
|
|
"docstring": "Start an MCP server for a pre-generated documentation bundle.\n\nThe server exposes documentation resources such as project metadata,\nnavigation structure, and module documentation through MCP endpoints.\n\nArgs:\n module: Python module import path used to identify the served\n documentation instance.\n mcp_root: Path to the directory containing the MCP documentation\n bundle (index.json, nav.json, and modules/).\n\nRaises:\n click.ClickException: If the MCP documentation bundle is missing\n required files or directories."
|
|
}
|
|
}
|
|
}
|
|
} |