Tools in Simulations

Open in CMS

Many agents do more than talk. They look something up, send a request to another system, or save something. A test run must never change real data by accident, so Simulation decides, for every tool call, what really happens. In this guide you learn what a tool call is, how Qlar decides what happens to it, what each outcome label means, and how to review and change it for a scenario. It takes about fifteen minutes.

The example agent is Libraría, which has many tools. Your agent will have other tools. The steps are the same. If you have not run a scenario yet, start with Your First Simulation.

AI is involved in every run: the agent writes its answers, decides when to use a tool and which details to send, and AI judges every criterion. These can differ every time, so the same scenario can use a tool slightly differently from one run to the next. Treat one result as a sample, not a guarantee.

The film below gives the big picture of how tools behave in a simulation, and how Tool Mocks and the Tool Policy fit in. The sections after it are the how-to, with the real screens.

Overview of tools in simulations: mocks, live calls and blocked calls

What is a tool call?

A tool is something your agent can use while it answers, besides its own knowledge. Looking up a book, checking a table of data, searching documents, sending a form, setting a reminder, asking another agent: each is a tool. When the agent decides to use one in the middle of an answer, that is a tool call.

A tool call has three parts:

  1. The call. The agent picks a tool and fills in the details it needs. These details are called arguments. For a book lookup (get_book) the argument is the book's ISBN, its catalogue number.
  2. The work. The tool does its job, usually by contacting another system. Many tools reach that system through an API, which is a set of agreed web addresses that one program can ask to read or change data held by another program.
  3. The response. The tool sends back an answer, and the agent uses it to write its reply. Responses are often written in JSON, a plain-text way to write structured data, for example {"status": "on hold"}. You do not need to write JSON to use Simulation. The mock editor has forms for most tools.

The risk is in step 2. A call that only reads data is harmless to repeat. A call that writes data can create a loan, send an email or change a record, and in a test you do not want that. That is why Simulation does not simply let every call through.


Key terms

TermWhat it means
Tool callOne moment where the agent used a tool while answering.
ArgumentsThe details the agent sends with a call, such as a book's ISBN.
ResponseWhat the tool sends back.
MockA scripted, pretend response that you write, so the call returns the same answer every time without touching a real system.
Mock setA group of mocks for one or more tools. See Tool Mocks.
Allow LiveA setting on one scenario that lets one tool make real calls in that scenario.
Tool PolicyA page where you set, for the whole agent, which tools may run live when no mock answers. See Tool Policy.
Built-in defaultWhat a tool does when no mock answers, no scenario allows it live and the Tool Policy has no setting for it. It depends on the kind of tool.
BlockedThe call is not made. The agent is told the tool is unavailable, so a step that needs it will probably fail.
SimulatedThe call is not made, but the agent gets a pretend "success" answer.
LiveThe call is really made, against the real system.

Before you start

  • You have the Owner or Contributor role on the agent.
  • Your agent has at least one tool. Without tools, nothing on this page applies to it.
  • Tool Mocks and Tool Policy show in the sidebar under Simulation only when the feature is switched on for your CMS. If you do not see them, ask the person who looks after your CMS.
  • To use Allow Live… in a scenario you need to be an Owner or Admin of your organisation. Everything else on this page works for every Owner and Contributor of the agent, including the Run Live switches in the Tool Policy, which apply to every scenario.

How a tool call is decided

When the agent calls a tool during a run, Qlar looks for an answer in a fixed order. The first step that has an answer wins, and the rest are not asked.

  1. Mock cases. The cases of every attached mock set, in order: the step's sets from top to bottom, then the scenario's sets from top to bottom. The first case that matches the call answers. The order counts, not how specific a case is.
  2. A mock set's Otherwise. If no case in any set matched, the first set whose Otherwise answers the leftover calls responds. A set that passes on does not answer.
  3. Scenario's Allow Live. The scenario has allowed this tool to run live, so the call is made for real.
  4. This Policy. The agent's Tool Policy: a setting that makes the tool run live or stay blocked. It applies to every scenario of the agent.
  5. Built-in default. What the tool does when nothing above applies.

The decision card on the Tool Policy page draws this as five chips: Step Mocks, Scenario Mocks, Scenario's Allow Live, This Policy and Built-in Default. The two mock chips together are items 1 and 2.

Four things follow from this order.

  • Mocks always win. A tool set to run live in the Tool Policy can still be mocked in the scenarios that need a fixed answer.
  • Every set's cases are checked before any set's Otherwise. A set higher in the list does not hide the cases of a set below it just because it has an Otherwise answer. Its Otherwise only answers calls that no case anywhere matched.
  • A step can take a tool over completely. Set the tool's Otherwise to Use ahead of sets listed below in the step's set. It then answers every call to that tool in that step, before the cases of the sets listed below it, including the scenario's sets. Sets listed above it still check their cases first.
  • A mock set may answer only some calls. If none of its cases match and it passes on, or if every set passes on, the call moves on to Allow Live, then the Tool Policy, then the built-in default.

The built-in default

The last rule depends on what kind of tool it is.

Kind of toolDefault in a simulation
Tools that only read data from a plugin, such as a database reader, a data table, public documents or a memory recallLive: they run for real, because reading changes nothing.
Built-in tools that only read, such as web search, web scraping and searching your agent's knowledgeLive: they run for real and cannot be mocked. Allow Live… is not offered for them, because they are already live.
Tools that write data, such as a form, a reminder, saving, forgetting or consenting in memory, or an escalation to a personSimulated: nothing is written, and the agent gets a pretend "success".
Tools Qlar cannot judge from outside: your own API, an MCP server (a service that offers tools to AI agents in a standard way), another agent (including an A2A agent, one run elsewhere that yours talks to through the A2A standard), or a plugin tool of unknown effectBlocked, until you switch Run Live on in the Tool Policy.
Qlar's own internal toolsInternal Tool: they always run and are never mocked, simulated or blocked.

Because the default for the fourth group is strict, a first run on an agent with your own APIs often shows Blocked calls. That is on purpose: the safe answer is the default until a person decides otherwise.


The outcome labels

Two places show an outcome label, and they use slightly different words. In a result, a label tells you what happened. In a scenario, the Agent Tools panel tells you what will happen.

What happened in a run

On a result's step card, Tool calls (n) lists every call. Each call is a numbered card with an outcome chip and a line that says why it ended that way. Read the Results shows where to find them.

Outcome chipWhat it means
MockedA mock set answered the call: either a case matched and its response was used, or no case matched and the Otherwise response of the first set that answers by default was used. The line under the arguments says which ("No case matched, used Otherwise" for the second).
SimulatedNo mock answered. The tool's default simulated a success: nothing was done for real.
LiveThe call was really made. It carries the warning "Live — may contain real data".
BlockedThe call was not made. The agent was told the tool is unavailable.
Internal ToolOne of Qlar's own tools. It always runs.
UnknownQlar could not tell what happened to the call.
Line on the cardWhy the call got that outcome
Step-level mock setA mock set attached to the step answered. Shown after the case and the set's name.
Scenario-level mock setA mock set attached to the whole scenario answered. Shown after the case and the set's name.
Allowed live in this scenarioThe scenario's Allow Live made the call real.
Tool policyThe agent's Tool Policy decided.
Built-in defaultThe tool's built-in default decided. This is also what you see for a tool that has no setting in the Tool Policy.
No lineAn internal tool, or a call from an older run that did not record the rule.

What will happen in a scenario

The Agent Tools panel shows these before you run. A row has one outcome chip: just the outcome word and a small icon that says where it comes from, which is a mock set, the Tool Policy, this scenario's Allow Live or the built-in default. Hover over the chip to read the sentence behind it.

ChipWhat it means
MockedEvery call to the tool gets a mocked answer. Hover to see which mock set answers.
Partly mockedA mock answers only calls that match one of its cases, or only in some steps. What the rest of the calls do is shown after the word "otherwise", as a second chip.
LiveThe tool runs for real. The hover sentence says why: "Allowed to run live by this scenario.", "Set to run live in the tool policy." or that it runs live by its default because it only reads data.
SimulatedNothing is done for real. The agent gets a pretend "success".
BlockedThe call will fail. The hover sentence says whether the Tool Policy blocks it or it is blocked by its default.
DisabledThe tool is turned off in both Draft and Published, so it cannot be called.
1 step overrides or 2 steps overrideA step's own mock set takes over the tool in that many steps.

Step 1: Look at the Agent Tools summary

  1. In the sidebar, open Simulation and click Scenarios.
  2. Open a scenario, or click New Scenario to start one.
  3. Open Advanced Setup. On a wide screen it is the narrow strip at the left of the form: click its Agent Tools tile. On a narrow screen it is a card under the steps: open it and click Agent Tools, which opens the full list of tools straight away.

Under Agent Tools you see a coloured bar with one chip for each outcome that applies, such as Live 7, Simulated 3 or Blocked 54 on Libraría. The grey number next to the title is how many tools the agent has. Collapsed, the pane shows one line, for example "1 will be blocked · 2 mocked · 1 live · 3 simulated". When nothing would fail it starts with "Nothing blocked".

The chips mean:

ChipMeaning
MockedEvery call is answered by a mock.
Partly mockedA mock answers some calls only.
LiveThe tool runs for real.
SimulatedThe tool gets a pretend "success".
BlockedThe call will fail.
Agent Tools section of Advanced Setup with a count of tools, a coloured bar, the outcome chips such as Live, Simulated and Blocked with their counts, and the Review Tools button

Anything under Blocked is the first thing to deal with. The bar and its counts appear only after the agent's tools and the Tool Policy have loaded. Until then the section shows just "Loading tool catalog..." or "Checking tool policy…", and a Retry button if loading failed. If it says "This agent has no tools with mockable policies." there is nothing to review.


Step 2: Review the tools

  1. Under Agent Tools, click Review Tools. You can also click one of the outcome chips to open the panel already filtered to that outcome.
  2. The panel What the agent’s tools will do opens. Its subtitle names your agent and the version the scenario runs against, draft or published version. The link Edit Tool Policy → at the top opens the Tool Policy page in a new tab.
  3. Use the tabs at the top to choose the scope. Whole Scenario shows what every step gets. Step 1, Step 2 and so on show what that one step gets. On a step tab, the step's own mock sets are checked first.
  4. Read the line under the tabs. On Whole Scenario it reads for example "57 action tools · 0 mocked · 54 will be blocked". An action tool is one that would be blocked or simulated without a mock. On a step tab it reminds you how the mocks work: every set's cases are checked first, this step's and then the scenario's, and then the highest set's Otherwise.
  5. Click All to see every tool. Click Needs attention · n to see only the tools that will be blocked or are only partly mocked. Click an outcome chip in the bar to see only that outcome.
  6. Type in Search tools… to find a tool by its name or description.
  7. Tools are grouped by where they come from: Custom API (your own APIs), Plugins, MCP (tools from MCP servers), Other agents, A2A (agents run elsewhere) and Built-in. A heading can add the name of the API group, for example Custom API · Finance and Custom API · Library.

The panel opens like this, with the All and Needs attention buttons marked.

Side panel What the agent's tools will do, with the Whole Scenario and Step tabs, the coverage line, the outcome chips, the All and Needs attention buttons marked with a box next to the Search tools field, and the first tool rows grouped under Custom API headings

Needs attention · n keeps only the tools that will be blocked or are only partly mocked. That is the list to work through first.

Tools panel with Needs attention selected, showing only blocked tools such as submitLibraryFeedback with the Blocked chip and the Mock It and Allow Live… buttons

Each tool is a row with its name, a short description, an outcome chip and, for a partly mocked tool, a second chip after "otherwise". A Draft Only or Published Only chip shows when the tool exists in just one version. A tool that is turned off in both versions shows Disabled and cannot be changed here. Under the chips a line can say more, for example "Takes effect after you save" for a tool you have just allowed live, or "Unmatched calls will reach the real system." for a partly mocked tool whose other calls run live. The buttons on the right of a row depend on the tool:

ButtonWhen it shows and what it does
Mock ItThe tool would be blocked. Opens the mock set editor with this tool added. See Step 3.
Allow Live…The tool would be blocked or simulated. Lets it run live in this scenario. See Step 4.
Check OrderA mock set mocks the tool. Shows, under the row, the sets and cases in the order they are checked, and what answers last. See below.
Try a CallA mock set mocks the tool. Lets you type sample arguments, click Test, and see which case answers, using the same matching as a run. See Tool Mocks.
Revoke LiveThis scenario has allowed the tool live. Takes the permission back.

See which mock answers

When several mock sets mock the same tool, click Check Order on its row. The section Checked in this order lists every set that mocks the tool with its level, Step or Scenario, and its cases numbered in the order Qlar tries them. A case or set that can never answer is crossed out with the reason, for example because an earlier case with no conditions answers every call. The last line says what answers when no case matches: the Otherwise of a named set, or the tool policy.

Row of the tool submitLibraryFeedback with the Mocked chip and the buttons Hide Check Order and Try a Call, and below it the section Checked in this order marked with a box, listing the mock set with its level Scenario and the last line saying which Otherwise answers

If the panel shows a warning that what is shown may differ from runs because the CMS and the simulation service use different mock-matching versions, trust a real run over the panel until the two match again.


Step 3: Give a blocked tool a mock

A Blocked tool is not allowed to run in a test, so a step that needs it fails. The safe fix is a mock: a scripted answer.

  1. In the panel, find the tool. On a tool that would be blocked, click Mock It.
  2. The mock set editor opens in a side panel with that tool already added. Click Add Case, say which calls it should answer and write the response you want the agent to receive. Tool Mocks shows how.
  3. Click Apply. The set is attached to the scenario, or to the step if you opened the panel on a step tab.

The picture shows a blocked tool with the Mock It button marked. Next to it, Allow Live… is the other choice, covered in the next step.

Row of the tool create_loan with the Blocked chip and the Mock It button marked with a box next to the Allow Live… button

The tool's row now reads Mocked, and its chip in the bar moves from Blocked to Mocked. Save the scenario.

If you opened the panel on a step tab, Mock It adds a mock set to that step. Otherwise it adds one to the whole scenario.


Step 4: Let a tool run live, only when you have to

Sometimes a scenario must prove that the real system works, for example that your library system really accepts a loan from create_loan. For that you can let a single tool run live in this scenario.

  1. In the panel, find the tool. On a tool that would be blocked or simulated, click Allow Live….
  2. Read the confirmation, which asks whether to allow the tool to run live. It says "Real data will change." For an escalation tool it adds that supervisors will be notified. For another agent it adds that the other agent and its own tools will really run. If the tool is mocked for some inputs, it also says that calls a mock answers stay mocked and all other calls run for real.
  3. Click Yes. The row now reads Live, and under it "Takes effect after you save".
  4. Click Save on the scenario. A run uses the saved scenario, so an Allow Live that you did not save is not used. Qlar tells you to save before running.

To take it back, click Revoke Live on the same row, and save. Hover over the button to see what happens to the calls no mock answers afterwards. If a tool that you allowed live is later deleted from the agent, the panel lists the leftover setting at the bottom under Allow Live for tools no longer on this agent, with a Remove button.

Use this sparingly. Allow Live makes real calls, with real credentials, in every run of that scenario.

This step covers both cases, because what you see depends on your role. If you are not an organisation Owner or Admin, Allow Live… is greyed out and you cannot use it. The pictures on this page were taken with such an account, so the confirmation in item 2 is described in words only.

Who can use Allow Live…

Only organisation Owners and Admins can use Allow Live… in a scenario. For everyone else the button stays visible but is greyed out. Hover over it to read "Only organisation Owners and Admins can allow a tool to run live", and a lock note at the bottom of the panel repeats it.

Row of the tool create_loan with the Allow Live… button greyed out and marked with a box, and a tooltip reading Only organisation Owners and Admins can allow a tool to run live

If that is you, ask an Owner or Admin of your organisation to open the scenario and allow the tool. Or avoid the need: a mock does the same job for a test, without touching a real system, and anyone with the Owner or Contributor role on the agent can use Mock It.

The Run Live switches in the Tool Policy are different. Anyone with the Owner or Contributor role on the agent can change them, and they apply to every scenario of the agent, not just one.


Step 5: Check the result of a run

After a run, open its result and look at the tool calls. See Read the Results for where to find them.

  1. Open the Results tab and click the run.
  2. Open the scenario and a step, then click Tool calls (n).
  3. For each call, compare the outcome chip with what the Agent Tools panel promised.

Each row shows the tool's key, for example custom:get_book for a Custom API tool or a2a:HelperDesk for an A2A agent, then the outcome chip and, under them, the arguments the agent sent and a line that says why the call ended that way. The section header counts the outcomes, for example Live 1 and Blocked 1. Click a card to open its full record. For a mocked call, Checked before the answer lists the cases that were tried first and did not match, each with the reason, so you can see why an earlier case did not answer.

In this first step, the agent looked up a book and searched the catalogue. Neither tool has a setting in the Tool Policy, so both fell back to the built-in default of a Custom API, which is blocked, and both calls were Blocked. The first outcome chip is marked. The third call went to a plugin that only reads data, so it ran Live.

Tool calls (3) card with the chips Blocked 2 and Live 1 and three numbered cards: custom:get_book and custom:list_books, each with a Blocked chip, the line Built-in default, a red note that the tool is unavailable and a Mock This Call button, the first Blocked chip marked with a box, and a plugin call to fn_library_loans with a Live chip

The next step borrowed a book with create_loan. create_loan is one of your own APIs (a Custom API), so it is blocked until you switch Run Live on in the Tool Policy, whether it reads or writes data.

Tool calls (1) card with one numbered card, custom:create_loan, with a Blocked chip marked with a box, its arguments, the line Built-in default and a Mock This Call button

In the last step, the agent looked up the library's public documents. That call was Live because a tool that only reads data runs live by default. It shows the line "Built-in default" and the warning "Live — may contain real data". The second call went to another agent and was Blocked.

Tool calls (2) card with Live 1 and Blocked 1: a plugin call to get_public_documents with a marked Live chip, its arguments, the line Built-in default and the warning Live — may contain real data, and a2a:HelperDesk with a Blocked chip and the line Built-in default

For a Blocked call you can click Mock This Call, and for a Mocked or Live call you can click Save as Case, to turn the call into a mock for the next run. Tool Mocks explains both.

A result from an older run can carry the note "Answered under the previous mock rule: a set's Otherwise ended the search." It means that run was answered before the cases of every set were checked ahead of any Otherwise. A new run on the same scenario can answer differently.


Check the result

You made it if you can answer these:

  • For one tool on your agent, which rule decides what happens: a mock case, a mock set's Otherwise, an Allow Live, the Tool Policy, or the built-in default?
  • Which tools in a scenario would be Blocked if you ran it now?
  • Who in your organisation can use Allow Live… in a scenario?

If you see something else:

  • A tool says Blocked and nobody has decided about it. That is the default for your own APIs, MCP tools, other agents and tools of unknown effect. Give it a mock with Mock It, or switch Run Live on for it in the Tool Policy.
  • A call you mocked says "No case matched, used Otherwise". No case in any attached set matched, so the Otherwise response of a set answered. Check the conditions of the cases, or click Check Order to see the order.
  • A call you mocked still shows Blocked. The call may match no case, and every set that mocks the tool may be set to pass on. Check the Otherwise block of the tool, or click Check Order.
  • A case in a lower set does not answer. A case or an Otherwise set to Use ahead of sets listed below higher in the list answers every call first. Check Order crosses out what can never answer.
  • A call shows Live and you did not expect it. Look at the line under its arguments. Tool policy means the Tool Policy lets the tool run live. Allowed live in this scenario means this scenario allowed it. Remove the setting, or add a mock to the scenario.
  • The Agent Tools section shows only a notice. The agent's tools or the Tool Policy are still loading, or loading failed. It says "Failed to load the tool catalog. The rest of the form is still usable." or "The agent's tool policy couldn't be loaded, so what each tool will do can't be shown. Runs still follow the saved policy." Click Retry.

Next steps