description: str

A description of the namespace shown to the model.

name: str

The namespace name used in tool calls (for example, crm).

minLength1
tools: List[Tool]

The function/custom tools available inside this namespace.

One of the following:
class ToolFunction: …
name: str
minLength1
maxLength128
type: Literal["function"]
allowed_callers: Optional[List[Literal["direct", "programmatic"]]]

The tool invocation context(s).

One of the following:
"direct"
"programmatic"
async_: Optional[bool]

Whether the tool response can be returned asynchronously versus immediately returned on next response creation.

defer_loading: Optional[bool]

Whether this function should be deferred and discovered via tool search.

description: Optional[str]
output_schema: Optional[Dict[str, object]]

A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

parameters: Optional[object]
strict: Optional[bool]

Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

class BetaCustomTool: …

A custom tool that processes input using a specified format. Learn more about custom tools

name: str

The name of the custom tool, used to identify it in tool calls.

type: Literal["custom"]

The type of the custom tool. Always custom.

allowed_callers: Optional[List[Literal["direct", "programmatic"]]]

The tool invocation context(s).

One of the following:
"direct"
"programmatic"
async_: Optional[bool]

Whether the tool response can be returned asynchronously versus immediately returned on next response creation.

defer_loading: Optional[bool]

Whether this tool should be deferred and discovered via tool search.

description: Optional[str]

Optional description of the custom tool, used to provide more context.

format: Optional[Format]

The input format for the custom tool. Default is unconstrained text.

One of the following:
class FormatText: …

Unconstrained free-form text.

type: Literal["text"]

Unconstrained text format. Always text.

class FormatGrammar: …

A grammar defined by the user.

definition: str

The grammar definition.

syntax: Literal["lark", "regex"]

The syntax of the grammar definition. One of lark or regex.

One of the following:
"lark"
"regex"
type: Literal["grammar"]

Grammar format. Always grammar.

type: Literal["namespace"]

The type of the tool. Always namespace.