diff --git a/src/mcp-server-http.ts b/src/mcp-server-http.ts index d9baa4a..4860863 100644 --- a/src/mcp-server-http.ts +++ b/src/mcp-server-http.ts @@ -304,7 +304,11 @@ export async function main() { const mcpInfo = extractMcpToolInfo(parsedBody); // Handle request within trace context (passing trace ID from header if available) - const sessionMetadata = getSessionMetadata("http"); + const sessionMetadata = { + ...getSessionMetadata("http"), + mcp_method: mcpInfo.method, + tool: mcpInfo.tool, + }; return await withSpan( "mcp_http_request", { diff --git a/src/mcp-server-stdio.ts b/src/mcp-server-stdio.ts index 7216eed..70529a1 100644 --- a/src/mcp-server-stdio.ts +++ b/src/mcp-server-stdio.ts @@ -187,7 +187,11 @@ export async function main() { isError: false, }; }, - getSessionMetadata("stdio"), + { + ...getSessionMetadata("stdio"), + mcp_method: "tools/call", + tool: searchSpecToolName, + }, ); }, ); @@ -245,7 +249,11 @@ export async function main() { isError: false, }; }, - getSessionMetadata("stdio"), + { + ...getSessionMetadata("stdio"), + mcp_method: "tools/call", + tool: sectionContentToolName, + }, ); }, ); @@ -299,7 +307,11 @@ export async function main() { isError, }; }, - getSessionMetadata("stdio"), + { + ...getSessionMetadata("stdio"), + mcp_method: "tools/call", + tool: evaluateToolName, + }, ); }, );