Skip to main content
Glama

Add a question and answer pair

add_qa

Add an exact question-and-answer pair to a chatbot. Use this when the answer must be worded a particular way — pricing, refunds, guarantees, anything where paraphrasing from a page would be risky.

question_variations lets you list other phrasings of the same question so retrieval catches them all. Demo chatbots accept up to 50000 characters of training content in total.

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": {
      "chatbot_id": "<chatbot_id>",
      "question": "<question>",
      "answer": "<answer>"
    },
    "name": "add_qa"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleNoOptional label for this pair.
answerYesThe exact answer to give.
questionYesThe question a visitor would ask.
chatbot_idYesThe token or chatbot_id returned by create_chatbot.
question_variationsNoOther ways someone might ask the same question.

Output Schema

NameRequiredDescriptionDefault
nameNo
addedYes
messageNo
sourcesYes
trainingNo
source_idNo
chatbot_idYes
source_typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare the write, non-idempotent, non-destructive, closed-world profile, so the bar is lower. The description adds genuinely new behavior: the 50000-character total training-content cap for demo chatbots, which an agent cannot get from the schema. It does not address what happens on duplicate questions or whether a refresh is needed before the pair is retrievable, which are the main remaining unknowns for a non-idempotent write.

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 is front-loaded in the opening clause, followed by the selection heuristic, then parameter and quota notes in descending priority. Every sentence carries information, though the line-broken layout reads more like fragments than a structured paragraph.

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

Completeness3/5

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

An output schema exists, so return values need no explanation, and the content quota is a useful addition for a write tool. However, for a non-idempotent add operation the description never says whether duplicate questions are deduplicated or whether sibling tools like refresh_knowledge must run before the pair becomes live in retrieval.

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 all five parameters are already documented, establishing a baseline of 3. The one addition is the retrieval rationale for question_variations ('so retrieval catches them all'), which explains why to populate it rather than what it is. title, answer, question, and chatbot_id receive no meaning beyond their schema descriptions.

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

Purpose4/5

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

The first sentence gives a specific verb and resource ('Add an exact question-and-answer pair to a chatbot') and the wording contrast with 'paraphrasing from a page' implicitly separates it from the knowledge-ingestion siblings. It stops short of naming add_knowledge_text or add_knowledge_url directly, so the differentiation is inferential rather than explicit.

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 selection rule with concrete triggers: 'pricing, refunds, guarantees, anything where paraphrasing from a page would be risky.' That tells an agent when this path is preferable to ingesting source text. It does not state any when-not conditions or name the alternative tool outright.

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