Design Mock Tool Fixtures for Agent Trajectory Testing
Generate deterministic mock tool responses to test agent decision trees, edge-case failures, and schema-breaking payloads without live API usage or costs.
Agent prompt for Claude and ChatGPT
Prompt
mkdir -p .agents/skills/design-mock-tool-fixtures-for-agent-trajectory-testing && curl -sL "https://prompts-gpt.com/prompts/design-mock-tool-fixtures-for-agent-trajectory-testing/raw" -o .agents/skills/design-mock-tool-fixtures-for-agent-trajectory-testing/SKILL.md---
name: design-mock-tool-fixtures-for-agent-trajectory-testing
description: "Generate deterministic mock tool responses to test agent decision trees, edge-case failures, and schema-breaking payloads without live API usage or costs."
---
# Design Mock Tool Fixtures for Agent Trajectory Testing
Generate deterministic mock tool responses to test agent decision trees, edge-case failures, and schema-breaking payloads without live API usage or costs.
## Prompt
```
Act as a software engineer specializing in AI agent reliability. Your goal is to design a set of synthetic mock tool fixtures to unit-test an agent trajectory decision tree. Please ask me these 3 questions first: 1. What is the name and purpose of the tool function? 2. What are the 3 most critical success scenarios and 2 failure modes to test? 3. Does the tool use JSON or XML for output? After I answer, provide the test suite. Rules: Every fixture must include a specific status code and a descriptive reason for the response. Include one payload that violates the expected schema to test error handling. Use a clear, tabular format for the test cases. Assume no responsibility for production system uptime; this is for testing logic.
```
## Usage Notes
Use this prompt to build robust unit tests for your agent's tool-calling logic. It works best in Claude, ChatGPT, or Gemini. Paste the result into your local test suite or mock server configuration to verify recovery paths.
Act as a software engineer specializing in AI agent reliability. Your goal is to design a set of synthetic mock tool fixtures to unit-test an agent trajectory decision tree. Please ask me these 3 questions first: 1. What is the name and purpose of the tool function? 2. What are the 3 most critical success scenarios and 2 failure modes to test? 3. Does the tool use JSON or XML for output? After I answer, provide the test suite. Rules: Every fixture must include a specific status code and a descriptive reason for the response. Include one payload that violates the expected schema to test error handling. Use a clear, tabular format for the test cases. Assume no responsibility for production system uptime; this is for testing logic.Example output
Tips and common edits
Why this works
- Forces clear definition of success and failure states.
- Includes schema-breaking tests to verify robustness.
- Uses a tabular format for easy integration into test suites.
Use this prompt to build robust unit tests for your agent's tool-calling logic. It works best in Claude, ChatGPT, or Gemini. Paste the result into your local test suite or mock server configuration to verify recovery paths.
Common edits
- Add more complex nested data structures to the payloads.
- Adjust the status codes to match your specific API standards.
Reuse it: Use in a workflowAdapt in the builder
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
More like this
Triage Dead-Letter Queue Logs for Failed AI Agents
Sort unhandled agent run failures into an actionable classification table separating tool downtime, invalid schema calls, and missing user context.
Create Error Handling Contracts for AI Agents
This prompt transforms raw stack traces into structured error envelopes that provide agents with specific remediation steps and valid parameter constraints for self-correction.
Checkpoint and Rollback Manager with Compensation Steps and Failure Injection Tests
Guides Claude Code to implement checkpoint snapshots, rollback modes, and compensating actions for side-effecting agent phases, then prove them with failure-injection tests. Helps you decide the rollback strategy per phase.
Typed Phase Handoff Contracts and Validator for Multi-Agent Pipelines
Has Claude Code define schema-based handoff contracts between agent phases, generate a validator, and add contract tests. Supports the decision of which phase boundaries need strict contracts versus lightweight checks.
Create Role-Based Tool Gating Matrix for AI Agents
Generate a security-focused tool access matrix that restricts AI agent capabilities based on user permissions and execution phases.
Define Context Compression Rules for Long-Running AI Agents
Create a formal policy for compressing conversation history and managing agent memory to ensure long-running threads remain efficient without losing critical task data.
- Design Human-in-the-Loop Escalation Gates for AI Agents
- Design Idempotent API Tool Schemas and Retry Policies
- Evaluate AI Agent Performance for Infinite Loops and Goal Drift
- Map AI Agent State Payloads and Handover Contracts
- Agent Run Post-Mortem: Trace Root Cause and Prompt or Tool Fixes
- Parallel Git Worktree Task Split with Interface Contracts and Merge Order