Skip to main content
Glama

Knowledge base: Ingest text

kb_ingest_text

Ingest a block of text (up to ~200KB) into a KB collection: it is chunked, embedded with a self-hosted multilingual model (uk/en/de/ru) and stored for retrieval. Provide the 'collection_id', a 'title' and the 'text'; optional 'tags'. Returns { doc_id, chunks, storage_used }. Refuses with a clear message + current usage if over the plan's KB storage/chunk limit. Runs propose→confirm. CONFIRMATION: this tool is PROPOSED, never performed directly. You get status='confirmation_required' with an action_id and a plan_token, and the write happens only after confirm_action.

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": {
      "collection_id": "<collection_id>",
      "title": "<title>",
      "text": "<text>"
    },
    "name": "kb_ingest_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNo
textYes
titleYes
collection_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=false), the description discloses the internal pipeline, the embedding model's language set, an approximate size ceiling, the exact return payload { doc_id, chunks, storage_used }, the quota-refusal behavior with usage reporting, and the two-phase propose→confirm contract. That is unusually complete behavioral context for a mutation tool.

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?

Front-loaded with purpose, then returns, then failure mode, then the confirmation contract – a sensible ordering. There is mild redundancy in stating 'Runs propose→confirm' immediately before a longer CONFIRMATION paragraph that repeats the same fact, but no sentence is filler.

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?

No output schema exists, yet the description supplies the return shape and the confirmation-flow status values, so an agent can chain into confirm_action without guessing. Remaining gaps are minor: no statement of what happens on duplicate titles, and no note about whether the collection must already exist.

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 0%, so the description carries the burden and largely does: it identifies three required inputs (collection_id, title, text), marks tags optional, and gives the text size bound (~200KB). Gaps remain on collection_id's accepted type (integer or string) and what title is used for downstream, but the essentials for correct invocation are present.

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 description gives a precise verb+resource ('Ingest a block of text ... into a KB collection') and enumerates the processing pipeline (chunked, embedded with a multilingual uk/en/de/ru model, stored for retrieval). It clearly separates itself from document-level ingestion by scoping to a raw text block, though it never names kb_ingest_document or ingest_reading_to_kb to make the distinction 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 tells the agent what to supply, what the tool returns, when it refuses (over plan storage/chunk limit, with current usage), and, critically, that it never writes directly but must be followed by confirm_action with the returned action_id/plan_token. What is missing is an explicit 'use this instead of kb_ingest_document/ingest_reading_to_kb when...' routing statement.

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