You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/responses.md
+19-8Lines changed: 19 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -280,9 +280,9 @@ Optional. **Tool selection strategy** that controls whether and how the model us
280
280
281
281
**Specific tool objects (object with `type`):**
282
282
283
-
-`allowed_tools`: Restrict to a list of tool definitions; `mode` is `"auto"` or `"required"`, `tools` is a list of tool objects (same shapes as in [tools](#tools)).
284
-
-`file_search`: Force the model to use file search.
285
-
-`web_search`: Force the model to use web search (optionally with a variant such as `web_search_preview`).
283
+
-`allowed_tools`: Restrict to a list of tool definitions; `mode` is `"auto"` or `"required"`, `tools` is a list of key-valued filters for tools configured by `tools` attribute.
284
+
-`file_search`: Force the model to use file-only search.
285
+
-`web_search`: Force the model to use only web search.
286
286
-`function`: Force a specific function; `name` (required) is the function name.
287
287
-`mcp`: Force a tool on an MCP server; `server_label` (required), `name` (optional) tool name.
288
288
-`custom`: Force a custom tool; `name` (required).
@@ -297,16 +297,25 @@ Simple modes (string): use one of `"auto"`, `"required"`, or `"none"`.
297
297
{ "tool_choice": "none" }
298
298
```
299
299
300
-
Restrict to specific tools with `allowed_tools` (mode `"auto"` or `"required"`, plus `tools` array):
300
+
Restrict tool usage to a specific subset using `allowed_tools`. You can control behavior with the `mode` field (`"auto"` or `"required"`) and explicitly list permitted tools in the `tools` array.
301
+
302
+
The `tools` array acts as a **key-value filter**: each object specifies matching criteria (such as `type`, `server_label`, or `name`), and only tools that satisfy all provided attributes are allowed.
303
+
304
+
The example below limits tool usage to:
305
+
- the `file_search` tool
306
+
- a specific MCP tools (`tool_1` and `tool_2`) available on `server_1` (for multiple `name`s act as union)
307
+
308
+
If the `name` field is omitted for an MCP tool, the filter applies to all tools available on the specified server.
|`instructions`| string | System instructions used |
@@ -517,6 +526,8 @@ Vector store IDs are configured within the `tools` as `file_search` tools rather
517
526
518
527
**Vector store IDs:** Accepts **LCORE format** in requests and also outputs it in responses; LCORE translates to/from Llama Stack format internally.
519
528
529
+
The response includes `tools` and `tool_choice` fields that reflect the internally resolved configuration. More specifically, the final set of tools and selection constraints after internal resolution and filtering.
530
+
520
531
### LCORE-Specific Extensions
521
532
522
533
The API introduces extensions that are not part of the OpenResponses specification:
0 commit comments