Libra CodeHub

CedarCopilot/cedar-mail

Branch: staging

fix(mcp): add annotations.title alongside every tool's top-level title

merged#2837CedarCopilot

CedarCopilot wants to merge 1 commit into staging from fix/annotations-title

Live on prod, watching, 2 days leftTimeline and evidence
  1. Opened
    Sep 20, 2026, 10:18 AM
  2. Sep 20, 2026, 10:23 AM
  3. Merged
    Sep 20, 2026, 10:30 AM
  4. Live on prod
    Sep 20, 2026, 10:30 AM
  5. Observed 1 hour
    Sep 20, 2026, 10:30 AM
  6. Watching

    Live on prod, watching, 2 days left

    Sep 20, 2026, 10:30 AM
  7. Pipelines steady after this deploy
    Sep 20, 2026, 10:30 AM

Behaviors Libra is checking

Every externally exposed MCP tool, including family tools and standalone skill, staff-debug, and deprecated-shim tools, exposes the same human-readable label in both top-level title and annotations.title.Not checked
prod

Libra has verdicts on 0 of 1 tracked behaviors on prod; 1 is still being checked. Libra checks hourly for 3 days after each deploy.

Summary

Manufact's readiness review flagged annotations.title missing across the external MCP surface. An earlier round of EXTERNAL_TOOL_METADATA assumed only the top-level title field mattered , the code even had a comment saying so ("annotations.title is a legacy fallback the SDK also accepts but reviewers don't read"). This new finding shows that assumption was wrong.

Fix

Rather than duplicating the title string across EXTERNAL_TOOL_METADATA's 25 entries, fixed it at each registration site:

  • server.ts's registerFamilyToolOnServer now derives annotations.title from the same metadata.title at the one shared call site, so the two can never drift for any family tool.
  • The four standalone registrations (load-skill-tool.ts, cedar-staff-debug-tool.ts, load-brain-skills-tool.ts, deprecated-record-shims.ts) each set annotations.title to the same literal string as their existing top-level title.

Tests

Added a regression check in external-mcp.e2e.test.ts asserting every tool in a real tools/list response carries a non-empty top-level title AND a matching annotations.title , covers the family loop, load-skill, cedar-staff-debug, and both deprecated record shims in one pass, plus a second targeted check for load-brain-skills (registered by its own standalone function, not covered by the first session's granted scopes).

Verification

  • tsc -b clean
  • pnpm deps:check clean (no dependency violations, 1845 modules cruised)
  • Scoped vitest across external-mcp.e2e.test.ts, tool-hints-match-behavior.test.ts, server.test.ts: 67/67 passing

šŸ¤– Generated with Claude Code

RetriggerConfidence Score: 5/5

The PR appears safe to merge, with title metadata consistently propagated through every changed registration path.

Summary

The PR consistently exposes MCP tool titles in both supported metadata locations.

  • Family tools now derive annotations.title from the same metadata value as their top-level title.
  • Standalone tools now provide matching annotation titles.
  • End-to-end coverage checks the shared family registration path and each standalone registration path.

Reviews (1) Ā· Last reviewed commit: "fix(mcp): add annotations.title alongsid..."

Show production surfaces and changed-file mapping

Production surfaces

Libra has not measured any production surfaces for this change yet.

Changed files → surfaces

  • apps/server/src/mastra/mcp/external/cedar-staff-debug-tool.tsno production surface mapped
  • apps/server/src/mastra/mcp/external/deprecated-record-shims.tsno production surface mapped
  • apps/server/src/mastra/mcp/external/load-brain-skills-tool.tsno production surface mapped
  • apps/server/src/mastra/mcp/external/load-skill-tool.tsno production surface mapped
  • apps/server/src/mastra/mcp/external/server.tsno production surface mapped
  • apps/server/src/routes/__tests__/external-mcp.e2e.test.tsno production surface mapped