{"record":{"id":"9c415648a8eb8346","repo":"CherryHQ/cherry-studio","slug":"unknown-tool-name","errorCode":null,"errorMessage":"Unknown tool: ${name}","messagePattern":"Unknown tool: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/main/ai/mcp/servers/didiMcp.ts","lineNumber":234,"sourceCode":"\n      try {\n        switch (name) {\n          case 'maps_textsearch':\n            return await this.handleMapsTextSearch(args)\n          case 'taxi_cancel_order':\n            return await this.handleTaxiCancelOrder(args)\n          case 'taxi_create_order':\n            return await this.handleTaxiCreateOrder(args)\n          case 'taxi_estimate':\n            return await this.handleTaxiEstimate(args)\n          case 'taxi_generate_ride_app_link':\n            return await this.handleTaxiGenerateRideAppLink(args)\n          case 'taxi_get_driver_location':\n            return await this.handleTaxiGetDriverLocation(args)\n          case 'taxi_query_order':\n            return await this.handleTaxiQueryOrder(args)\n          default:\n            throw new Error(`Unknown tool: ${name}`)\n        }\n      } catch (error) {\n        logger.error(`Error calling tool ${name}:`, error as Error)\n        throw error\n      }\n    })\n  }\n\n  private async handleMapsTextSearch(args: any) {\n    const { city, keywords, location } = args\n\n    const params = {\n      name: 'maps_textsearch',\n      arguments: {\n        keywords,\n        city,\n        ...(location && { location })\n      }","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/CherryHQ/cherry-studio/blob/726446b54cd69ffe51a276638672f6d95ca0768c/src/main/ai/mcp/servers/didiMcp.ts#L216-L252","documentation":"Generic Error thrown by the DiDi MCP server's CallToolRequest handler default branch when the requested tool name does not match any of the seven known tools (maps_textsearch, taxi_cancel_order, taxi_create_order, taxi_estimate, taxi_generate_ride_app_link, taxi_get_driver_location, taxi_query_order). The error propagates after being logged. It indicates the client invoked a tool name this server does not register.","triggerScenarios":"The MCP client (LLM) calls a tool name not in the server's ListTools response — a typo, a removed tool, a version mismatch where the client knows a tool the server doesn't expose, or a hallucinated tool name.","commonSituations":"Model hallucination of a tool name; client and server version mismatch (client expects a newer/older tool set); tool name casing or spelling error; the tool was renamed or removed in a DiDi MCP update.","solutions":["Call ListTools first and only invoke tool names from the returned list.","Check spelling and casing of the tool name against the ListTools output.","Update the DiDi MCP server to the version that provides the expected tool.","If the tool was removed, switch to the replacement tool."],"exampleFix":"// before\nconst result = await server.callTool('taxi_estimte', args) // typo\n\n// after\nconst { tools } = await server.listTools()\nconst validNames = tools.map(t => t.name)\nif (!validNames.includes(requestedName)) {\n  throw new Error(`Tool '${requestedName}' not available. Known: ${validNames.join(', ')}`)\n}\nconst result = await server.callTool(requestedName, args)","handlingStrategy":"validation","validationCode":"const knownTools = [\n  'maps_textsearch',\n  'taxi_cancel_order',\n  'taxi_create_order',\n  'taxi_estimate',\n  'taxi_generate_ride_app_link',\n  'taxi_get_driver_location',\n  'taxi_query_order'\n]\nif (!knownTools.includes(toolName)) {\n  throw new Error(`Tool '${toolName}' is not available. Known tools: ${knownTools.join(', ')}`)\n}","typeGuard":"function isKnownDiDiTool(name: string): boolean {\n  return [\n    'maps_textsearch',\n    'taxi_cancel_order',\n    'taxi_create_order',\n    'taxi_estimate',\n    'taxi_generate_ride_app_link',\n    'taxi_get_driver_location',\n    'taxi_query_order'\n  ].includes(name)\n}","tryCatchPattern":"try {\n  await server.callTool(name, args)\n} catch (e) {\n  if (e instanceof Error && e.message.startsWith('Unknown tool:')) {\n    // fetch ListTools and retry with a valid name\n  }\n  throw e\n}","preventionTips":["Always call ListTools before invoking tools to get the current valid set.","Validate tool names against the ListTools response.","Watch for tool name typos and casing issues."],"tags":["mcp","didi","unknown-tool","dispatch"],"backgroundTag":null,"analyzedSha":"726446b54cd69ffe51a276638672f6d95ca0768c","analyzedAt":"2026-08-12T17:30:37.448Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}