You type: "Which invoices of Jansen B.V. are still open?" The assistant first looks up the relation and then fetches the open items. Two tool calls, in the right order, without you naming a tool. Who made that choice? Not Ledger Botje: the language model. But the model picks from what the server shows it, based on what the server tells it. This post explains how that works.
Step 1: the server publishes a list of tools
When connecting, the AI client asks through the Model Context Protocol which tools exist. The Ledger Botje MCP server answers with a list, and every tool in that list has four parts:
| Part | Example | What the model uses it for |
|---|---|---|
| Name | cashflow_receivables_search | recognising domain, subject and action |
| Description | "Search and filter receivables by customer code, status or due date…" | deciding when the tool fits, and when it does not |
| Parameters | accountCode, status, limit | filling in the call |
| Annotations | readOnlyHint, destructiveHint | judging whether the tool changes something |
The AI client passes that list to the language model, next to your question. So the model sees no code and no database, only these descriptions.
Step 2: what is removed from the list up front
Before the model chooses anything, the server has already decided what is in the list. What is not in it, the model cannot call. That is deliberately where you manage permissions, not in the prompt:
- Write mode. When writing is turned off in the settings, all tools that change something in Exact Online are missing.
- Tool selection per connection. You can choose a set of tools per AI client, with a default per administration for clients that connect later.
- Access per company and per colleague. The administrator decides which tools the company uses and can restrict a colleague further or make them read-only. A layer can only remove tools, never add them.
- Administrator tools. Tools in a test phase are only visible to administrators.
Tools starting with admin_, such as admin_switch to change administration, always stay available. Copilot Studio uses at most 70 tools per agent, so there a tool selection is not a luxury but a necessity.
Step 3: the model chooses by name and description
Now the model puts your question next to the list. Three things help it.
Consistent naming. Every tool name follows the pattern domain, subject, action: sales_orders_create, financial_reporting_balance_search, accounts_search. A question about "creating an order" naturally lands on the tools that start with sales_orders and end in create.
Descriptions that say when to use a tool and when not to. A good description says not only what a tool does, but also when another tool is the better choice. For example, financial_reporting_balance_search says that searching for the word "revenue" misses accounts and is therefore unsuitable for adding up revenue, that revenue is a credit and therefore negative, and that a dashboard should use groupBy rather than page after page of single rows. Sentences like these steer the model away from a tool that looks right at first sight but gives a wrong answer.
Order in the description. Many tasks need several steps. An entry needs a relation, and an attachment must be uploaded before you can link it. The description names that order, and the model turns it into a sequence of calls. For the Jansen B.V. question that is accounts_search first and then cashflow_receivables_search.
Every tool also has a context parameter, in which the model briefly says why it calls the tool. That goes into the call log, so when something is reported we see not only which tool was chosen, but also why.
Step 4: a write action is followed by a confirmation
The annotations from step 1 say whether a tool only reads (readOnlyHint) and whether it does something irreversible (destructiveHint). AI clients use this to ask for permission on write actions; what that looks like differs per client. For tools with major consequences, the description goes a step further. financial_entries_match (matching entries) asks the model to show the items, amounts and balance first and only call the tool after your approval, because unmatching is only possible in Exact Online itself.
Step 5: the response decides the next step
After a call, the model reads the result and decides again: done, or another tool? The server steers here as well:
- Empty result. If the broadest search returned nothing, the tool says
STOP, so the model does not keep trying variations. With a filter that is too strict, it says which filter you can relax. - End of the list. An empty page after the first returns
pastEnd: true: paging further makes no sense. - Freshness. Reporting tools state how old their figures are, and an incomplete refresh appears as
cacheRefreshin the response. - Connection. If the connection with Exact Online does not work, the response says what the user needs to do, and that the model should not repeat the call.
So an error is not a dead end but an instruction. That saves calls, and it prevents an assistant from creating an order twice because it thought the first one failed.
How to get the right tool faster
- Name the object and the action. "Create a sales order for…" works better than "put this in Exact".
- Name the administration if you have several. The assistant then switches first with
admin_switch. - Say what is not allowed. "Only look up, change nothing" is a clear boundary for the model. If you want to be sure, turn writing off.
- Limit the tool selection to what you use. Less choice means less chance of a wrong choice, and in Copilot Studio it is required.
- Start with a prompt from the prompt library. Those are tested for the right tools and order.
- Report it when it goes wrong. Ask the assistant to use
admin_feedback. With those reports and thecontextfrom the log we improve descriptions.
Who decides what
| Decision | Who |
|---|---|
| Which tools are available | Ledger Botje, based on subscription, write mode, tool selection and access |
| What a tool does and when it fits | Ledger Botje, through name, description and parameters |
| Which tool is called, and in which order | the language model of your AI assistant |
| Whether a write action goes ahead | you, through the confirmation of the client, and Exact Online itself |
All tools with their descriptions are in the tool catalogue. If a connection gets stuck, read troubleshooting the MCP connection.