Home / Servers / OpenAI API / update_agent_session
Update an agent session
An MCP tool from the OpenAI API server, hosted on mcp.hjlabs.in.
Update an agent session Updates session tools, metadata, model, reasoning effort, or service tier. Model settings apply to subsequent turns. Omitted fields are unchanged. See managing sessions. [POST /agents/sessions/{session_id}]
Name on the gateway: openai_api__update_agent_session · may change things.
Parameters
| Name | Type | Description |
|---|---|---|
session_id required | string | The ID of the session. |
review | none | auto_review | Default action review for new root turns. Existing turns and their subagents… |
agent | object | Agent settings to update on this session. Omitted fields stay unchanged. |
metadata | object | Replaces all metadata. Omit to leave unchanged, or pass null or {} to clear… |
How to call it
Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:
{
"name": "openai_api__update_agent_session",
"arguments": {
"session_id": "…"
}
}Or connect the OpenAI API server directly, which lists 371 tools including this one:
claude mcp add --transport http hj-openai-api https://mcp.hjlabs.in/mcp/openai-api \
--header "Authorization: Bearer YOUR_API_KEY"Try asking
Use the update an agent session tool with session_id set to ….