Home / Servers / OpenAI API / create_agent_environment_file
Write an agent environment file
An MCP tool from the OpenAI API server, hosted on mcp.hjlabs.in.
Write an agent environment file Copies inline bytes or a Files API file into a connected execution environment, replacing an existing regular file at the same path. Upload between turns and wait for success before starting the… [POST /agents/environments/{environment_id}/files]
Name on the gateway: openai_api__create_agent_environment_file · may change things.
Parameters
| Name | Type | Description |
|---|---|---|
environment_id required | string | The ID of the environment. |
type required | file_id | The type of the object. Always file_id. |
file_id required | string | The ID of the uploaded file. |
path required | string | The absolute destination path inside /workspace. |
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__create_agent_environment_file",
"arguments": {
"environment_id": "…",
"type": "…",
"file_id": "…",
"path": "…"
}
}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 write an agent environment file tool with environment_id set to ….