Home / Servers / OpenAI API / compactconversation
Compact conversation
An MCP tool from the OpenAI API server, hosted on mcp.hjlabs.in.
Compact conversation Compact a conversation. Returns a compacted response object. Learn when and how to compact long-running conversations in the conversation state guide. For ZDR-compatible compaction details, see… [POST /responses/compact]
Name on the gateway: openai_api__compactconversation · may change things.
Parameters
| Name | Type | Description |
|---|---|---|
model required | string | Model ID used to generate the response, like gpt-6-astra. OpenAI offers a wide… |
input | string | Text, image, or file inputs to the model, used to generate a response |
previous_response_id | string | The unique ID of the previous response to the model. Use this to create… |
instructions | string | A system (or developer) message inserted into the model's context. When used… |
image | object | Request level image options. |
prompt_cache_key | string | A key to use when reading from or writing to the prompt cache. |
prompt_cache_retention | in_memory | 24h | How long to retain a prompt cache entry created by this request. |
prompt_cache_options | object | Options for prompt caching. Supported for gpt-5.6 and later models. By… |
service_tier | auto | default | fast | flex | priority | Specifies the processing type used for serving the request. - If set to… |
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__compactconversation",
"arguments": {
"model": "…"
}
}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 compact conversation tool with model set to ….