[exec] Add MCP tool arguments and results (#5899)
Extends mcp_tool_call item to include arguments and results.
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
"prepare": "pnpm run build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@modelcontextprotocol/sdk": "^1.20.2",
|
||||
"@types/jest": "^29.5.14",
|
||||
"@types/node": "^20.19.18",
|
||||
"eslint": "^9.36.0",
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// based on item types from codex-rs/exec/src/exec_events.rs
|
||||
|
||||
import type { ContentBlock as McpContentBlock } from "@modelcontextprotocol/sdk/types.js";
|
||||
|
||||
/** The status of a command execution. */
|
||||
export type CommandExecutionStatus = "in_progress" | "completed" | "failed";
|
||||
|
||||
@@ -53,6 +55,17 @@ export type McpToolCallItem = {
|
||||
server: string;
|
||||
/** The tool invoked on the MCP server. */
|
||||
tool: string;
|
||||
/** Arguments forwarded to the tool invocation. */
|
||||
arguments: unknown;
|
||||
/** Result payload returned by the MCP server for successful calls. */
|
||||
result?: {
|
||||
content: McpContentBlock[];
|
||||
structured_content: unknown;
|
||||
};
|
||||
/** Error message reported for failed calls. */
|
||||
error?: {
|
||||
message: string;
|
||||
};
|
||||
/** Current status of the tool invocation. */
|
||||
status: McpToolCallStatus;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user