{"record":{"id":"8d3fda6533599b7c","repo":"xpipe-io/xpipe","slug":"no-api-endpoint-found-for-path-path","errorCode":null,"errorMessage":"No API endpoint found for path ${path}","messagePattern":"No API endpoint found for path (.+?)","errorType":"exception","errorClass":"BeaconClientException","httpStatus":null,"severity":"error","filePath":"app/src/main/java/io/xpipe/app/beacon/mcp/McpTools.java","lineNumber":88,"sourceCode":"                .build();\n    }\n\n    public static McpServerFeatures.SyncToolSpecification callApi() throws IOException {\n        var tool = McpSchemaFiles.loadTool(\"call_api.json\");\n        return McpServerFeatures.SyncToolSpecification.builder()\n                .tool(tool)\n                .callHandler(McpToolHandler.of((req) -> {\n                    var path = req.getStringArgument(\"path\");\n                    var payload = req.getRawRequest().arguments().get(\"payload\");\n                    var payloadJson = JacksonMapper.getDefault().valueToTree(payload);\n\n                    if (!AppPrefs.get().enableHttpApi().get()) {\n                        throw new BeaconClientException(\"HTTP API is not enabled\");\n                    }\n\n                    var i = BeaconInterface.byPath(path);\n                    if (i.isEmpty()) {\n                        throw new BeaconClientException(\"No API endpoint found for path \" + path);\n                    }\n\n                    var handshakeRequest = HandshakeExchange.Request.builder()\n                            .client(BeaconClientInformation.Mcp.builder().build())\n                            .auth(BeaconAuthMethod.ApiKey.builder()\n                                    .key(AppPrefs.get().apiKey().get())\n                                    .build())\n                            .build();\n                    var handshakeReq = HttpRequest.newBuilder()\n                            .uri(URI.create(\n                                    \"http://localhost:\" + AppBeaconServer.get().getPort() + \"/handshake\"))\n                            .POST(HttpRequest.BodyPublishers.ofString(\n                                    JacksonMapper.getDefault().writeValueAsString(handshakeRequest)))\n                            .build();\n                    var handshakeRes = HttpHelper.client().send(handshakeReq, HttpResponse.BodyHandlers.ofString());\n                    var handshakeResJson = JacksonMapper.getDefault().readTree(handshakeRes.body());\n                    if (handshakeRes.statusCode() >= 400) {\n                        return McpSchema.CallToolResult.builder()","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/xpipe-io/xpipe/blob/d85ca821baa46092a320ebb13546d7240adb74f8/app/src/main/java/io/xpipe/app/beacon/mcp/McpTools.java#L70-L106","documentation":"The MCP callApi tool resolves the requested endpoint via BeaconInterface.byPath(path) and throws this BeaconClientException when no beacon interface is registered for that path. The path must exactly match a known HTTP API endpoint route.","triggerScenarios":"Calling the MCP 'callApi' tool with a 'path' argument that does not correspond to any registered BeaconInterface endpoint: typo, wrong API version prefix, or an endpoint that doesn't exist in this XPipe version.","commonSituations":"Copy-pasting endpoint paths from HTTP API docs with wrong casing or missing prefix; targeting endpoints added in newer XPipe versions than the installed one; guessing route names instead of listing them.","solutions":["Verify the exact endpoint path against the XPipe HTTP API documentation for the installed version","Match casing and prefixes exactly (BeaconInterface.byPath is an exact-path lookup)","Upgrade XPipe if the endpoint exists only in a newer release","Catch BeaconClientException and fall back to enumerating available endpoints or a dedicated MCP tool"],"exampleFix":"// before\n{\"path\": \"/api/v1/connection/list\"} // wrong route\n// after\n{\"path\": \"/connection/list\"} // exact registered beacon path","handlingStrategy":"validation","validationCode":"// check the endpoint path before calling\nconst knownPaths = await listApiEndpoints(); // from installed-version docs or introspection\nif (!knownPaths.includes(path)) {\n  throw new Error(`unknown API path '${path}'; known: ${knownPaths.join(', ')}`);\n}","typeGuard":null,"tryCatchPattern":"try { return callApi(path, payload); } catch (BeaconClientException e) { if (e.message.startsWith('No API endpoint found for path')) { /* correct the path or fall back to a dedicated MCP tool */ } throw e; }","preventionTips":["Copy endpoint paths from the docs for your exact XPipe version","Keep a constants file of valid beacon paths instead of inline strings","Confirm the endpoint exists after XPipe version upgrades"],"tags":["mcp","api-endpoint","not-found"],"backgroundTag":"resource-not-found","analyzedSha":"d85ca821baa46092a320ebb13546d7240adb74f8","analyzedAt":"2026-09-06T14:30:08.251Z","contentChangedAt":"2026-09-06T14:30:08.251Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}