Skip to content

Commit 23dc6a8

Browse files
authored
fix: keep MCP registry description valid (#499)
1 parent 2ebb9aa commit 23dc6a8

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

scripts/sync-mcp-metadata.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@ const pkg = readJson(packagePath);
1111
const server = readJson(serverPath);
1212
const expectedName = pkg.mcpName;
1313
const expectedVersion = pkg.version;
14+
const registryDescriptionMaxLength = 100;
1415

1516
if (typeof expectedName !== 'string' || expectedName.length === 0) {
1617
fail('package.json must define mcpName.');
1718
}
1819
if (typeof expectedVersion !== 'string' || expectedVersion.length === 0) {
1920
fail('package.json must define version.');
2021
}
22+
if (typeof server.description === 'string' && server.description.length > registryDescriptionMaxLength) {
23+
fail(`server.json description must be ${registryDescriptionMaxLength} characters or fewer.`);
24+
}
2125

2226
server.name = expectedName;
2327
server.version = expectedVersion;

server.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
33
"name": "io.github.callstackincubator/agent-device",
44
"title": "agent-device",
5-
"description": "Official MCP discovery router for the agent-device CLI. It exposes status, install guidance, version-matched CLI help, prompts, and resources without exposing device automation over MCP.",
5+
"description": "Discovery router for the agent-device CLI with status, install, help, prompts, and resources.",
66
"repository": {
77
"url": "https://github.com/callstackincubator/agent-device",
88
"source": "github"

0 commit comments

Comments
 (0)