mirror of
https://github.com/bendtherules/ask262.git
synced 2026-08-18 13:21:55 +00:00
feat(mcp-server): enhance session metadata with method and tool information
This commit is contained in:
@@ -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",
|
||||
{
|
||||
|
||||
+15
-3
@@ -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,
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user