{"record":{"id":"c0d174addbd009a6","repo":"continuedev/continue","slug":"invalid-mcp-tool-reference-toolref-colon-sep-c0d174","errorCode":null,"errorMessage":"Invalid MCP tool reference \"${toolRef}\": colon-separated tool references cannot contain whitespace. Use format \"owner/slug:tool_name\" without spaces.","messagePattern":"Invalid MCP tool reference \"(.+?)\": colon-separated tool references cannot contain whitespace\\. Use format \"owner/slug:tool_name\" without spaces\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/config-yaml/src/markdown/agentFiles.ts","lineNumber":175,"sourceCode":"          throw new Error(\n            `Invalid URL-based MCP tool reference \"${toolRef}\": the part after the last colon must be either a port number or a valid tool name (alphanumeric, underscores, hyphens).`,\n          );\n        }\n      } else {\n        // No colon after the protocol, treat the whole thing as the server\n        const mcpServer = toolRef;\n        tools.push({ mcpServer });\n        mcpServerSet.add(mcpServer);\n      }\n    } else if (toolRef.includes(\"/\")) {\n      // MCP tool reference: \"owner/package\" or \"owner/package:tool_name\"\n      const colonIndex = toolRef.indexOf(\":\");\n\n      if (colonIndex > 0) {\n        // Specific tool: \"owner/package:tool_name\"\n        // Reject references with whitespace to prevent silent misconfigurations\n        if (/\\s/.test(toolRef)) {\n          throw new Error(\n            `Invalid MCP tool reference \"${toolRef}\": colon-separated tool references cannot contain whitespace. ` +\n              `Use format \"owner/slug:tool_name\" without spaces.`,\n          );\n        }\n\n        const mcpServer = toolRef.substring(0, colonIndex);\n        const toolName = toolRef.substring(colonIndex + 1);\n\n        tools.push({ mcpServer, toolName });\n        mcpServerSet.add(mcpServer);\n      } else {\n        // All tools from server: \"owner/package\"\n        const mcpServer = toolRef;\n\n        tools.push({ mcpServer });\n        mcpServerSet.add(mcpServer);\n      }\n    } else {","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/packages/config-yaml/src/markdown/agentFiles.ts#L157-L193","documentation":"For non-URL tool references containing a colon ('owner/package:tool_name'), any whitespace in the reference is rejected before parsing to avoid silently splitting into wrong server/tool parts.","triggerScenarios":"A tools entry like 'owner/slug:my tool' or ' owner/slug:tool' — slug-form reference containing spaces or tabs.","commonSituations":"YAML lists with unquoted entries containing spaces, copy/paste artifacts, or templating inserting whitespace.","solutions":["Strip whitespace from the reference","Quote the YAML entry if needed and keep the exact owner/slug:tool_name form","Check for stray template variable whitespace like ${{ x }} output"],"exampleFix":"# before\ntools:\n  - owner/slug:my tool\n# after\ntools:\n  - owner/slug:my_tool","handlingStrategy":"validation","validationCode":"const ok = toolRefs.every(r => !/\\s/.test(r));","typeGuard":"function isCleanSlugToolRef(ref: string): boolean { return !/\\s/.test(ref) && ref.split(':').length <= 2; }","tryCatchPattern":"try { parseAgentFileTools(refs); } catch (e) { if (e.message.includes('whitespace')) { /* strip whitespace, retry */ } }","preventionTips":["Quote YAML entries containing colons","Trim whitespace when generating references from templates"],"tags":["mcp","tools","whitespace","slug"],"backgroundTag":"malformed-tool-reference","analyzedSha":"5522c6f44ca0ac3528b37244818fbfa39b5af470","analyzedAt":"2026-08-27T11:28:54.683Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}