System Prompt & Tool-Calling Builder

Compose a structured agent system prompt and emit a function-calling tools array. Pick personas, goals, constraints and output contracts, then copy production-ready blocks.

Tools (function calling)

0 tools selected

Generated System Prompt

Tools Array (JSON Schema)

Professional Insights & Guide

The anatomy of production system prompts and function-calling schemas, with real rules for stable agents.

Core Use Case scenario

An agent system prompt has five parts: the persona it adopts, the goal it optimizes for, the context it can assume, the constraints it must respect, and the output format it must obey. Function calling adds a sixth layer: a tools array, where each tool is a JSON object with a name, a description, and a parameters schema. The model reads these schemas and, when it needs external capability, emits a structured tool call instead of free text, which the host application executes and feeds back.

Troubleshooting & Edge-Case Failure Points

  • Vague personas invite scope creep: a role that is not tied to a measurable goal drifts off-task.
  • Unbounded tools: exposing every tool to every agent increases hallucinated calls and permission risk.
  • Missing output contract: free-form answers break parsers that expect strict Markdown, XML, or JSON.
  • Duplicate or conflicting tool names break schema validation and confuse the model's tool selection.

Detailed Step-by-Step Instructions

  1. Enter a concrete role/persona and a measurable goal for the agent.
  2. Add context the agent can rely on and one constraint per line to bound its behavior.
  3. Choose the output format — Markdown, XML, or JSON — to fix the response contract.
  4. Check the tools the agent may call; each selection contributes a full function schema.
  5. Press Generate Prompt Blocks, review both outputs, and copy the system prompt, the tools array, or the full payload.

Schema Rules Used

{
  "type": "function",
  "function": {
    "name": "web_search",
    "description": "Search the web for up-to-date facts…",
    "parameters": {
      "type": "object",
      "properties": { "query": { "type": "string" } },
      "required": ["query"]
    }
  }
}
prompt_tokens  ≈ words * 1.33        // rough system prompt cost
format_contract: Markdown | XML | JSON

How to Use the System Prompt & Tool-Calling Builder

Composes production agent prompts - persona, goal, context, constraints, output format - and emits JSON tool schemas for function calling.

  1. Define the agent role, goal, hard constraints.
  2. Add the output contract: format, length, refusal behavior.
  3. Generate the prompt plus function-calling schemas.

System Prompts Are APIs

Identity, Capabilities, Rules, I/O contract, Examples

Treat the system prompt as an interface spec: sections in fixed order (identity, capabilities, rules, I/O contract, examples) test better than prose paragraphs. For tool-calling, the JSON schema is the UX: parameter descriptions get read literally - "zip_code: string" gets extensions; "5-digit US ZIP, no extension" gets compliance. Version prompts like code, keep a small eval set, and specify refusal/edge behavior - unspecified failures are the ones you get.

System Prompt & Tool-Calling Builder FAQ

What belongs in a system vs user message?

Durable rules and persona in system; per-run data in user. System messages carry persistent weight across turns.

Why do tool calls arrive with wrong arguments?

Schema descriptions are instructions the model reads literally. Specify formats, units, and examples in each parameter description.

How long can a system prompt be?

Under ~2k tokens practically. Every token costs every call, and instruction-following degrades as rules pile up.

Deep-dive guides