Skip to content

feat(docs): MCP tools reference + interactive hub + overview diagram#40

Merged
vreshch merged 4 commits into
masterfrom
feature/mcp-tools-docs
Jul 6, 2026
Merged

feat(docs): MCP tools reference + interactive hub + overview diagram#40
vreshch merged 4 commits into
masterfrom
feature/mcp-tools-docs

Conversation

@vreshch

@vreshch vreshch commented Jul 6, 2026

Copy link
Copy Markdown
Member

What

Interactive reference for the six frozen memory__* MCP tools at /docs/mcp-tools, matching the look and interaction of the API reference shipped in #39 on /docs/rest-api.

Each tool is a collapsible row: verb badge + mono memory__<name> + one-line summary + a Live · frozen chip. Expanded it shows the description, an Arguments table (name / type / required-default / description), a pretty-printed + syntax-highlighted Example input and Result (via the shared json-highlight tokenizer), and a one-line Behavior note where relevant.

Contracts transcribed from .mcpc.json

All input schemas, defaults, and constraints are transcribed verbatim from the CI-frozen snapshot at agentage/web/packages/memory-mcp/.mcpc.json (the 6 tools: memory__search/read/list/write/edit/delete) - no fields invented. Result shapes follow each tool's outputSchema. Collapsed-row summaries and the "Try it" prompts reuse the facts in lib/mcp-docs.ts (MCP_TOOLS, EXAMPLE_PROMPTS, endpoint/auth constants).

Verb -> badge color: search/read/list -> green (read), write -> amber, edit -> purple, delete -> red - reusing the same semantic tokens as the endpoint method badges.

No copy-paste

Rather than duplicate the ~150-line accordion, this adds a sibling tools DocBlock and a ToolList component that reuses the existing subcomponents: SectionLabel (now exported from endpoint-list.tsx), the shared JsonBlock, and the chip/chevron/badge patterns. Only a 4-column arg table (the extra required-default column) is tool-specific. The /docs/rest-api page and its data are untouched.

Files

  • docs/types.ts - ToolArg / ToolContract / ToolGroup + { type: 'tools' } DocBlock
  • lib/mcp-tool-contracts.ts - the 6 contracts (new data module)
  • components/docs/tool-list.tsx - the accordion (new)
  • components/docs/endpoint-list.tsx - export SectionLabel (1 line)
  • docs/components/doc-article.tsx - wire the tools block
  • docs/content/mcp-tools.ts - the page (new)
  • docs/registry.ts + docs/nav.ts - register page; flip the "MCP tools" nav stub to real (CLI left as stub)

Verify

  • npm run verify green (type-check + lint + format + test + build; 9 tests pass)
  • Production next start: /docs/mcp-tools -> 200 with all 6 tool names, aria-expanded count = 6, highlight spans present, 6 Live · frozen chips; /docs/rest-api -> 200 unchanged.

Note

The REST draft contract on /docs/rest-api documents search score as 0-1 relevance, while the MCP memory__search contract (.mcpc.json) defines score as an integer match count. Different surfaces, expected - flagging for awareness, not changed here.

MERGE ONLY AFTER review. This repo auto-deploys dev + prod on any push to master.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

CI - Verify PASSED

Commit: 23379a650d2d470d5a8ccfd53e3dd396a5a44a29 · Branch: feature/mcp-tools-docs

  • ✅ Type check
  • ✅ Lint
  • ✅ Format check
  • ✅ Unit tests
  • ✅ Build
  • ✅ Landing e2e

🔗 View workflow run

@vreshch vreshch changed the title feat(docs): interactive MCP tools reference (/docs/mcp-tools) feat(docs): MCP tools reference + interactive hub + overview diagram Jul 6, 2026
@vreshch vreshch marked this pull request as ready for review July 6, 2026 09:46
@vreshch vreshch merged commit c2e9340 into master Jul 6, 2026
1 check passed
@vreshch vreshch deleted the feature/mcp-tools-docs branch July 6, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant