Skip to main content
Glama

Train a chatbot on some text

add_knowledge_text

Add free text to a chatbot's knowledge — policies, opening hours, a product description, anything that isn't on a web page. Embedded in the background.

Give it a title: the title becomes a heading on the text, which makes retrieval noticeably better than an untitled wall of prose. 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>",
      "text": "<text>"
    },
    "name": "add_knowledge_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe content to train on.
titleNoShort heading for this text, e.g. "Refund policy".
chatbot_idYesThe token or chatbot_id returned by create_chatbot.

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

A4.4/5.0
Behavior4/5

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

Annotations only cover the safety profile (readOnlyHint=false, idempotentHint=false, destructiveHint=false), and the description adds genuinely useful behavior the annotations cannot express: embedding happens in the background, and demo chatbots are capped at 50000 total characters of training content. It doesn't say what happens when content is re-added or how long embedding takes before retrieval works, which keeps it below a 5.

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 first sentence and the remaining paragraphs each add something (title benefit, then the quota). The 50000-character quota sitting next to a schema maxLength of 100000 could briefly confuse, but they measure different things (total content vs. per-document) and the text reads cleanly.

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?

An output schema exists and annotations cover the safety profile, so the description only needs to carry purpose, parameter rationale, and ambient constraints — all of which it does for a simple two-required-parameter ingestion tool.

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 goes beyond it by explaining why `title` matters — it becomes a heading and measurably improves retrieval versus untitled prose. That is actionable meaning absent from the schema's "Short heading for this text" text.

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 gives a specific verb and resource ("Add free text to a chatbot's knowledge") and immediately scopes it with "anything that isn't on a web page," which implicitly separates it from the URL-ingestion sibling. An agent can identify the right tool without opening the schema.

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 clear positive guidance (free text that isn't on a web page, with examples like policies, opening hours, product descriptions) and states a quota constraint for demo chatbots. It stops short of naming alternatives such as add_qa for structured Q&A or add_knowledge_url for web content, so the routing is inferred rather than explicit.

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