ChatML Formatter
Convert a conversation into ChatML, Llama 3, Mistral, Gemma or Alpaca prompt templates.
Write valid tool-calling JSON schemas without hand-editing braces.
Lowercase, verb first, underscores. This is the identifier your code dispatches on.
The model decides whether to call your tool from this sentence alone. Say what it does and when to use it.
Parameter descriptions are prompt text, not documentation. "The city and state, for example San Francisco, CA" gets filled in reliably; "city" does not.
The Function Schema Generator writes valid tool-calling JSON schemas from a list of parameters, correctly nested and correctly quoted. The same definition is emitted in three shapes: the OpenAI tools format, the Anthropic tools format with its input schema, and bare JSON Schema for anything else.
Tool calling lives or dies on the schema. Get the JSON right and the model fills in arguments you can pass straight to your code; get it subtly wrong and you spend an afternoon reading validation errors. Add your parameters as rows — name, type, description, required, allowed values — and the schema is written for you, correctly nested and correctly quoted.
The same definition is emitted in three shapes: the OpenAI tools format, the Anthropic tools format with its input schema, and bare JSON Schema for anything else. One thing worth taking seriously is the description field on each parameter. The model reads those descriptions as instructions — they are the only thing telling it what a value means and when to supply it — so a parameter described as "the city, for example San Francisco, CA" gets filled in far more reliably than one described as "city".
OpenAI tools, Anthropic tools with input_schema, and bare JSON Schema, generated from one definition.
Name, type, description, required flag and allowed values are entered as fields rather than hand-edited braces.
Restrict a parameter to a fixed set of values so the model cannot invent one.
The model reads each parameter description as guidance, so "the city, for example San Francisco, CA" gets filled in far more reliably than "city".
Nesting and quoting are handled for you, which removes an afternoon of reading validation errors.
Use a short verb-led name and describe what it does. The model decides whether to call it from this description.
Add a row per parameter with its type, a real description, and whether it is required.
For a fixed set of options, list the allowed values so the model cannot invent one.
Switch between the OpenAI, Anthropic and plain JSON Schema output and copy the one your SDK expects.
Mostly the wrapper. OpenAI nests the definition under a function object with a parameters key; Anthropic puts name and description at the top level with an input_schema key. The JSON Schema inside is the same in both.
A great deal. The function description decides whether the model calls your tool at all, and each parameter description decides whether it fills the argument correctly. They are prompt text, not documentation, and vague ones are the usual cause of bad tool calls.
No. Mark as required only what your code genuinely cannot run without. Over-marking forces the model to invent values it does not have, which is worse than an absent field your code can default.
It restricts a parameter to a fixed list of allowed values. Use it for units, statuses and modes — anything with a closed set — and the model will pick from your list instead of inventing a variant your code does not handle.
What people who use the Function Schema Generator think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the Function Schema Generator. It takes half a minute and no account.
Write the first reviewConvert a conversation into ChatML, Llama 3, Mistral, Gemma or Alpaca prompt templates.
See whether your text fits a model context window, and how much room is left.
Turn input and output pairs into a clean, consistent few-shot prompt block.
Turn conversations.json from a ChatGPT or Claude export into readable Markdown files.
Turn question and answer pairs into a JSONL training file for OpenAI, Llama or Gemini.
Estimate the cost and vector storage of embedding a document corpus for RAG.
Build a chat API request for OpenAI, Claude, Gemini, Groq or Ollama in cURL, Python, JS or PHP.
Estimate how many tokens your text costs before you send it.