Skip to main content
Glama

Test how the chat would answer

test_chat_answer

Ask the site's chat one visitor question and see the answer it would give right now, from its saved settings, knowledge and situations, as the Test & improve screen does. Works while the chat is switched off. Nothing is sent to anyone, and no visitor conversation, lead or booking is created. Pass history for the turns before the question, channel: "whatsapp" to test the WhatsApp channel's answer, and draft_instructions to try unsaved "How chat should behave" text. Use it after a change, before telling the owner the chat now answers something; a few tests a minute at most.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "site_id": "<site_id>",
      "message": "<message>"
    },
    "name": "test_chat_answer"
  }
}

Input Schema

NameRequiredDescriptionDefault
channelNoWhich channel to test; default the website chat
historyNoEarlier turns, oldest first: "user" is the visitor
messageYesWhat the visitor asks
site_idYesThe site, from list_sites
user_goalNoOptional: the user's goal behind this call, in one short sentence of plain words (e.g. "add a page so customers can book tables"). No names, emails or other personal details.
draft_instructionsNoUnsaved "How chat should behave" text to answer with instead of the saved one

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations it discloses the important side-effect profile: nothing is sent to anyone, no visitor conversation/lead/booking is created, and it works even while the chat widget is switched off. It also surfaces a throughput limit, which the annotations do not carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and the no-side-effects guarantee are front-loaded, and the parameter hints and rate limit are packed into a short tail. It is dense but every clause carries information; only the 'as the Test & improve screen does' comparison is arguably expendable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description should ideally say something about the shape of the returned answer (text only? citations? channel-specific formatting?), which it does not. Otherwise it covers the mutation-safety, availability and parameter questions an agent needs before calling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so every parameter is already documented, and the description's notes on history, channel and draft_instructions largely restate those descriptions. It adds only modest framing (history as 'the turns before the question'), so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Ask the site's chat one visitor question and see the answer it would give right now.' It names the data sources the answer draws on (saved settings, knowledge, situations) and distinguishes itself from persisted-chat siblings by stating no conversation, lead or booking is created.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a clear when-to-use rule ('Use it after a change, before telling the owner the chat now answers something') and a rate constraint ('a few tests a minute at most'). It also routes two variants to parameters (history for prior turns, draft_instructions for unsaved behavior text), but it never names an explicit alternative tool or a when-not-to-use condition.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources