Bug-fix release. Closes upstream issue massu-ai/massu#4 — tools/list emitted a non-standard top-level tier field on every Tool object, which Claude Code 2.1.143 (released 2026-05-15) silently rejects, causing all 67 mcpmassu* tools to disappear from the deferred-tool registry on session start. The canonical MCP Tool schema (schema/2025-11-25/schema.ts line 1251) permits only name, title, description, inputSchema, execution, outputSchema, annotations, _meta, icons — tier is not in the schema. Structured tier metadata now lives under annotations.tier (the spec-sanctioned extension point for tool metadata); the visible [PRO] / [TEAM] / [ENTERPRISE] description-prefix labelling is unchanged. Internal license enforcement at tools.ts:323-331 is unaffected because it reads getToolTier(name) from the static server-side TOOL_TIER_MAP, never from the wire-emitted field — no license-bypass risk. Structural drift-prevention: new vitest assertion (license.test.ts "emits only MCP-spec-permitted top-level fields") parses the annotated definitions against the canonical permitted set; the regression class becomes structurally impossible to reintroduce without test failure.
Fixed
packages/core/src/license.ts:194-203annotateToolDefinitions()— replaced the top-leveltier,spread withannotations: { ...(def.annotations ?? {}), tier },. Wire-format Tool objects now conform to MCP spec 2025-11-25 §Tool(extendsBaseMetadata, Icons). Caller-supplied annotations (e.g.readOnlyHint,title) are preserved via shallow-merge before tier is added.packages/core/src/tools.ts:43-48ToolDefinitioninterface — dropped top-leveltier?: 'free' | 'pro' | 'team' | 'enterprise'; addedannotations?: Record<string, unknown>to mirror the MCP spec extension point. The local interface remains permissive (Record<string, unknown>vs. the spec's strictly-typedToolAnnotations) so thattiercan co-exist with caller-supplied annotation fields without a circularToolTiertype import.
Added
packages/core/src/tests/license.test.tstwo new regression tests under the existing P3-029annotateToolDefinitions()describe block:- Existing 9
annotated[N].tierassertions in the same describe block migrated toannotated[N].annotations?.tierto track the wire-format relocation.
Verification
cd packages/core && npm test— ALL pass (see commit message body for count).cd packages/core && npx tsc --noEmit— 0 errors.bash scripts/massu-pattern-scanner.sh— exit 0 (all 16 checks).- Diagnostic confirmation: stripping
tiervia a stdio wrapper restored all 67mcpmassu*tools in Claude Code 2.1.143 (proves the fix root-cause-correct). - Spec citation:
schema/2025-11-25/schema.tsline 1251 —interface Tool extends BaseMetadata, Iconswith notierfield.