Skip to main content
Glama

Add a knowledge source to a chatbot

add_chatbot_knowledge

Add a knowledge source to a chatbot

Adds one knowledge source to a chatbot. type says how to read content: for url it is the address to draw from, read again every syncInterval (weekly by default), for text it is the literal text, for file it is the text of the file, named by fileName and described by mimeType, and for crawl it is the start page of a website that is read up to maxDepth links deep and maxPages pages and crawled again every syncInterval. A crawl runs in the background with status pending; follow it with GET /chatbots/{chatbotId}/knowledge/crawl. content is always required and must not be empty. The document is created in the voice engine and then attached to the chatbot, which from then on draws on it in conversations. The entry is stored under the account that owns the chatbot, also when a reseller key adds it. When the document cannot be created or attached, the request still succeeds and the entry is stored with status failed; delete it and add it again. Note that the 400 response for an invalid body carries only an error code and a details list, with no message key, unlike the other endpoints.

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": {
      "chatbotId": "<chatbotId>",
      "body": "<body>"
    },
    "name": "add_chatbot_knowledge"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesThe knowledge source. `title`, `fileName` and `mimeType` are optional and stored as given; without a `title` the entry is named after the URL or the file name.
chatbotIdYesNumeric identifier of the chatbot.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations only declare the generic mutation profile (readOnly=false, destructive=false, idempotent=false, openWorld=false); the description goes well beyond that. It discloses resync cadence and defaults, that crawls run asynchronously with status `pending` and must be followed via a separate endpoint, that documents are stored under the owning account even for reseller keys, and — critically — that a failed create/attach still returns success with status `failed`, requiring delete-and-retry. It even flags the anomalous 400 body shape lacking a `message` key.

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?

The action is front-loaded in the first sentence and the per-type breakdown follows logically, with failure and error-shape caveats at the end. It is dense but every clause carries usable information; the opening restates the title almost verbatim, which is the only real waste.

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

Completeness5/5

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

For a nested-body mutation tool with no output schema, the description covers everything an agent needs to invoke it correctly: type-dependent content semantics, sync behavior, asynchronous crawl follow-up, failure-mode handling, and error payload shape. Nothing material is left to the schema alone.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning the schema does not: it maps each `type` enum value to how `content` is interpreted, states `content` is always required and non-empty, ties `fileName`/`mimeType` to the `file` type and `maxDepth`/`maxPages` to `crawl`, and gives the title fallback rule. Only minor gaps remain, such as validation limits on `maxDepth`/`maxPages`.

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?

"Adds one knowledge source to a chatbot" gives a specific verb and resource and names the resource scope (chatbot), which separates it from the sibling agent-knowledge family. It stops short of explicitly routing an agent away from add_agent_knowledge/add_agent_knowledge_file, so the differentiation is implicit in the noun rather than stated.

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

Usage Guidelines3/5

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

The description explains at length how to use the tool (which `type` value to pick and what each does), which implies when to call it, but it never states when not to call it or which sibling to use instead (e.g. the agent-knowledge equivalents). Usage is inferable rather than guided.

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.