When I configure OpenAI’s API key in Cursor and use Cursor’s agent mode, it returns the error message 'Missing required parameter: ‘tools[0].name’. No matter whether I switch to plan or ask, this error message still appears.
Steps to Reproduce
configure OpenAI’s API key in Cursor and use Cursor’s agent mode
Operating System
Linux
Current Cursor Version (Menu → About Cursor → Copy)
This error is often related to MCP servers. We also saw a similar issue recently with GPT-5.2 in Agent mode.
Please try the following:
Disable MCP servers (if you have any configured). Check Cursor Settings → Tools & MCP, or your .cursor/mcp.json.
Run Network Diagnostics: Cursor Settings → Network → Run Diagnostics, then share the results.
Enable “Disable HTTP/2”: App Settings Ctrl+, → search for “HTTP/2” → turn on the option.
Make sure you’re using the official OpenAI API endpoint, not a custom proxy or overridden base URL.
Let me know whether disabling MCP servers helps. If the issue persists, please share the Network Diagnostics output and confirm whether you’re using Override OpenAI Base URL.
tools (concept is supported, but your tools schema is wrong; see “Tools schema” below)
tool_choice
stream
input (Chat Completions uses messages, not input)
user
store
prompt_cache_retention
metadata
reasoning
Standard for /v1/responses
model
input
tools (concept is supported, but your tools schema is wrong; see “Tools schema” below)
tool_choice
stream
metadata (commonly supported; verify with the exact API version/provider/gateway you use)
store (may exist in some setups; verify)
reasoning (model/SDK dependent; verify)
text (model/SDK dependent; verify)
prompt_cache_retention (not standard in public OpenAI schema)
stream_options (not standard in public OpenAI schema)
user (generally not part of the standard Responses request body; use metadata or your own app layer instead)
———
Tools schema (your biggest breaking issue for BOTH endpoints)
Your tools entries are shaped like:
tools[i].type = “function”
tools[i].name
tools[i].description
tools[i].parameters
OpenAI expects function tools shaped like:
tools[i].type = “function”
tools[i].function.name (required)
tools[i].function.description
tools[i].function.parameters
Also, you included a tool with:
tools[i].type = “custom” (e.g. apply_patch) → not an OpenAI-native tool type.
This mismatch is why validation fails with errors like Missing required parameter: ‘tools[0].name’ (depending on the gateway/version, the validator may reference tools[0].name even though the actual correct field is tools[0].function.name).
———
I’ve already removed MCP and am using HTTP/1.1. Network diagnostics show no problems. It seems the cursor’s request parameters aren’t very accurate. I can configure the OpenAI API key in tools like Chatbox without any issues. I’m not sure if ChatGPT’s analysis is correct, but I don’t want to waste time on this usage method. Thank you.
Thanks for the detailed technical analysis, your conclusions are absolutely correct.
This is a known issue when using GPT-5.2 in Agent mode with a custom OpenAI API key. Cursor sends requests in the OpenAI Responses API format (which uses fields like reasoning, input, metadata), but the tools schema doesn’t match the standard format. It uses tools[i].name instead of tools[i].function.name, and it also sends custom tool types (for example type: "custom" for apply_patch) that aren’t supported by the standard OpenAI API.
The team is already working on this, but for now Agent mode with GPT-5.2 via BYOK OpenAI API isn’t properly supported.