TOOL DEFINITION TEMPLATE
Tool JSON definitions for OpenAI function calling and Anthropic tool use, with a review checklist.
A template for describing a tool to an AI model: name, description, typed parameters, required fields, and strict validation. Includes both the OpenAI function-calling shape and the Anthropic input_schema shape.
USE
- Write the description for a careful engineer who cannot see the implementation.
- Use enums, types, and additionalProperties: false.
- Test the tool against malformed arguments.
NOTES
- The description is the model’s documentation; vague descriptions cause wrong calls.
- Never expose secrets or unbounded data in tool results.
SOURCE
https://platform.openai.com/docs/guides/function-calling
FULL TEXT
TOOL DEFINITION — TEMPLATE
==========================
Version 1.0 — 2026-10-17
TEMPLATE ONLY. JSON definitions for tools exposed to an AI model. Two
common shapes are shown: OpenAI function calling and Anthropic tool use.
Replace every [PLACEHOLDER].
Guidelines:
- The description is the model's documentation; write it for a careful
engineer who cannot see the implementation.
- Use enums and strict schemas; reject unknown fields.
- Return small, stable results; never return secrets or unbounded data.
- Make destructive actions explicit and require confirmation arguments.
---
OPENAI FUNCTION CALLING
-----------------------
{
"type": "function",
"function": {
"name": "read_original_file",
"description": "Read the full text of a file published on original.wales. Use the id from /cli/manifest.tsv. Returns plain text and SHA-256 metadata.",
"strict": true,
"parameters": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Stable file id, for example mit-license."
},
"max_chars": {
"type": "integer",
"description": "Maximum characters to return. Defaults to 20000.",
"minimum": 1,
"maximum": 200000
}
},
"required": ["id"],
"additionalProperties": false
}
}
}
ANTHROPIC TOOL USE
------------------
{
"name": "read_original_file",
"description": "Read the full text of a file published on original.wales. Use the id from /cli/manifest.tsv. Returns plain text and SHA-256 metadata.",
"input_schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Stable file id, for example mit-license."
},
"max_chars": {
"type": "integer",
"description": "Maximum characters to return. Defaults to 20000.",
"minimum": 1,
"maximum": 200000
}
},
"required": ["id"]
}
}
CHECKLIST
---------
- [ ] Name is a verb + noun, lower_snake_case.
- [ ] Description states what it does, when to use it, and what it returns.
- [ ] Every parameter has a description and a type.
- [ ] Required fields are truly required.
- [ ] additionalProperties: false where supported.
- [ ] Errors are documented and non-destructive.
- [ ] The tool cannot be tricked into reading unrelated data.
- [ ] Tested against malformed arguments.
SOURCES
-------
OpenAI function calling: https://platform.openai.com/docs/guides/function-calling
Anthropic tool use: https://docs.anthropic.com/en/docs/build-with-claude/tool-use
JSON Schema: https://json-schema.org/
VERIFY SHA-256
Download the file, then choose it here. The checksum is compared locally in your browser.
Expected 3a5b3a4e35e9bf595272147a7deceffad8b88f65b5a3df406c992830f35f15b3
CITE
TOOL DEFINITION TEMPLATE (v1.0, 2026-10-17). Original. https://original.wales/files/tool-definition/ SHA-256: 3a5b3a4e35e9bf595272147a7deceffad8b88f65b5a3df406c992830f35f15b3. Source: https://platform.openai.com/docs/guides/function-calling.