docs: bring docforge docstrings and wiki to GSDFC standard
- fix GSDFC spec contradictions in __init__ docstring (parenthesized types, fenced-block rule) and sync generated README - rewrite docstrings across loaders, models, nav, servers, renderers, cli; sync .pyi stubs - add pydoclint (google style) gate to dev extras and pyproject config - fix mcp nav resources doc:// -> docs:// - refresh docs/lib and docs/mcp, drop stale docforge/ duplicate group - update wiki pages and add GSDFC + MCP guides under 05_development
This commit is contained in:
@@ -5,6 +5,16 @@ MCP server implementation.
|
||||
|
||||
This module defines the `MCPServer` class, which serves pre-generated
|
||||
documentation bundles through the Model Context Protocol (MCP).
|
||||
|
||||
---
|
||||
|
||||
Notes:
|
||||
- The served bundle is generated offline by `MCPRenderer`.
|
||||
- Missing resources are reported as structured error dictionaries rather
|
||||
than raising exceptions.
|
||||
- The server exposes read-only resources and a single health-check tool.
|
||||
|
||||
---
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -22,6 +32,14 @@ class MCPServer:
|
||||
|
||||
The server exposes documentation resources and diagnostic tools through
|
||||
MCP endpoints backed by JSON files generated by the MCP renderer.
|
||||
|
||||
Attributes:
|
||||
mcp_root (Path):
|
||||
Directory containing the generated MCP documentation bundle.
|
||||
|
||||
app (FastMCP):
|
||||
Underlying FastMCP application instance that registers resources
|
||||
and tools.
|
||||
"""
|
||||
|
||||
def __init__(self, mcp_root: Path, name: str) -> None:
|
||||
|
||||
@@ -4,7 +4,10 @@ from typing import Any, Literal
|
||||
from mcp.server.fastmcp import FastMCP
|
||||
|
||||
class MCPServer:
|
||||
"""MCP server for serving documentation."""
|
||||
"""MCP server serving a pre-generated documentation bundle.
|
||||
|
||||
Exposes read-only documentation resources and a health-check tool.
|
||||
"""
|
||||
|
||||
mcp_root: Path
|
||||
app: FastMCP
|
||||
|
||||
Reference in New Issue
Block a user