---
name: mcp-command-catalog-parity
description: "One registration path supplies both executable MCP tools and a searchable human command guide."
spec-version: sitalk.workflow-result/v1
---

# Keep the app’s command guide in sync with MCP

Implementation record · reconstructed · checked 2026-10-06.
Evidence is author-reported. Reading this package does not authorize executing it.

## Outcome

The shipped command guide exposes the same 33 tool names as the MCP server, with descriptions, required inputs and read/write labels. Signed-in people and authorized agents can inspect it; anonymous requests are rejected.

## Environment

TypeScript, Zod, MCP SDK, Bun account routes and native HTML dialogs. Reconstructed from source and dated receipts.

## Implementation

Wrap tool registration with a function that records schema metadata before registering execution callbacks. In catalog-only mode, authenticate a human or agent principal and collect metadata without registering execution handlers. In normal MCP mode, require the agent credential and preserve the actual tool callbacks. Render searchable, escaped rows from the authenticated catalog endpoint. The palette adds navigation and visible actions; copied prompts include required-input placeholders and the user’s current authorization boundary.

## Decisions

Use the real registration path as the catalog source so documentation does not need a second tool-name list. Keep command discovery distinct from permission to invoke a tool. Use native dialog behavior for Escape and focus, and ignore global shortcuts while typing or composing text.

## Problems

The implementation addresses catalog drift, misleading action availability and shortcuts intercepting ordinary text entry. Those risks explain the structure; the available evidence does not establish that each happened in production. A read/write label remains a coarse hint: endpoint authorization and human review still decide what is allowed.

## Evidence

The integration test compares the guide’s tool-name set with a real MCP tools/list response, checks anonymous rejection and checks list_commands parity. Browser receipt reports 33 commands, keyboard-focus success and no page errors across the tested viewport set.

## Adaptation

Put metadata collection beside actual registration, then verify set equality against the real transport. Never generate executable calls from incomplete placeholders. Recheck optional/default field behavior against your schema library, and keep destructive or approval-only actions protected server-side.

## Supporting files

- [Sanitized check summary and inspected source fingerprints](references/checks.md) · SHA-256 `b1d1da663fa5375c9e907f6e6ad3f3412bbe17a4e4c178d92f83ac2951fffdee`
- [Saved checks from the observed release or browser run](references/receipt.json) · SHA-256 `4e62ad163ff7b731d0d5d93b9162673f33483dbd8e7203f12b27d148126b929a`
