{"record":{"id":"818e987db01eec78","repo":"angular/angular-cli","slug":"unsupported-strings-classify-selectedtool-mc","errorCode":null,"errorMessage":"Unsupported '${strings.classify(selectedTool)}' MCP server configuraiton.","messagePattern":"Unsupported '(.+?)' MCP server configuraiton\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/schematics/angular/ai-config/index.ts","lineNumber":102,"sourceCode":"            fileInfo,\n            tool: selectedTool,\n          };\n\n          switch (fileInfo.type) {\n            case ContextFileType.BestPracticesMd:\n              return addBestPracticesMarkdown(fileCfgOpts);\n            case ContextFileType.McpConfig:\n              switch (selectedTool) {\n                case Tool.ClaudeCode:\n                case Tool.Cursor:\n                case Tool.GeminiCli:\n                  return addJsonMcpConfig(fileCfgOpts, 'mcpServers');\n                case Tool.OpenAiCodex:\n                  return addTomlMcpConfig(fileCfgOpts);\n                case Tool.Vscode:\n                  return addJsonMcpConfig(fileCfgOpts, 'servers');\n                default:\n                  throw new Error(\n                    `Unsupported '${strings.classify(selectedTool)}' MCP server configuraiton.`,\n                  );\n              }\n          }\n        }),\n      );\n\n    return chain(rules);\n  };\n}\n","sourceCodeStart":84,"sourceCodeEnd":113,"githubUrl":"https://github.com/angular/angular-cli/blob/bb72145f9ab45aee29f523236b3a25cd0813a841/packages/schematics/angular/ai-config/index.ts#L84-L113","documentation":"The `ai-config` schematic generates MCP server configuration for a set of supported tools (e.g. Gemini CLI, OpenAI Codex, VS Code). If the selected tool is not one of the handled cases in the switch, the schematic throws with the classified tool name in the message. (Note: the message contains a typo, \"configuraiton\".)","triggerScenarios":"Running the ai-config schematic with a `tool` option value that reaches the MCP-config switch's `default` branch — i.e. a tool enum value that has no dedicated config-file writer (json mcpServers / toml / vscode servers).","commonSituations":"Passing an unsupported or misspelled tool name (e.g. `--tool=cursor`) when the schematic only supports specific tools; using a newer/older CLI version where the Tool enum differs; scripting the schematic with an arbitrary string.","solutions":["Use one of the supported `--tool` values (check the schematic's schema/README, e.g. gemini-cli, openai-codex, vscode)","Fix the spelling/casing of the tool option","Upgrade @angular/cli and @schematics/angular together so the Tool enum and schematic handling match","If you need a new tool, add a case in the switch calling an appropriate addJsonMcpConfig/addTomlMcpConfig variant"],"exampleFix":"// before\nng add @angular/ai-config --tool=cursor\n// after\nng add @angular/ai-config --tool=vscode","handlingStrategy":"validation","validationCode":"const SUPPORTED_TOOLS = ['gemini-cli', 'openai-codex', 'vscode'];\nif (!SUPPORTED_TOOLS.includes(options.tool)) {\n  throw new Error(`Unsupported tool: ${options.tool}. Use one of: ${SUPPORTED_TOOLS.join(', ')}`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await generateSchematic('ai-config', { tool: selectedTool });\n} catch (e) {\n  if (e.message.includes('MCP server configuraiton')) {\n    console.error(`Tool \"${selectedTool}\" unsupported; choose a supported --tool value`);\n  } else throw e;\n}","preventionTips":["Check `ng add @angular/ai-config --help` (or the schematic schema.json) for supported tool values","Avoid scripting arbitrary tool names","Keep @angular/cli and @schematics/angular versions in sync"],"tags":["schematics","mcp","configuration","validation"],"backgroundTag":"unsupported-option-value","analyzedSha":"bb72145f9ab45aee29f523236b3a25cd0813a841","analyzedAt":"2026-08-30T02:47:34.745Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}