Skip to main content
Glama

Knowledge base: Ingest document

kb_ingest_document

Index an EXISTING personal document (uploaded via the cabinet) into a KB collection so it becomes searchable. Provide the 'collection_id' and the 'document_id'. Uses the document's extracted text. Returns { doc_id, chunks, storage_used }; refuses over the plan 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>",
      "document_id": "<document_id>"
    },
    "name": "kb_ingest_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
document_idYes
collection_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare the safety profile (readOnly=false, destructive=false, openWorld=false); the description adds substantial behavior beyond that: the return shape { doc_id, chunks, storage_used }, refusal when the plan limit is exceeded, and the full propose→confirm protocol including status='confirmation_required', action_id, plan_token, and that the write only lands after confirm_action.

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 the core action, followed by inputs, return values, failure condition, and the confirmation flow in a compact order. Dense but nearly every clause carries information; only the capitalized emphasis and the parenthetical cabinet note are slightly redundant.

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?

With no output schema, the description supplies the return fields and the refusal case, and it fully explains the deferred-write confirmation requirement that an agent must understand to avoid assuming success. Nothing essential for correct invocation is missing.

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 description coverage is 0%, so the description must compensate, and it does only partially: it names both parameters and clarifies that document_id points at an already-extracted cabinet document, but it says nothing about accepted id formats (the schema allows integer or string) or what collection_id must refer to.

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?

States a specific verb and resource — index an EXISTING personal document into a KB collection so it becomes searchable — and the qualifier 'EXISTING ... uploaded via the cabinet' plus 'Uses the document's extracted text' separates it from kb_ingest_text, ingest_reading_to_kb, and the upload tools without needing their schemas.

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?

Tells the agent the precondition (the document must already exist in the cabinet) and the two identifiers required to proceed, which implicitly excludes raw-text ingestion and fresh uploads. It does not explicitly name the alternative sibling to use for those cases, so it stops short of a full when/when-not 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