From 8b40fae6c184799a66a28e2fa947be4a8b439bc5 Mon Sep 17 00:00:00 2001 From: Aadarsh Goyal Date: Wed, 10 Jun 2026 21:17:40 +0530 Subject: [PATCH] fix: attach auth header on RCA tool MCPInstrumentation events fetchRCA, getBuildId and listTestIds called trackMCP with config in the 3rd (error) argument slot, leaving the config param undefined. Without config, no Authorization header is attached and the /sdk/v1/event endpoint silently drops the event (raise_error:false + .catch), so these tools logged zero usage despite being invoked. Pass undefined as the error arg and config as the 4th, matching the other tools. Fixes AIMCP-187. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/tools/rca-agent.ts | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/tools/rca-agent.ts b/src/tools/rca-agent.ts index bc23187c..84d76185 100644 --- a/src/tools/rca-agent.ts +++ b/src/tools/rca-agent.ts @@ -148,7 +148,12 @@ export default function addRCATools( FETCH_RCA_PARAMS, async (args) => { try { - trackMCP("fetchRCA", server.server.getClientVersion()!, config); + trackMCP( + "fetchRCA", + server.server.getClientVersion()!, + undefined, + config, + ); return await fetchRCADataTool(args, config); } catch (error) { return handleMCPError("fetchRCA", server, config, error); @@ -162,7 +167,12 @@ export default function addRCATools( GET_BUILD_ID_PARAMS, async (args) => { try { - trackMCP("getBuildId", server.server.getClientVersion()!, config); + trackMCP( + "getBuildId", + server.server.getClientVersion()!, + undefined, + config, + ); return await getBuildIdTool(args, config); } catch (error) { return handleMCPError("getBuildId", server, config, error); @@ -176,7 +186,12 @@ export default function addRCATools( LIST_TEST_IDS_PARAMS, async (args) => { try { - trackMCP("listTestIds", server.server.getClientVersion()!, config); + trackMCP( + "listTestIds", + server.server.getClientVersion()!, + undefined, + config, + ); return await listTestIdsTool(args, config); } catch (error) { return handleMCPError("listTestIds", server, config, error);