Skip to main content
Glama

Finalize a large upload

finalize_upload
DestructiveIdempotent

Checks uploaded hashes, screens the new bytes, and commits one version under the slug lock. Inputs: session (upl_...), optional expected_version, via, and token. A stale expected_version returns version_conflict and writes nothing. A bad hash returns hash_mismatch. An expired session returns session_expired.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
viaNoOptional label stored with the publish. At most 80 characters. An IP address, a URL, or an email address is not stored. A non-empty value replaces the X-Via header.
tokenNoBearer token returned by your first publish (deed_tok_...). Optional if the MCP client sends Authorization: Bearer.
sessionYesUpload session id (upl_...).
expected_versionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / via
      Added value: +{
      +  "description": "Optional label stored with the publish. At most 80 characters. An IP address, a URL, or an email address is not stored. A non-empty value replaces the X-Via header.",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / session / description
      Previous value: -"session id from plan_upload (upl_...)."New value: +"Upload session id (upl_...)."
  3. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and readOnlyHint=false, so the safety profile is covered. The description adds real value beyond that: hash verification, content screening, slug locking, and the crucial 'writes nothing' guarantee on version_conflict, which tells the agent a failed call is safe to retry.

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?

Front-loaded with the core action, then inputs, then failure modes in a tight three-sentence block with no filler. The 'Inputs:' enumeration partially restates the schema, which is the only minor redundancy.

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 four-parameter mutation with no output schema, the description covers prerequisites (session id), concurrency handling (expected_version), and three named error outcomes. It omits what a successful commit returns (e.g., version identifier), which is the only meaningful gap.

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 75%, and the one undocumented parameter, expected_version, is exactly what the description explains — a stale value yields version_conflict and no write. It also confirms the session format (upl_...). via and token semantics are already fully carried by 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?

States a specific verb and resource chain: verifies hashes, screens bytes, and commits one version under the slug lock. This clearly separates it from plan_upload (which only plans) and publish_site, and the 'finalize' framing signals the terminal step of an upload session.

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

Usage Guidelines3/5

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

The error cases imply this is the step taken after bytes are uploaded, but the description never explicitly says to call it after plan_upload or when to prefer publish_site instead. Usage is inferable from context rather than stated, which is the definition of implied guidance.

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