Skip to main content
Glama
Infinite LLM Auto-Fallback Router

Infinite LLM Auto-Fallback Router

convert_anthropic_to_openai

Translate Anthropic /v1/messages request payloads into OpenAI-compatible /v1/chat/completions format for cross-provider LLM routing.

Instructions

Translate an Anthropic /v1/messages request payload into an OpenAI-compatible /v1/chat/completions payload.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "messages": "<messages>"
    },
    "name": "convert_anthropic_to_openai"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoTarget model identifier.
streamNo
systemNoOptional system prompt.
messagesYesList of Anthropic message objects ({role, content}).
max_tokensNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.0

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It does not say whether this is a pure local transformation or makes a network call, whether unmappable Anthropic features (tool_use blocks, images, thinking) are dropped or error out, or whether the input is validated/mutated. Only the direction of translation is disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One sentence, front-loaded with the verb and both ends of the conversion, with zero filler. Nothing is redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter transformation tool with no annotations and no output schema, the description establishes the contract but leaves key operational facts (lossy vs. lossless conversion, error behavior, output shape) unstated. Adequate to identify the tool, insufficient to predict what comes back.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 60%, and the description adds nothing about parameters. Notably 'stream' and 'max_tokens' fall outside the schema's own descriptions, and the description gives no hint on defaults, model mapping behavior, or whether 'system' is hoisted into the OpenAI messages array.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb (Translate) and two precise resources (Anthropic /v1/messages payload -> OpenAI /v1/chat/completions payload). This is clearly distinct from routing or health-check siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The transformation direction is stated, which implies when to use it (when you hold an Anthropic-shaped request and need an OpenAI-shaped one). There is no explicit when-not guidance, no mention of whether the output should then be fed to route_chat_completion, and no statement about unsupported fields.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.