Agent

Tool-calling schema example

agent systems · works with GPT-4o · via GitHub

The prompt

Define each tool as: {"name": string, "description": string, "parameters": {JSON Schema}}. Pass the array of tool definitions alongside the system prompt — most agent frameworks expect this exact shape.

Expected result

The model only calls tools using names and parameter shapes that exactly match your schema, instead of inventing plausible-looking but nonexistent calls.

Why it works

This is the de facto shape most function-calling APIs expect — matching it exactly avoids silent schema-validation failures downstream.

Open in PrompVite to copy, rate, and discuss this prompt →