Skip to content

Commit 8b40fae

Browse files
aadarsh-bsclaude
andcommitted
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) <noreply@anthropic.com>
1 parent a304aee commit 8b40fae

1 file changed

Lines changed: 18 additions & 3 deletions

File tree

src/tools/rca-agent.ts

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,12 @@ export default function addRCATools(
148148
FETCH_RCA_PARAMS,
149149
async (args) => {
150150
try {
151-
trackMCP("fetchRCA", server.server.getClientVersion()!, config);
151+
trackMCP(
152+
"fetchRCA",
153+
server.server.getClientVersion()!,
154+
undefined,
155+
config,
156+
);
152157
return await fetchRCADataTool(args, config);
153158
} catch (error) {
154159
return handleMCPError("fetchRCA", server, config, error);
@@ -162,7 +167,12 @@ export default function addRCATools(
162167
GET_BUILD_ID_PARAMS,
163168
async (args) => {
164169
try {
165-
trackMCP("getBuildId", server.server.getClientVersion()!, config);
170+
trackMCP(
171+
"getBuildId",
172+
server.server.getClientVersion()!,
173+
undefined,
174+
config,
175+
);
166176
return await getBuildIdTool(args, config);
167177
} catch (error) {
168178
return handleMCPError("getBuildId", server, config, error);
@@ -176,7 +186,12 @@ export default function addRCATools(
176186
LIST_TEST_IDS_PARAMS,
177187
async (args) => {
178188
try {
179-
trackMCP("listTestIds", server.server.getClientVersion()!, config);
189+
trackMCP(
190+
"listTestIds",
191+
server.server.getClientVersion()!,
192+
undefined,
193+
config,
194+
);
180195
return await listTestIdsTool(args, config);
181196
} catch (error) {
182197
return handleMCPError("listTestIds", server, config, error);

0 commit comments

Comments
 (0)