Skip to main content
Glama

upload_file

Upload one file, or up to 100 with 'files', to be parsed, chunked, embedded, and made searchable. For one file give 'fileName' and either 'content' (base64) or 'textContent' (raw text), not both.

Instructions

Upload one file, or up to 100 with 'files', to be parsed, chunked, embedded, and made searchable. For one file give 'fileName' and either 'content' (base64) or 'textContent' (raw text), not both.

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": {
      "containerId": "<containerId>"
    },
    "name": "upload_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoDestination folder path (e.g., '/docs/2026/')
filesNoSeveral files instead of one: JSON array of {"filename":"name.txt", "content":"...", "encoding":"text|base64", "folderPath":"/optional/"}, sent as the array itself or as a string holding it. Max 100. Use instead of fileName, content, textContent, path and strategy.
contentNoBase64-encoded file content. For binary files (PDF, DOCX, images). Mutually exclusive with textContent.
fileNameNoOriginal file name with extension
strategyNoChunking strategy: Semantic, FixedSize, or Recursive. Default: Semantic
containerIdYesContainer ID or name
textContentNoRaw text content for text-based files (Markdown, TXT, CSV, JSON, etc.). Mutually exclusive with content.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.2
    • addedInput schema / properties / files
      Added value: +{
      +  "default": null,
      +  "description": "Several files instead of one: JSON array of {\"filename\":\"name.txt\", \"content\":\"...\", \"encoding\":\"text|base64\", \"folderPath\":\"/optional/\"}, sent as the array itself or as a string holding it. Max 100. Use instead of fileName, content, textContent, path and strategy."
      +}
  2. First observedv0.3.2

TDQS

A3.6/5.0
Behavior3/5

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

Annotations only declare destructiveHint=false, so the description must carry most of the behavioral load. It does add real context: the ingestion pipeline, the 100-file ceiling, and the content-vs-textContent exclusivity. It omits what the call returns (no output schema exists), whether re-uploading the same fileName overwrites or duplicates, and any permission or size constraints.

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 sentences, front-loaded with the primary and batch modes, then the parameter rule. Every clause carries information and there is no filler or redundant preamble.

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?

For a 7-parameter, 100%-covered tool with no output schema, the description covers the two modes of operation and the encoding choice, which is what an agent most needs before calling. The remaining gap is outcome behavior, since with no output schema the description is the only place a caller could learn what upload returns or how partial failures in a 100-file batch are reported.

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 100% and the schema itself explains files, path, strategy values, and the content/textContent exclusivity. The description restates the mutual-exclusion rule ('not both'), which reinforces but does not extend the schema; it adds no new meaning for containerId, path, or strategy. Baseline 3 applies since the schema does the heavy lifting.

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?

States a specific verb and resource ('Upload one file, or up to 100 with files') and adds the downstream effect ('parsed, chunked, embedded, and made searchable'), so the agent knows this is an ingest-and-index operation rather than a write-to-folder operation. It does not distinguish itself from siblings such as append_to_file or container_create, so it stops short of a 5.

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?

Gives in-tool routing between the single-file path ('fileName' plus content or textContent) and the batch path ('files', up to 100), which is genuinely useful selection guidance. It offers no guidance on when to choose this over append_to_file or on prerequisites such as container existence, so usage is implied rather than fully framed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.