Skip to main content
Glama

Append a chunk to an upload

file_write_chunk

Append the next base64-encoded chunk to an active file upload, sent in strict order with a zero-based sequence index to safely handle retries without duplicate data.

Instructions

Append the next chunk of bytes (base64) to an upload started with file_write_begin. Send chunks strictly in order, one at a time. Pass seq (0-based chunk index) so a resend after a lost response is acknowledged instead of double-appended.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seqNo0-based index of this chunk — a resend of an already-staged index is a safe no-op
upload_idYes
data_base64Yesthis chunk's bytes, base64-encoded

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bytesYestotal bytes staged so far
chunksNo
duplicateNo
upload_idYes
Behavior4/5

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

Annotations already provide safety flags (readOnlyHint false, etc.). The description adds valuable behavioral context: chunks must be strictly ordered, and resending with the same seq is a safe no-op. This goes beyond annotations without contradicting them.

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 focused sentences: the first states purpose, the second explains ordering and retry semantics. No redundancy, front-loaded, every word earns its place.

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 tool in a multi-step upload flow, the description covers essential lifecycle context (started with file_write_begin), ordering, and retry safety. Output schema exists, so return values are documented elsewhere. Missing explicit error cases but not necessary for core usage.

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 covers two of three parameters with descriptions (seq and data_base64). The description reinforces seq's purpose (0-based index for safe resend), adding meaning beyond the schema's description. upload_id lacks description, but the coverage is sufficient.

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 clearly states the tool appends the next chunk of base64 bytes to an upload started with file_write_begin. It names a specific verb and resource, and the mention of file_write_begin distinguishes it from sibling tools like file_write_commit and file_write.

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 implicitly defines when to use: after file_write_begin, before commit, and explicitly requires sending chunks in order, one at a time. It also explains safe resend behavior with seq, giving clear usage context. However, it does not explicitly name alternatives or exclusion criteria.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/2nd1st/open-mcp-apps'

If you have feedback or need assistance with the MCP directory API, please join our Discord server