Skip to main content
Glama

Start a large-file upload (step 1 of 3)

prepare_upload

Publish or replace a file TOO BIG to pass as text to create_page / update_page (anything over ~100 KB, or a ZIP / PDF / image). Requires that you can run shell commands (to run curl) and read the file from disk. Three steps: (1) call prepare_upload — it returns a one-time upload URL, a ready curl command and a ticket; (2) run that curl command in your shell, replacing @FILE with the path to the file (it sends the file's raw bytes, so there is no size limit beyond the plan's file cap); (3) call finish_upload with the ticket to publish. To UPDATE a page you already published and keep its SAME link, pass page (its viewer URL or slug); omit page to make a new link. If curl cannot reach the upload URL (no network access from your sandbox), tell the user to upload with the miinideck CLI (npx miinideck deploy <path>) or the web uploader instead — do not retry with create_page.

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": {
      "file_kind": "<file_kind>",
      "size_bytes": "<size_bytes>"
    },
    "name": "prepare_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoOptional. The viewer URL or slug of a page you own or that was shared with you as a collaborator, to replace its content in place (same link). Omit to create a new page.
titleNoOptional readable label used when making a NEW link. Ignored when `page` is set.
file_kindYesWhat the file is: 'html' (one HTML file), 'zip' (a multi-file site as a ZIP), 'pdf', 'png' or 'jpeg'.
size_bytesYesThe file's exact size in bytes (e.g. from `wc -c`).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / page / description
      Previous value: -"Optional. The viewer URL or slug of a page you own, to replace its content in place (same link). Omit to create a new page."New value: +"Optional. The viewer URL or slug of a page you own or that was shared with you as a collaborator, to replace its content in place (same link). Omit to create a new page."
  2. Changed3 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / size_bytes / maximum
      Added value: +9007199254740991
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does: it discloses that prepare_upload is not itself the upload (it mints a one-time URL, a ready curl command and a ticket), that the curl step sends raw bytes so the only ceiling is the plan's file cap, that the ticket ties steps together, and what to do when the upload URL is unreachable. It also states the side effect of passing `page` (content replaced in place, same link preserved).

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?

Despite its length, it is front-loaded with the discriminating fact (file too big for text-based tools) and then proceeds through the steps in execution order, so the agent can act while reading. Some compressed redundancy remains between the numbered steps and the surrounding prose, but no sentence is filler.

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 multi-step, out-of-band upload flow with no output schema and no annotations, this is complete: it describes what step 1 returns (URL, curl command, ticket), how steps 2 and 3 connect, the update-vs-create branch, size ceilings, and a recovery path. Nothing an agent needs in order to call it correctly is missing.

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%, so all four parameters including the file_kind enum are already documented. The description reinforces the highest-stakes semantic — pass `page` to replace an existing page and keep its link, omit it to mint a new one, with `title` relevant only for new pages — but this largely restates what the schema already says rather than adding new meaning. Baseline 3 is appropriate.

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 names a specific action (start a large-file upload, step 1 of 3) and sharply delimits it from siblings: files 'TOO BIG to pass as text to create_page / update_page (anything over ~100 KB, or a ZIP / PDF / image)'. An agent can tell immediately whether this tool or create_page applies, without opening a sibling schema.

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?

It gives explicit preconditions (shell access, ability to run curl, file readable from disk), a numbered three-step workflow naming the sibling to call at each stage (prepare_upload → curl → finish_upload), and a stated anti-pattern ('do not retry with create_page') with named fallbacks (the npx miinideck deploy CLI or the web uploader) for when the sandbox has no network.

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.

Resources