Skip to main content
Glama

Send a page file

upload_page_file

Sends one chunk of one file of an open upload. A file goes up in as many chunks as it needs, each at most 196608 bytes before encoding, numbered from 0, with chunks the total for the file; a file that fits is one chunk, chunk 0 of 1. data is the chunk's bytes as UTF-8 text (encoding "utf8") or base64 (encoding "base64", for images, fonts and any file that is not plain text). Sending a chunk again replaces it. Only paths in the upload's manifest are accepted, and the bytes are checked against the manifest's sha256 when the upload is submitted. Nothing becomes visible. Requires the pages:write scope. Publishing, unpublishing and changes to the live profile are made only by the owner, in Entry.

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": {
      "entryId": "<entryId>",
      "uploadId": "<uploadId>",
      "path": "<path>",
      "chunk": "<chunk>",
      "chunks": "<chunks>",
      "encoding": "<encoding>",
      "data": "<data>"
    },
    "name": "upload_page_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesThe chunk's bytes in the stated encoding. At most 196608 bytes once decoded.
pathYesA file's path inside the bundle: relative, / between folders, letters, digits, dot, underscore and hyphen only, at most 200 characters, such as index.html or assets/app.js.
chunkYesThis chunk's number, counting from 0.
chunksYesHow many chunks the whole file goes up in: its size divided by 196608, rounded up (at least 1).
entryIdYesThe Entry's id (starts with ent_), as returned by list_entries.
encodingYes"utf8" for text, "base64" for binary files.
uploadIdYesThe upload's id, as returned by start_page_revision.

Output Schema

NameRequiredDescriptionDefault
codeNoOnly when the call failed (isError): the error code, e.g. conflict, forbidden, not_found, validation_failed, rate_limited.
pathNoThe file this chunk belongs to.
chunksNoHow many chunks the file has in all. When received equals chunks the file is complete.
detailsNoOnly when the call failed: conflict has revision, forbidden has requiredScope, rate_limited has retryAfter (seconds), validation_failed has problems; a refused page bundle has errors (code, path, detail, fix for each) and a stale page revision has revision.
messageNoOnly when the call failed: what went wrong and what to do.
receivedNoHow many of the file's chunks Entry now holds.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations it discloses the auth requirement ("Requires the pages:write scope"), the staging guarantee ("Nothing becomes visible"), retry behavior ("Sending a chunk again replaces it"), and server-side validation timing (sha256 checked at submission, not here). It also draws a boundary with the live profile, which is managed elsewhere in Entry. Note a mild tension with idempotentHint=false, since resending a chunk replaces it, but this is a retry note rather than a contradiction of the annotation's meaning.

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?

Five dense sentences, front-loaded with the core action and followed by constraints in a sensible order. Some content (chunk limit, 0-based numbering) restates the schema, so a sentence or two is redundant for an agent that reads schemas, but nothing is padded or vague.

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-required-parameter write with an output schema, the description covers the parts the structured fields cannot: scope requirement, staging/non-visibility, replace-on-retry, manifest path restriction, and deferred hash validation. Remaining gaps are ordering/parallelism rules for chunks and failure behavior, which are not addressed.

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 schema already documents all seven parameters; the description nonetheless adds operational meaning: chunk numbering starts at 0 and a small file is "chunk 0 of 1," and the encoding choice is given a decision rule ("utf8 for text, base64 for images, fonts and any file that is not plain text"). Minor friction: it says "196608 bytes before encoding" while the schema says "once decoded," which is slightly inconsistent phrasing for the same limit.

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?

"Sends one chunk of one file of an open upload" gives a specific verb (sends), a scoped resource (one chunk of one file), and a precondition (open upload) that distinguishes it from get_page_file (reads) and submit_page_revision (finalizes). The chunking model (chunk N of M, 0-indexed) is stated immediately so the agent knows the granularity of the operation.

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 establishes the workflow context clearly — this operates on an "open upload" identified by uploadId from start_page_revision, only accepts paths from the manifest, and is validated later "when the upload is submitted." That is enough to place the tool in the sequence. However, it never explicitly names the prerequisite or the follow-up sibling (starting an upload, submitting a revision), and gives no exclusions or guidance on chunk ordering/parallelism.

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.