Skip to main content
PUT
Update custom tool
Updates a custom tool in place. Every field is optional and anything you leave out is untouched. The tool stays on the same assistant, and stays a custom tool.

Path parameters

string
required
UUID of the custom tool. A native tool’s id answers 404 NOT_FOUND: change those with Update native tool.

Body

At least one field is required. The rules are those of Create custom tool; what is different on an update is below.
string
A new name. It is checked against the reserved names and the assistant’s other tools only when it changes, so sending the current name back is always fine.
string | null
null clears it.
string
A new endpoint. null is read as “not sent”: a custom tool always has one.
string
GET or POST. null is read as “not sent”.
object
The tool’s whole set of headers: a header you leave out is removed, and {} removes them all. A value of "********", which is what a read returns, keeps the value saved under that same header name (matched exactly, case included); any other value replaces it. null is read as “not sent” and keeps the headers as they are.
object | null
A new argument schema. null or {} makes it a tool that takes no arguments.
number
5–300. null is read as “not sent”.
string | null
blocking or non_blocking. null goes back to the default, blocking.
string | null
when_idle or silent. null goes back to the default, when_idle. The rule that it needs tool_behavior: "non_blocking" is checked against the tool as it would be saved: the stored values plus your changes.
agent_id, is_native and any other field are ignored.

Keeping a saved header

Read the tool, change what you need, and send headers back as you read them. The "********" values keep their saved secrets:
Here Authorization keeps its saved value, X-Region is added, and every other header the tool had is removed. "********" under a name the tool has no saved value for is refused, because there is nothing for it to stand for. That happens, for example, when you rename Authorization to X-Api-Key and keep the placeholder: send the real value under the new name.

Request

Response

200 OK with the updated tool object, every header value masked.

Errors