Agent instructions
AuraScore 83/100

Autonomous Agent Tool Integration and Schema Specification

Define strict tool-calling schemas, parameter boundaries, and deterministic error-recovery protocols for autonomous agent runtimes.

Use this template when onboarding new API endpoints, custom functions, or databases to an autonomous agent's toolbelt. It establishes unambiguous parameter definitions, validation constraints, and failure fallback behaviors.

Template

Role: Principal Agent Systems Architect with deep expertise in API abstraction, structured output formatting, and tool-calling validation for autonomous agent runtimes.

Context

  • Target agent role: {{agent_role}}
  • Deployment environment: {{target_environment}}
  • Core external APIs and tools: {{integration_apis}}
  • Maximum concurrent tool calls: {{concurrency_limits}}
  • Retry and backoff configuration: {{retry_policy}}
  • Exception and fallback protocol: {{error_handling_strategy}}

Task

Draft an exhaustive tool-calling specification for {{agent_role}} operating in {{target_environment}}, defining JSON schema contracts, parameter validation boundaries, execution precedence, and graceful degradation protocols for every integration in {{integration_apis}}.

Method

  1. Analyze {{integration_apis}} to map discrete functional capabilities to atomic, single-responsibility tool definitions.
  2. Define rigid JSON schemas for each tool, specifying explicit data types, required versus optional fields, enum values, and boundary conditions.
  3. Establish invocation precedence rules and mutually exclusive tool combinations under {{concurrency_limits}}.
  4. Design parameter sanitization and validation steps to intercept malformed inputs prior to external execution.
  5. Map failure modes across {{integration_apis}} and construct recovery logic aligned with {{retry_policy}}.
  6. Detail step-by-step downstream behaviors for unrecoverable errors using {{error_handling_strategy}}.
  7. Formulate end-to-end integration test vectors covering happy paths, edge cases, and schema mismatch events.

Constraints

  • Schemas MUST adhere strictly to standard JSON Schema draft-07 or OpenAI Function Calling format.
  • You MUST NOT allow open-ended or untyped string inputs where enumerated values or regex patterns can be enforced.
  • Every tool definition must include explicit rate-limit thresholds and timeout values.
  • All error messages returned to the agent context must be actionable and distinct from user-facing errors.
  • The specification must be fully implementable without assuming undocumented API parameters.

Output format

Provide the specification in four structured sections:

  1. Tool Manifest & Schemas (Complete JSON schemas for all endpoints in {{integration_apis}})
  2. Execution Logic & Concurrency Rules (Orchestration rules honoring {{concurrency_limits}})
  3. Fault Recovery Matrix (Tabular mapping of error codes, {{retry_policy}}, and {{error_handling_strategy}})
  4. Verification Test Cases (At least 3 edge cases per tool schema with sample payloads)

Self-review

  • Confirm every variable ({{agent_role}}, {{target_environment}}, {{integration_apis}}, {{concurrency_limits}}, {{retry_policy}}, {{error_handling_strategy}}) is explicitly referenced.
  • Verify all JSON schemas contain valid types, explicit descriptions, and required arrays.
  • Check that recovery workflows provide unambiguous resolution paths for runtime exceptions.
AuraScore breakdown
83/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering12/12 · Strong

Hard boundaries — what the model must and must not do.

Output specification6/14 · Thin

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness5/5 · Strong

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

ai-agents
agents-instructions
autonomous-agents-workflows
tool-calling
json-schema
api-integration