> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getbluejay.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Mock Tool Calls

> Answer your agent's tool calls in simulations without touching your real systems.

Use them so test runs never create real bookings or read live data, and so each test case gets the result it needs, such as "two slots open on Thursday" or "order not found".

<video controls muted playsInline preload="metadata" src="https://mintcdn.com/bluejay/8i7dAIenLlFEYFAM/videos/mock-tools-overview.mp4?fit=max&auto=format&n=8i7dAIenLlFEYFAM&q=85&s=761b5c72ac446c6da773383d41decac2" />

## How it works

Mocking is set on the agent and applies to every simulation on that agent. Live traffic is never mocked.

1. Open the agent's **Simulation Settings** and turn on **Mock tool calls**. Every tool the agent has is listed.
2. Pick a mode for each tool. Tools start on **Generated**.
3. Run a simulation. Each tool call gets its answer from Bluejay.

![The agent's Simulation Settings with Mock tool calls on and each tool set to Generated](https://mintcdn.com/bluejay/8i7dAIenLlFEYFAM/images/mock-tools-toggle.png?fit=max\&auto=format\&n=8i7dAIenLlFEYFAM\&q=85\&s=0b88ec476fc58cb39c063d99d95c5b3b)

| Mode | What the agent gets back |
| - | - |
| Generated | A realistic result Bluejay writes on the fly from the tool's name, description and parameters, the call's arguments, and the calling Digital Human. A lookup returns the Digital Human's own name, date of birth and account details. |
| Fixed | The JSON you enter, every time. |
| Real backend | Not mocked. The call goes to your real tool. On Google CES and Dialogflow CX it gets an error result. |

How the answer reaches your agent depends on the platform. ElevenLabs web and chat agents, and Google CES or Dialogflow CX tools that Bluejay runs, are mocked automatically. ElevenLabs phone and SIP, Retell, Vapi, Bland and custom agents need their tool server to ask Bluejay. See [Setup by provider](https://docs.getbluejay.ai/test/simulations/mock-tools-setup.md).

## Override a tool for one test case

A Digital Human can override what a tool returns in its own runs. Edit the Digital Human and fill in **Tool Response Overrides** for the tool, JSON or plain text. Leave it empty to use the agent's mode.

![A Digital Human's Tool Response Overrides with check\_availability set to an empty slot list](https://mintcdn.com/bluejay/8i7dAIenLlFEYFAM/images/mock-tools-responses.png?fit=max\&auto=format\&n=8i7dAIenLlFEYFAM\&q=85\&s=ae48083775875067439e3dd7dd9dc7be)

The order is: the Digital Human's override, then the agent's mode for the tool (Fixed or Generated), then your real backend.

Overrides are separate from **Tool Adherence**. Tool Adherence grades which tools the agent calls; overrides only decide what the tools return.

## Example

Your scheduling agent has `check_availability` and `lookup_patient`. You want to test that it reads back the times your calendar returns.

1. Turn on **Mock tool calls** in the agent's **Simulation Settings**.
2. Set `check_availability` to **Fixed** with `{"slots": ["Thursday 7:40 AM", "Thursday 4:05 PM"]}`. Leave `lookup_patient` on **Generated**.
3. Create a Digital Human who asks for a Thursday appointment, with the success criterion "The agent reads back the Thursday times that check\_availability returned."

When the agent looks up the caller, it gets back the Digital Human's own details. When it checks availability, it gets Thursday at 7:40 AM and 4:05 PM and reads those times to the caller. No real calendar or patient record is read.

<video controls muted playsInline preload="metadata" src="https://mintcdn.com/bluejay/8i7dAIenLlFEYFAM/videos/mock-tools-elevenlabs-e2e.mp4?fit=max&auto=format&n=8i7dAIenLlFEYFAM&q=85&s=58b6a5716ce9cf265b23e03835f1e2df" />

To test a fully booked day in one test case, give that Digital Human an override for `check_availability` of `{"slots": []}`.

## With the API or MCP

Turn mocking on, then set a tool to Fixed:

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
curl -X PUT https://api.getbluejay.ai/v1/agents/$AGENT_ID/mock-tools \
  -H "X-API-Key: $BLUEJAY_API_KEY" -H "Content-Type: application/json" \
  -d '{"enabled": true}'

curl -X PUT https://api.getbluejay.ai/v1/agents/$AGENT_ID/mock-tools/check_availability \
  -H "X-API-Key: $BLUEJAY_API_KEY" -H "Content-Type: application/json" \
  -d '{"mode": "fixed", "response": {"slots": ["Thursday 7:40 AM", "Thursday 4:05 PM"]}}'
```

Overrides are the `tool_responses` field, an object keyed by tool name, when you [create](https://docs.getbluejay.ai/api-reference/endpoint/create-digital-human.md) or [update](https://docs.getbluejay.ai/api-reference/endpoint/update-digital-human.md) a Digital Human.

With MCP or Bluejay AI, ask "mock tool calls for my scheduling agent", then "make check\_availability return Thursday 7:40 AM and 4:05 PM". The tools are `set_agent_mock_tools` and `set_agent_tool_mock`.

## Related

* [Setup by provider](https://docs.getbluejay.ai/test/simulations/mock-tools-setup.md)
* [Mock tool calls reference](https://docs.getbluejay.ai/test/simulations/mock-tools-reference.md)
* [Digital Human reference](https://docs.getbluejay.ai/test/simulations/digital-humans.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.