File tree Expand file tree Collapse file tree 3 files changed +21
-8
lines changed
src/agentscope_runtime/engine/schemas Expand file tree Collapse file tree 3 files changed +21
-8
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ class MessageType:
5353 MCP_APPROVAL_REQUEST = "mcp_approval_request"
5454 MCP_TOOL_CALL = "mcp_call"
5555 MCP_APPROVAL_RESPONSE = "mcp_approval_response"
56+ MCP_TOOL_CALL_OUTPUT = "mcp_call_output"
5657 REASONING = "reasoning"
5758 HEARTBEAT = "heartbeat"
5859 ERROR = "error"
Original file line number Diff line number Diff line change @@ -53,7 +53,8 @@ class MessageType:
5353 MCP_APPROVAL_REQUEST = "mcp_approval_request"
5454 MCP_TOOL_CALL = "mcp_call"
5555 MCP_APPROVAL_RESPONSE = "mcp_approval_response"
56- REASONING = "reasoning" # 新增:推理过程消息类型
56+ MCP_TOOL_CALL_OUTPUT = "mcp_call_output"
57+ REASONING = "reasoning"
5758 HEARTBEAT = "heartbeat"
5859 ERROR = "error"
5960
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ class MessageType:
2727 MCP_APPROVAL_REQUEST = "mcp_approval_request"
2828 MCP_TOOL_CALL = "mcp_call"
2929 MCP_APPROVAL_RESPONSE = "mcp_approval_response"
30+ MCP_TOOL_CALL_OUTPUT = "mcp_call_output"
3031 REASONING = "reasoning"
3132 HEARTBEAT = "heartbeat"
3233 ERROR = "error"
@@ -152,22 +153,32 @@ class FunctionCallOutput(BaseModel):
152153
153154
154155class McpCall (BaseModel ):
155- id : str
156+ """
157+ MCP TOOL CALL MESSAGE BODY
158+ """
159+
160+ call_id : Optional [str ] = None
156161 """The unique ID of the tool call."""
157162
158- arguments : str
163+ arguments : Optional [ str ] = None
159164 """A JSON string of the arguments passed to the tool."""
160165
161- name : str
166+ name : Optional [ str ] = None
162167 """The name of the tool that was run."""
163168
164- server_label : str
169+ server_label : Optional [ str ] = None
165170 """The label of the MCP server running the tool."""
166171
167- error : Optional [str ] = None
168- """The error from the tool call, if any."""
169172
170- output : Optional [str ] = None
173+ class McpCallOutput (BaseModel ):
174+ """
175+ MCP TOOL CALL OUTPUT MESSAGE BODY
176+ """
177+
178+ call_id : str
179+ """The unique ID of the tool call."""
180+
181+ output : str
171182 """The output from the tool call."""
172183
173184
You can’t perform that action at this time.
0 commit comments