Hands on
Testing and debugging in XataWorks
You have declared tools and you want to know they work — that they are seen, described the way you meant, classed the way you meant, and called when they should be.
Registering a tool changes nothing visible about your page. That is right, and it is also why it is easy to believe you have declared one when you have not — the script threw, the host never saw it, and your page looks exactly as it did. XataWorks has three places to look, and none of them runs anything.
What you need
XataWorks itself
— installers for macOS, Windows and Linux — and your
page open in its browser. Serve the page however you already do,
including from localhost; remember that XataWorks does
not ask the site-permission question for localhost
(see Hello, WebMCP).
Is your page seen?
The browser toolbar carries a page-tools button, a puzzle piece with a count for the tab in front of you. No button means the tab has published nothing. Click it for the list: each tool’s name, its description, and its class.
What did it publish?
The page-tools button shows one tab. Available tools shows everything the current chat can reach, grouped by tab. Open the ⋮ menu in the chat header and choose Tools. You are reading your descriptions in the same place the agent does, and the badges are the classes XataWorks derived from your hints — not ones your page asked for.
So the check is four steps: open your page, open the ⋮ menu
in the chat header, choose Tools, and read the rows
under your tab’s heading. The filter box matches the technical
name too, so delete finds delete_note.
delete. No sound.Watching a call
The examples in this section name the tool in their requests, so you can see the mechanism. When you test your own application, ask for the outcome instead — “what’s the status of order A-1002?” rather than “call find_order” — because the agent choosing your tool from its description is the behaviour you are testing.
A page-tool call appears in the chat as a line — Calling Say Hello via WebMCP — and pointing at it shows which page tool ran, and through which browser tool:
The call log
For the arguments and the result, open the browser’s own ⋮ menu and choose WebMCP call log…. Each entry records the site, the tool, the outcome and how long it took; select one for the arguments it was called with and a preview of what came back. That is the fastest way to find a schema problem: the agent sent what it thought your schema asked for, and you can see whether that matched what you meant.
Values are kept at the default Full detail level. At Summary only you will see the argument names and no values, which reads the same as a call made with empty arguments — check the level before concluding that.
When your tools are not listed
In the order worth checking, cheapest first.
The tab is not open in this chat’s browser
An agent can use tools only from tabs its chat can reach. If your tab is not in the palette, its tools cannot be either.
The script did not run, or threw before registering
Check the page’s own console. A syntax error, a failed import,
or an exception above your registerTool call all produce
the same symptom: no tools, and no complaint from the host.
The name collides
Two tools registered under one name leave one of them unreachable. Names specific to your application make this unlikely — see designing tools.
Your own content security policy blocked the script
An inline <script> on a page with a strict
script-src and no nonce does not run. Nothing in the
host reports this; your console does.
Test the hints, not only the tools
Do it once, deliberately, because the failure is invisible otherwise. Allow your site read-only tools, then ask for something that needs a tool you declared as changing things. You should be asked to confirm. If you are not, the hint is not what you think it is.
About these screenshots
They are Linux renderings of the application. On macOS and Windows the window frame and system fonts differ; everything inside the window is the same.