Tool Specification for a Legal AI Agent
Produces a complete agent tool definition — schema, description, errors, permissions — with emphasis on tools that perform irreversible actions.
Prompt
Design an agent tool definition. The tool will be called by a model that cannot see the implementation — the description and schema are all it has.
What the tool does: [description] Target system: [API / database / filesystem] Is the action reversible: [yes / no]
Produce:
- Tool name — verb_noun, explicit. Avoid generic names like process or handle.
- Description — two to four lines answering: what it does, when to use it, and explicitly when not to. Most agent failures are wrong tool selection, not wrong parameters.
- Parameter schema — JSON Schema with type, description, and required for every field. Every parameter description must include an example. Use enum instead of free-form strings wherever possible.
- Return schema — what comes back on success, including the fields the model needs to decide its next step.
- Errors — every error state with a message the model can act on. "Error 500" is useless; "no client found with that id — verify the id or search by name" enables recovery.
- Permissions and approval — if the action is irreversible, writes data, sends externally, or costs money: require explicit approval. Specify what is shown to the approver before execution.
- Limits — rate limit, max size, timeout, and how many consecutive calls are permitted.
- Three valid call examples and two invalid ones with the error each returns.
Why this converts well
- Ready to copy and use immediately
- Tailored for legal and public-sector work
- Easy to adapt to internal workflows
Tags
Related Prompts
Designing a Structured Output Schema for Legal Data
Designs a JSON schema for legal data extraction with explicit representation of uncertainty and missing values instead of silent defaults.
Regression Test Suite for a Production Prompt
Builds a test suite for a prompt before changing it, catching silent regressions introduced by an innocent-looking improvement or a model swap.
Data Model for a Legal System
Designs a database schema for legal entities with emphasis on versioning, audit trail, and tenant isolation — three things that are very hard to retrofit.