Skip to content

Commit 2a02255

Browse files
fix(api): add status, approval_request_id to MCP tool call
1 parent c5f44a2 commit 2a02255

File tree

7 files changed

+81
-3
lines changed

7 files changed

+81
-3
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 118
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-49233088b5e73dbb96bf7af27be3d4547632e3db1c2b00f14184900613325bbc.yml
3-
openapi_spec_hash: b34f14b141d5019244112901c5c7c2d8
4-
config_hash: 94e9ba08201c3d1ca46e093e6a0138fa
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-e205b1f2da6a1f2caa229efa9ede63f2d3d2fedeeb2dd6ed3d880bafdcb0ab88.yml
3+
openapi_spec_hash: c8aee2469a749f6a838b40c57e4b7b06
4+
config_hash: 45dcba51451ba532959c020a0ddbf23c

src/openai/types/conversations/conversation_item.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,25 @@ class McpCall(BaseModel):
177177
type: Literal["mcp_call"]
178178
"""The type of the item. Always `mcp_call`."""
179179

180+
approval_request_id: Optional[str] = None
181+
"""
182+
Unique identifier for the MCP tool call approval request. Include this value in
183+
a subsequent `mcp_approval_response` input to approve or reject the
184+
corresponding tool call.
185+
"""
186+
180187
error: Optional[str] = None
181188
"""The error from the tool call, if any."""
182189

183190
output: Optional[str] = None
184191
"""The output from the tool call."""
185192

193+
status: Optional[Literal["in_progress", "completed", "incomplete", "calling", "failed"]] = None
194+
"""The status of the tool call.
195+
196+
One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.
197+
"""
198+
186199

187200
ConversationItem: TypeAlias = Annotated[
188201
Union[

src/openai/types/responses/response_input_item.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,25 @@ class McpCall(BaseModel):
267267
type: Literal["mcp_call"]
268268
"""The type of the item. Always `mcp_call`."""
269269

270+
approval_request_id: Optional[str] = None
271+
"""
272+
Unique identifier for the MCP tool call approval request. Include this value in
273+
a subsequent `mcp_approval_response` input to approve or reject the
274+
corresponding tool call.
275+
"""
276+
270277
error: Optional[str] = None
271278
"""The error from the tool call, if any."""
272279

273280
output: Optional[str] = None
274281
"""The output from the tool call."""
275282

283+
status: Optional[Literal["in_progress", "completed", "incomplete", "calling", "failed"]] = None
284+
"""The status of the tool call.
285+
286+
One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.
287+
"""
288+
276289

277290
class ItemReference(BaseModel):
278291
id: str

src/openai/types/responses/response_input_item_param.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,12 +268,25 @@ class McpCall(TypedDict, total=False):
268268
type: Required[Literal["mcp_call"]]
269269
"""The type of the item. Always `mcp_call`."""
270270

271+
approval_request_id: Optional[str]
272+
"""
273+
Unique identifier for the MCP tool call approval request. Include this value in
274+
a subsequent `mcp_approval_response` input to approve or reject the
275+
corresponding tool call.
276+
"""
277+
271278
error: Optional[str]
272279
"""The error from the tool call, if any."""
273280

274281
output: Optional[str]
275282
"""The output from the tool call."""
276283

284+
status: Literal["in_progress", "completed", "incomplete", "calling", "failed"]
285+
"""The status of the tool call.
286+
287+
One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.
288+
"""
289+
277290

278291
class ItemReference(TypedDict, total=False):
279292
id: Required[str]

src/openai/types/responses/response_input_param.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,12 +269,25 @@ class McpCall(TypedDict, total=False):
269269
type: Required[Literal["mcp_call"]]
270270
"""The type of the item. Always `mcp_call`."""
271271

272+
approval_request_id: Optional[str]
273+
"""
274+
Unique identifier for the MCP tool call approval request. Include this value in
275+
a subsequent `mcp_approval_response` input to approve or reject the
276+
corresponding tool call.
277+
"""
278+
272279
error: Optional[str]
273280
"""The error from the tool call, if any."""
274281

275282
output: Optional[str]
276283
"""The output from the tool call."""
277284

285+
status: Literal["in_progress", "completed", "incomplete", "calling", "failed"]
286+
"""The status of the tool call.
287+
288+
One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.
289+
"""
290+
278291

279292
class ItemReference(TypedDict, total=False):
280293
id: Required[str]

src/openai/types/responses/response_item.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,25 @@ class McpCall(BaseModel):
175175
type: Literal["mcp_call"]
176176
"""The type of the item. Always `mcp_call`."""
177177

178+
approval_request_id: Optional[str] = None
179+
"""
180+
Unique identifier for the MCP tool call approval request. Include this value in
181+
a subsequent `mcp_approval_response` input to approve or reject the
182+
corresponding tool call.
183+
"""
184+
178185
error: Optional[str] = None
179186
"""The error from the tool call, if any."""
180187

181188
output: Optional[str] = None
182189
"""The output from the tool call."""
183190

191+
status: Optional[Literal["in_progress", "completed", "incomplete", "calling", "failed"]] = None
192+
"""The status of the tool call.
193+
194+
One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.
195+
"""
196+
184197

185198
ResponseItem: TypeAlias = Annotated[
186199
Union[

src/openai/types/responses/response_output_item.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,25 @@ class McpCall(BaseModel):
9393
type: Literal["mcp_call"]
9494
"""The type of the item. Always `mcp_call`."""
9595

96+
approval_request_id: Optional[str] = None
97+
"""
98+
Unique identifier for the MCP tool call approval request. Include this value in
99+
a subsequent `mcp_approval_response` input to approve or reject the
100+
corresponding tool call.
101+
"""
102+
96103
error: Optional[str] = None
97104
"""The error from the tool call, if any."""
98105

99106
output: Optional[str] = None
100107
"""The output from the tool call."""
101108

109+
status: Optional[Literal["in_progress", "completed", "incomplete", "calling", "failed"]] = None
110+
"""The status of the tool call.
111+
112+
One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.
113+
"""
114+
102115

103116
class McpListToolsTool(BaseModel):
104117
input_schema: object

0 commit comments

Comments
 (0)