Skip to main content
ReferenceTool normalization

Tool Format Normalization

The marketplace normalizes tool definitions from different clients before forwarding to providers.

Supported Formats

OpenAI standardFormat · { type: "function", function: { name, ... } }Action · Pass through
Cursor minimalFormat · { function: { name, ... } } (no type)Action · Add type: "function"
Anthropic-nativeFormat · { name, description, input_schema }Action · Convert to OpenAI format
Top-level OpenAIFormat · { type: "function", name, parameters }Action · Wrap in function object
  • OpenAI function tool
  • Anthropic tool
  • Legacy function block
  • Provider-specific shape
One canonical function toolwhat the seller actually receives
Non-function toolsdropped, and tool_choice resets to auto
Whatever shape you send is normalised to the canonical OpenAI function tool. Anything that is not a function tool has nothing to normalise into.

Non-Function Tools

Cursor sends non-function tools that most providers reject:

  • computer_20241022
  • text_editor_20241022
  • bash_20241022

These are stripped before forwarding. If a tool_choice was forcing a stripped tool, it's reset to auto.

Strict Validation

  • typeof name === 'string' (not just truthiness)
  • Tools with invalid structure are rejected, not forwarded
  • Applied identically to both streaming and non-streaming endpoints
  • 19 dedicated unit tests cover all formats

Why This Matters

Without normalization, Cursor users would get 400 errors from most providers. The marketplace handles it transparently — you just use Cursor normally.