Tool-Use Function Calling Prompt Builder

Build OpenAI/Anthropic function-calling prompts with tool schemas

Ad placeholder (leaderboard)

Tool-use function calling prompt builder

Function calling (tool use) is how you let a model trigger real actions — querying a database, hitting an API, doing math reliably. The hard part is getting the schema exactly right, because OpenAI and Anthropic structure their tools differently and a malformed schema fails silently or causes wrong calls. This builder takes a plain-English description of your tool and emits the correctly structured tools array and a starter system prompt for whichever provider you target.

How it works

You enter the tool’s name, a description of when the model should call it, and its parameters — each with a name, type, description, and a required flag. The builder assembles a valid JSON Schema for the inputs and wraps it in the right envelope: OpenAI nests it under function with a parameters schema, while Anthropic uses a flat object with input_schema. It also generates a short system prompt reminding the model when to use the tool. The output is copy-paste-ready JSON you drop into your own API call; nothing is sent anywhere and your API key never touches this page.

Tips and example

Spend your effort on the descriptions — both the tool’s and each parameter’s — because they are the only thing the model reads to decide what to call and with what arguments. “get_weather: returns current weather for a city; call when the user asks about weather or temperature” beats “weather tool” every time. Mark only genuinely required parameters as required, so the model can omit optional context without inventing values. For complex nested inputs, generate the base schema here and extend the JSON by hand — the output is standard JSON Schema, so it composes cleanly with whatever structure your API needs.

Ad placeholder (rectangle)