Testing tools

Status: Current | Last reviewed: 2026-09-21

Mocks let an agent test use predictable tool results without calling an external system. They belong to the tool and can be reused across agents and test runs.

For tools bundled in a custom capability, use the capability's Studio Testing editor. It supports named scenarios and tests of the actual Python implementation. See Test a capability. Supervisor conversations use dedicated runtime responses configured in the agent test; they do not replace the supervisor workflow with a tool result.

Open a tool in Tools. Add an Output schema describing valid results, then save. Supported schemas produce an initial mock automatically. For MCP tools, discover and save the operations first; their own output schemas take precedence.

Reopen the tool and scroll to Testing:

  1. Select the operation.
  2. Choose Generate mock, optionally describing the behavior you want.
  3. Review the JSON variants, state and examples.
  4. Choose Check and save revision.

Each variant needs an input example and its expected result. Examples must match the tool's input and output schemas. Use separate variants for results such as a successful lookup, no match or a business error. Every test conversation gets its own fixture state.

Python, API and Knowledge tools defined inside an agent have the same output schema and mock fields in their tool dialog. Generate or check the draft to attach it, then save the agent.

When a tool's contract changes, its previous mock is marked outdated. Update and save a new revision before starting another test. Queued and running tests keep the revision they started with.

Use these mocks from Performance → Simulations. The run's Fixture overrides can select another variant and supply initial state.