A tool is a contract between the model and the harness. The model sees the contract; the harness owns execution. Poorly designed tools — too broad, lacking schemas, or missing permission checks — turn the model into an unaudited operator with unchecked side effects. Well-designed tools are narrow, typed, and scoped: they express exactly what they do, what they require, what they risk, and what they return. The permission model lives in the harness runtime, not in the prompt. Both are required.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/DenisSergeevitch/agents-best-practices/llms.txt
Use this file to discover all available pages before exploring further.
Tool contract
Every tool must declare the following:Risk classes
Classify every tool into one of the following risk classes. The tool registry exposes this metadata to the permission engine.read_only / search_only / compute_only
read_only / search_only / compute_only
Tools that retrieve or compute without persisting side effects. Examples:
search_knowledge_base, read_customer_account, list_support_tickets, fetch_usage_summary.Default permission: allow within scope.draft_only / write_local
draft_only / write_local
Tools that produce output artifacts or local drafts without sending to external systems. Examples:
draft_customer_email, prepare_report, write_local_artifact.Default permission: allow when scoped.write_internal
write_internal
Tools that update internal records in systems of record (CRM, ticketing, ERP). Examples:
apply_crm_update, update_ticket_status.Default permission: approval or explicit policy allowlist.communication / write_external
communication / write_external
Tools that send messages, emails, or notifications to external parties. Examples:
send_customer_email, post_slack_message.Default permission: draft first, approval to send.financial
financial
Tools that initiate or commit financial transactions. Examples:
issue_refund, place_trade, submit_payment.Default permission: approval plus strong authentication.destructive
destructive
Tools that delete, overwrite, or permanently remove data or resources. Examples:
delete_record, purge_workspace, drop_table.Default permission: deny by default, or approval plus a documented recovery path.privileged_access / identity_access
privileged_access / identity_access
Tools that modify permissions, roles, credentials, or access controls. Examples:
grant_role, revoke_access, rotate_credentials.Default permission: approval plus strong authentication.process_execution / network_open_world
process_execution / network_open_world
Tools that execute shell commands, run generated code, drive browsers, or make open-ended HTTP requests. Examples:
run_script, execute_browser_action, call_external_api.Default permission: sandbox plus allowlist plus timeout; approval for risky operations.Permission decision flow
The permission engine sits between schema validation and execution. It returns one of the following decisions:Schema validation
Validate the model’s arguments against the tool’s JSON schema locally before any permission check. Reject unknown properties and enforce required fields. Return an
invalid_arguments error result if validation fails — do not reach the permission engine.Permission check
Pass the validated tool call and session context to the permission engine. The engine evaluates the risk class, resource scope, and active approval state. It returns a structured decision.
Execute or pause for approval
alloworrun_in_sandbox: execute and return a structured result.run_as_draft_only: execute the draft variant; do not call the commit tool.approval_requiredorask_user: pause the loop and surface the request to a human. Do not proceed until an approval record is created outside the prompt.deny: return a structured denial result with safe next steps. Continue the loop.