Skip to content

Commit 75e6a00

Browse files
committed
Fix tool call schema
1 parent 2c9f9dd commit 75e6a00

1 file changed

Lines changed: 16 additions & 9 deletions

File tree

docs/protocol/prompt-turn.mdx

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,10 @@ If the model requested tool calls, these are also reported:
8080
"sessionId": "sess_abc123def456",
8181
"update": {
8282
"sessionUpdate": "tool_call",
83-
"id": "call_001",
84-
"name": "analyze_code",
85-
"arguments": {
86-
"code": "def process_data(items):\n for item in items:\n print(item)",
87-
"language": "python"
88-
}
83+
"toolCallId": "call_001",
84+
"title": "Analyzing Python code",
85+
"kind": "other",
86+
"status": "pending"
8987
}
9088
}
9189
}
@@ -110,6 +108,7 @@ Agents **MAY** stop the turn at any point by returning the corresponding [`StopR
110108
### 5. Tool Invocation and Status Reporting
111109

112110
If tool calls were requested, the Agent invokes each tool and reports their execution status to the Client via `session/update` notifications.
111+
113112
```json
114113
{
115114
"jsonrpc": "2.0",
@@ -118,9 +117,17 @@ If tool calls were requested, the Agent invokes each tool and reports their exec
118117
"sessionId": "sess_abc123def456",
119118
"update": {
120119
"sessionUpdate": "tool_call_update",
121-
"id": "call_001",
122-
"status": "success",
123-
"output": "Analysis complete:\n- No syntax errors found\n- Consider adding type hints for better clarity\n- The function could benefit from error handling for empty lists"
120+
"toolCallId": "call_001",
121+
"status": "completed",
122+
"content": [
123+
{
124+
"type": "content",
125+
"content": {
126+
"type": "text",
127+
"text": "Analysis complete:\n- No syntax errors found\n- Consider adding type hints for better clarity\n- The function could benefit from error handling for empty lists"
128+
}
129+
}
130+
]
124131
}
125132
}
126133
}

0 commit comments

Comments
 (0)