Skip to main content
Glama

Upload knowledge base document

upload_knowledge_base_document
Destructive

[Knowledge base] Upload and process a knowledge base document (multipart form-data).

Uploads a document to a knowledge base store and queues it for processing. Accepts the file either as multipart/form-data (binary file) or as application/json (base64 file).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesThe document file (binary).
nameNoDocument name (with extension). Falls back to the uploaded file name for multipart.
merchant_idNoOverride merchant id (admin / sub-merchant only).
conversation_idNoPass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
knowledge_base_store_idYesThe knowledge base store to add the document to.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
_mcp_instructionsNoServer-issued metadata for this conversation.
knowledge_base_idYesId of the created knowledge_base record.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / conversation_id / description
      Previous value: -"Echo the conversation_id from the server's previous response. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it."New value: +"Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request."
  2. Changed2 schema fields changed
    • addedInput schema / properties / conversation_id
      Added value: +{
      +  "description": "Echo the conversation_id from the server's previous response. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / _mcp_instructions
      Added value: +{
      +  "description": "Server-issued metadata for this conversation.",
      +  "properties": {
      +    "conversation_id": {
      +      "description": "The server-issued conversation identifier.",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare the mutation/destructive/non-idempotent profile, so the bar is lower. The description still adds real behavioral value beyond them: it discloses that processing is asynchronous ('queues it for processing') and that the file may arrive as multipart binary or JSON base64. It does not address permissions or duplicate-upload consequences.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two compact sentences, front-loaded with the bracketed domain tag and the core action, then the processing/format details. No filler and nothing redundant with the title.

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?

With an output schema present, return values need no explanation, and annotations cover the safety profile. The description supplies the async-processing and encoding context an agent needs; only permission/auth requirements and behavior on re-upload of the same document are left unstated.

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 description coverage is 100%, so the baseline is 3, but the description genuinely extends the 'file' parameter by explaining the two accepted encodings (multipart binary vs. application/json base64), which the schema's 'format: binary' alone does not convey.

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+resource ('Upload and process a knowledge base document') and reinforces it with 'Uploads a document to a knowledge base store and queues it for processing.' No sibling tool performs document upload, so the scope is unambiguous even without explicit differentiation.

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?

Usage is implied by the description (adding a document to a KB store) and the dual content-type note hints at two invocation paths, but there is no explicit when-to-use/when-not guidance or named alternative. Since no sibling competes for this job, the omission is tolerable but still a gap.

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.