Home / Servers / OpenAI API / create_run

Create run

An MCP tool from the OpenAI API server, hosted on mcp.hjlabs.in.

Create run Create a run. [POST /threads/{thread_id}/runs]

Name on the gateway: openai_api__create_run · may change things.

Parameters

NameTypeDescription
thread_id requiredstringThe ID of the thread to run.
include[]arrayA list of additional fields to include in the response. Currently the only…
assistant_id requiredstringThe ID of the assistant to use to execute this run.
modelstringThe ID of the Model to be used to execute this run. If a value is provided…
reasoning_effortnone | minimal | low | medium | high | xhigh | maxConstrains effort on reasoning for reasoning models. Currently supported…
instructionsstringOverrides the instructions of the assistant. This is useful for modifying the…
additional_instructionsstringAppends additional instructions at the end of the instructions for the run.…
additional_messagesarrayAdds additional messages to the thread before creating the run.
toolsarrayOverride the tools the assistant can use for this run. This is useful for…
metadataobjectSet of 16 key-value pairs that can be attached to an object. This can be…
temperaturenumberWhat sampling temperature to use, between 0 and 2. Higher values like 0.8 will…
top_pnumberAn alternative to sampling with temperature, called nucleus sampling, where…
streambooleanIf true, returns a stream of events that happen during the Run as server-sent…
max_prompt_tokensintegerThe maximum number of prompt tokens that may be used over the course of the…
max_completion_tokensintegerThe maximum number of completion tokens that may be used over the course of…
truncation_strategyobjectControls for how a thread will be truncated prior to the run. Use this to…
tool_choiceobjectControls which (if any) tool is called by the model. none means the model will…
parallel_tool_callsbooleanWhether to enable parallel function calling during tool use.
response_formatobjectSpecifies the format that the model must output. Compatible with GPT-4o, GPT-4…

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:

call_tool arguments
{
  "name": "openai_api__create_run",
  "arguments": {
    "thread_id": "…",
    "assistant_id": "…"
  }
}

Or connect the OpenAI API server directly, which lists 371 tools including this one:

Run in your terminal
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 create run tool with thread_id set to ….

More from OpenAI API