Skip to content

Rebuild Nyuchi Design MCP against the new function set (post-consolidation) #121

@bryanfawcett

Description

@bryanfawcett

Why

The DB consolidation in #120 replaces the entire legacy SQL function surface (~66 functions) with a unified ~12-function set over the document store. The Nyuchi Design MCP server (design.nyuchi.com/mcp) currently boots from mcp_tool_registry and calls the legacy functions (get_component, list_components, get_brand_tokens, get_doc, list_skills, get_ubuntu_*, etc.), which read the old reference tables.

When #120 drops the legacy functions + tables, the live MCP will break. This is accepted and intentional — we are rebuilding the tools wholesale, not patching them.

Scope

  • Rebuild MCP tool handlers against the new function set: read_documents, put_document, read_versions, emit_event, query_events, log_release, record_doctrine_change, count/summary fns
  • Repoint every mcp_tool_registry row's source_table / handler to the new functions (registry-driven, no per-tool code)
  • Update tool input_schema / output_shape for the document-shaped responses (returns document jsonb, not flat typed columns)
  • Re-seed brand data so get_design_tokens / get_brand_info resolve for all five brands (known pre-existing bug)
  • Fix unserialised error objects ([object Object]) in remaining tool response handlers (known pre-existing bug)
  • Correct stale "five minerals" → "seven minerals" in the design-system skill + token output
  • Re-test all MCP tools live after cutover

Also affects

Blocked by #120.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions