Skip to main content
Glama

Add files to a staging session

add_files
Idempotent

Append files to an open staging session. Call as many times as needed; commit_deploy applies them all at once. Validates path/extension/encoding on every call so a bad file fails fast. Same 500 MB cap as single-call deploys, but cumulative across the session. LARGE TEXT FILES: a file that looks too big to inline (100-250 KB of HTML/CSS/JS) usually still fits in ONE call — gzip it locally, base64 the result, send with encoding:'gzip+base64' (text compresses 3-5×, so ~250 KB of source ≈ ~70 KB on the wire). Prefer that over add_file_chunk: one call, no ordering hazards. Only chunk when a single file exceeds ~250 KB of source even after gzip, or when you have no way to gzip locally. If your environment can run shell but can't reach this host, gzip+base64 via add_files is the fastest path; if it CAN reach this host, begin_deploy's uploadUrl (tarball POST, 100 MB) beats everything.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYesFiles to append to the staging scratch dir. Same wire shape as deploy_site/update_site — array form supports binary via encoding:'base64'; map form is utf8-only. Re-adding a path overwrites the previously staged version. Cumulative cap across the whole session: 500 MB.
deployIdYesSession id returned by begin_deploy.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
deployIdYes
warningsNo
filesAddedYesFiles written by this call.
totalBytesYesTotal bytes staged so far across all add_files calls.
totalFilesYesTotal files now in the scratch dir.
remainingBudgetYesBytes still available before hitting the 500 MB cap.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedOutput schema / properties / request_id
      Removed value: -{
      -  "description": "Server-assigned request correlation id. Quote it when contacting support.",
      -  "type": "string"
      -}
  2. Changed1 schema field changed
    • addedOutput schema / properties / request_id
      Added value: +{
      +  "description": "Server-assigned request correlation id. Quote it when contacting support.",
      +  "type": "string"
      +}
  3. First observed

TDQS

A4.9/5.0
Behavior5/5

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

The description adds rich behavioral detail beyond the annotations: per-call validation, fail-fast behavior, cumulative 500 MB session cap, overwrite semantics for re-added paths, server-side gunzipping, and encoding guidelines. It also clarifies the idempotentHint by explaining what happens when a path is added again.

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?

The description is long but every sentence carries actionable information. It front-loads the core behavior, then uses a clearly marked LARGE TEXT FILES section for the nuanced guidance. The structure makes the dense content scannable and purposeful.

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?

For a tool with this complexity, the description covers everything an agent needs: the operation, parameters, encoding options, size limits, failure behavior, and clear routing to alternatives. The output schema exists, so return-value details are not needed, and no critical context is missing.

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 100%, so the baseline is 3, but the description adds meaningful operational context: it explains how gzip+base64 compression affects wire size, when to use each encoding, and how the files parameter behaves cumulatively across the session. This goes beyond simply restating the schema.

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 opens with a specific verb and resource: 'Append files to an open staging session,' making the tool's function unmistakable. It also distinguishes itself from siblings by explaining how it differs from add_file_chunk and begin_deploy's uploadUrl, so an agent can select it correctly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit when-to-use guidance: prefer this over add_file_chunk for large text, only chunk when a single file exceeds ~250 KB after gzip, and use begin_deploy's uploadUrl when the host is reachable. It also explains that repeated calls are expected and that commit_deploy applies everything at once, covering both usage and alternatives.

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.