Skip to main content
Glama

Upload App Document

document_upload

Create a short-lived, byte-scoped upload session for an HTML document authored in a native editor or shell. The caller supplies the exact UTF-8 byte length and SHA-256 hex digest as { size, sha256, app_id? }. The returned upload_url accepts a PUT of those raw UTF-8 bytes with Authorization: Bearer <upload_token>; this ticket can upload only the declared bytes and is not an account credential. The returned document_id is used by deploy_app and is mutually exclusive with html and html_path. The ticket expires after 15 minutes. A retry with the same ticket and deploy parameters returns the original deployed result for 24 hours; changed content or deploy parameters need a fresh upload session. If the shell cannot reach the upload URL, inline deployment remains available. The PUT works from any network-capable shell and does not require the Homespun CLI.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeYesUTF-8 byte length of the HTML document.
app_idNoExisting app id when this upload is for a redeploy; omit for a create.
sha256YesSHA-256 hex digest of the exact UTF-8 HTML bytes to upload.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only provide generic hints (readOnlyHint=false, destructiveHint=false, openWorldHint=true, idempotentHint=false). The description goes far beyond: it discloses the 15-minute ticket expiry, byte-scoped upload constraint, required Authorization header, that the ticket is not an account credential, the 24-hour idempotent retry behavior, and a fallback if the URL is unreachable. This is rich behavioral context for a mutation tool.

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?

The description is eight sentences but is front-loaded with the purpose and each sentence contributes unique information (inputs, upload mechanics, output usage, expiry, retry, fallback, portability). It could be slightly tighter, but given the complexity, it is well-structured and avoids redundancy.

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?

With no output schema and only sparse annotations, the description fully compensates by explaining the returned upload_url and document_id, their usage in deploy_app, the 15-minute expiry, 24-hour idempotent retry, and a fallback deployment path. An agent has everything needed to call and integrate this tool correctly.

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 the baseline is 3. The description restates the required parameters as { size, sha256, app_id? } but adds no semantic detail beyond what the schema already documents (e.g., exact UTF-8 byte length, SHA-256 hex digest, app_id for redeploy). It does not clarify edge cases or format nuances not already covered.

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+resource: 'Create a short-lived, byte-scoped upload session for an HTML document authored in a native editor or shell.' It clearly distinguishes this tool from siblings like deploy_app and ingest by naming the returned document_id and its mutually exclusive relationship with inline html/html_path.

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 states when to use this tool (from a native editor or shell that can reach the upload URL) and when not to (if the shell cannot reach the upload URL, inline deployment via deploy_app is the alternative). It also explains the relationship to deploy_app and the retry semantics for redeployment, leaving no ambiguity about routing.

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