Files
Shutong Wu 44fb09bd68 docs(website): auto-generated tool & resource reference (M3)
Introduces tools/generate_docs_reference.py — the single Python script
that emits every reference page under website/docs/reference/ from the
live @mcp_for_unity_tool and @mcp_for_unity_resource registries.

What lands:
- tools/generate_docs_reference.py: introspects function signatures
  (Annotated[Type, "description"]), preserves hand-authored examples
  between <!-- examples:start --><!-- examples:end --> markers, supports
  --write (default) and --check (CI drift detection) modes.
- tools/hooks/pre-commit: installed via tools/install-hooks.sh; when a
  staged change touches Server/src/services/{tools,resources,registry},
  regenerates the reference and re-stages it. Contributors don't have
  to remember.
- .github/workflows/docs-generate.yml: runs --check on every PR and on
  pushes to beta. Fails with a one-line fix command if the committed
  reference drifts from the registry. Also runs a count sanity check
  (#decorators must equal #generated md files).
- website/docs/reference/: 43 tool pages across 9 groups (animation,
  core, docs, probuilder, profiling, scripting_ext, testing, ui, vfx)
  + group landing pages + 25-resource catalog. Sidebar wired with
  Docusaurus's autogenerated mode so new tools appear automatically.
- README.md: "Available Tools" / "Available Resources" lists retired —
  these were drifting on every release. Replaced with a single link to
  the generated reference. (Root README slim is M5.)

Source of truth: Python. The C# attributes carry only Name/Group/
Description; the Python @decorator owns the richest typing via
Annotated[...], which is what MCP clients actually see over the wire.

Tested:
- generator runs clean (43 tools, 9 groups, 25 resources, deterministic)
- --check exits 0 against committed output
- pre-commit hook installs via existing tools/install-hooks.sh path
2026-05-24 13:17:33 +08:00
..
2026-05-22 16:49:37 +08:00