Skip to content

Commit e405041

Browse files
gewenyu99claude
andcommitted
fix: MCP resource name should be the display name, not the description sentence
The manifest set each skill resource's `name` to `skill.name`, which is the full description sentence. Clients that mint one tool per MCP resource derive the tool name from `name`; the sentence-length names overflow Anthropic's 128-char tool-name limit, and one invalid name 400s the entire request — so an agent connected in CLI mode makes zero tool calls (a no-op run). Use the short `displayName` for the resource `name` instead. The agent-facing skill-menu still carries the descriptive `skill.name` for skill selection, so this only shortens the MCP resource name — no menu or selection change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent e0f5fb9 commit e405041

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

scripts/lib/build-phases.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,13 @@ function generateManifest({ resources, uriSchema, version, docContents = {} }) {
123123
? `${scheme}${docPattern.replace('{id}', skill.id)}`
124124
: `${scheme}${skillPattern.replace('{group}', skill.group).replace('{id}', skill.shortId)}`;
125125
const base = {
126+
// The MCP resource name is a short, human-readable label (per the
127+
// MCP spec) — use the display name, not the description sentence.
128+
// Clients that mint a tool per resource derive the tool name from
129+
// this; a sentence here overflows the 128-char tool-name limit and
130+
// 400s the whole request. Docs carry their short name in `name`.
126131
id: skill.id,
127-
name: skill.name,
132+
name: skill.displayName ?? skill.name,
128133
description: skill.description,
129134
tags: skill.tags,
130135
uri,

0 commit comments

Comments
 (0)