So I have a tool setup triggered by a new bill sent for approval by Xero. It checks the bill, looks up project data, sends different people a slack message depending on whats needed. And example response from it is:
A new bill has been sent for approval. It’s from [Supplier] and appears to be for the purchase of [Products], which should be reimbursed to your personal card. The total comes to $649.95 NZD, split across 1 transaction.
Note: Since this bill is to be reimbursed to your personal card, the bill entry date (31 Oct 2025) and due date (20 Nov 2025) should match — it looks like they don’t. I’ll follow up with Olivia to make sure this gets corrected.
[Xero Link] to view the bill in Xero.
I’ve just removed some of the info as needed in the above. One of the tools it has is to message my EA on slack here:
If the description of the bill says that it’s to be reimbursed to my personal card, the bill entry date and due date should be the same. If it’s not the same, send a slack message to Olivia with a link to the bill, politely reminding her that the bill date and due date should match when it’s to be reimbursed to my personal card.
It didn’t use the tool in this instance… Am I just prompting it wrong? Ie should I say “Use the tool “Send a slack message to Olivia” to send Olivia a slack message notifying her of the changes needed”. Or should I say “Use the tool on node 64 to send a Slack message”. Or something else? How can I get more reliable tool usage?
Hi! It looks like the issue is most likely with how your system prompt is structured, since the agent can be very sensitive to the prompt’s layout and clarity.
You should definitely take a look at this article - it explains in detail how to write effective instructions and structure prompts for reliable tool execution: Writing Effective Instructions — Prompting Guide
One thing that isn’t mentioned in that article, but is very important, is that the Tools section should always appear as early as possible in your prompt.
The placement of this section in the overall prompt structure really matters — the agent parses it in order, and if the tool definitions or descriptions are buried later, it may ignore or misunderstand them.
Make sure to:
Clearly describe each tool, its purpose, and how it should be used.
Include those details both in the Tools section and the Tool Description fields.
Keep the overall structure consistent - the agent relies heavily on that organization to decide when and how to trigger actions.
There isn’t a universal “perfect” structure, but a clean, well-ordered prompt makes the agent’s tool usage far more reliable.
Thanks Raian. How does the agent “see” the tool names? ie the label it gets - if my tool/node is called a human readable “Send Olivia a slack message” what does it see? “send_olivia_a_slack_message”?
It’s probably not your logic that’s off it’s how the agent interprets when and how to call the tool. You’ll get more reliable results if you clearly tell it which tool to use and why. Something like: If the dates don’t match, use the ‘Send Slack Message to Olivia’ tool to notify her.” The more explicit the action and tool name, the better it follows through.