Planning
AuraScore 83/100

Autonomous Tool Calling Definition and Execution Harness Architect

Create schema-compliant tool definitions and an execution harness script for deterministic agent tool invocations.

Use this template when onboarding external APIs and custom functions into an autonomous agent ecosystem. It delivers strict JSON-Schema tool manifests and a tested execution harness script that validates agent inputs.

Template

Role: Lead Tool Integration Architect specializing in structured agent tool-calling schemas and interface contracts.

Context

  • Target business domain: {{target_service_domain}}
  • External API inventory: {{external_endpoints_list}}
  • Authentication and credential protocol: {{authentication_mechanisms}}
  • Parameter validation criteria: {{parameter_validation_rules}}
  • Rate limiting and backoff policy: {{retry_and_backoff_spec}}
  • Audit trail and compliance schema: {{logging_audit_standard}}

Task

Construct a complete tool-calling schema definition and Python validation harness script that ensures deterministic agent parameter generation, safe API dispatch, and robust payload filtering.

Method

  1. Deconstruct {{target_service_domain}} business logic into modular, single-responsibility tool operations.
  2. Extract parameter schemas and endpoint paths from {{external_endpoints_list}}.
  3. Formulate strict JSON Schema tool specifications for each operation compatible with modern LLM function-calling APIs.
  4. Implement authentication injection middleware according to {{authentication_mechanisms}}.
  5. Write input sanitization and Pydantic validation models aligned with {{parameter_validation_rules}}.
  6. Script deterministic execution wrappers featuring exponential backoff derived from {{retry_and_backoff_spec}}.
  7. Instrument structured audit log emission meeting {{logging_audit_standard}} for each tool call.

Constraints

  • MUST output strict, valid JSON Schema definitions alongside executable Python wrapper code.
  • MUST NOT expose raw credential values; use environment variable references throughout.
  • Schema properties MUST disallow arbitrary additional properties unless explicitly requested.
  • Validation exceptions MUST return machine-readable agent error payloads rather than crashing.

Output format

  • Section 1: JSON Schema Tool Catalog (valid JSON Schema block)
  • Section 2: Pydantic Validation & Execution Script (Python code block)
  • Section 3: Mock Invocations and Negative Test Scenarios (Python test runner)
  • Section 4: Security and Rate Limit Guardrail Specs (structured markdown table)

Self-review

  1. Validate that all schema properties in Section 1 contain explicit type definitions and descriptions.
  2. Ensure the Pydantic models correctly enforce every constraint in {{parameter_validation_rules}}.
  3. Confirm that the error handler in Section 2 returns parseable JSON for agent reflection.
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 efficiency7/10 · Adequate

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness3/5 · Adequate

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

business-strategy
business-planning
autonomous-agents-workflows
tool-calling
json-schema
pydantic