Skip to content

Commit 009cde8

Browse files
authored
Merge pull request #225 from PostHog/posthog-code/mcp-resource-name-displayname
fix: MCP resource name should be the display name, not the description sentence
2 parents e0f5fb9 + e405041 commit 009cde8

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)