Migrate Tool-Calling Schemas Across OpenAI, Claude, and Gemini
Convert your existing function definitions into native OpenAI, Anthropic Claude, and Google Gemini tool specs with a schema compatibility matrix.
Text prompt for Claude and Gemini
You get: Compatibility Matrix, openAI Tool Spec and anthropic Claude Tool Spec
Prompt
Act as a staff AI platform engineer who maintains multi-provider LLM gateways.
I will paste one or more existing tool-calling or function-calling definitions below this prompt, along with my current provider. Your job is to translate them into native tool specifications for OpenAI, Anthropic Claude, and Google Gemini while preserving parameter semantics and flagging schema incompatibilities.
Follow these rules:
1. Map every top-level wrapper field accurately, including OpenAI strict mode requirements, Claude input_schema formatting, and Gemini functionDeclarations types.
2. Flag every unsupported or risky JSON Schema keyword such as oneOf, anyOf, allOf, patternProperties, default, or additionalProperties in a compatibility matrix.
3. For OpenAI strict mode, ensure every object sets additionalProperties to false and lists all properties in required, converting optional fields to nullable types where needed.
4. Keep parameter names, descriptions, and enum values identical across providers unless a provider constraint forces a change, and document any forced change explicitly.
5. Output the translated tool definitions in clean YAML so they are easy to diff and convert to JSON or SDK objects.
Output format:
1. Compatibility Matrix (Markdown table with columns: Keyword or Feature, OpenAI, Claude, Gemini, Required Workaround)
2. OpenAI Tool Spec (YAML)
3. Anthropic Claude Tool Spec (YAML)
4. Google Gemini Tool Spec (YAML)
5. Migration Risks and Verification Checklist (3-5 concrete checks to run in unit tests)
End with one line listing any assumptions made about SDK versions, strict-mode settings, or missing parameter constraints.Example output
Tips and common edits
Why this works
- Forces an explicit compatibility matrix for tricky JSON Schema keywords like oneOf and additionalProperties before generating code.
- Enforces OpenAI strict-mode rules automatically by converting optional fields to nullable required fields.
- Adds a concrete unit-test verification checklist so subtle null-versus-omitted mismatches do not break production handlers.
Use this when porting agent tools across OpenAI, Claude, or Gemini in ChatGPT, Claude, or Gemini. Paste your current tool definition in JSON, YAML, or TypeScript right after the prompt, and note whether you need OpenAI strict mode.
Common edits
- Ask for Pydantic or Zod source definitions instead of YAML if you generate provider schemas from a single typed model.
- Remove one provider section if you are only migrating from OpenAI to Claude or from Claude to Gemini.
Reuse it: Use in a workflowTurn into a skillAdapt in the builder
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
More like this
Structured JSON Output Conformance Tester with Retry and Repair Across Providers
Prompt Codex to build a test script that checks whether each model returns schema-valid JSON for your inputs, using each provider's native structured output feature, with measured retry and repair rates.
Provider-Agnostic LLM Client Adapter for OpenAI, Claude, and Gemini
Have Codex build a thin, config-driven client that normalizes requests, responses, errors, and token usage across several model providers, so switching models becomes a config change instead of a rewrite.
Restructure Production Prompts for Cross-Provider Prompt Caching
Get a refactored prompt layout separating static prefixes from dynamic inputs, plus a token cache-hit savings table for OpenAI, Anthropic, and Gemini.
Audit AI Prompts for Universal Compatibility and Portability
Identify vendor-specific jargon and rewrite your prompts into universal instructions that work consistently across ChatGPT, Claude, and Gemini.
Create Automated Regression Test Suites for AI Prompt Migrations
Generate a rigorous test suite to validate prompt stability across model versions by focusing on negative edge cases and output schema adherence.
Migrate OpenAI System Prompts to Claude XML Format
Convert your existing OpenAI instructions into optimized XML-tagged blocks for Claude that improve instruction adherence and context parsing.
- Harden JSON Extraction with Strict Null and Fallback Rules
- Convert Complex System Prompts into Few-Shot Training Pairs
- Calculate Context Window Budgets for Long-Document Prompts
- Convert Few-Shot Prompts to Claude Assistant Prefill Format
- Optimize Multi-Step Prompt Chains to Cut Latency and Spend
- Map Application Features to AI Model Tiers