Skip to main content
Glama

SPACEXPLORATION

Sign attachment upload

sign_attachment_upload

Begin an out-of-band file upload. Returns a presigned R2 PUT URL and the headers to use; the file bytes are uploaded directly to storage, never through this channel. After PUTting the file, call confirm_attachment_upload with the returned attachment_id. Supports listings (photos, documents), users (avatar), and pages (cover, photos). Avatars pass an automated content check before they appear publicly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeYesExact byte size of the file. Verified against the uploaded object at confirm time, so it must be accurate.
filenameYesOriginal filename including extension, e.g. "front-elevation.jpg". Used to derive the storage key and extension.
collectionNoOptional explicit collection: "photos", "documents", "avatar", or "cover". Omit to auto-route by MIME (images→photos, PDFs→documents; documents are PDF only). Singleton slots (avatar/cover) must be set explicitly.
content_typeYesMIME type of the file, e.g. "image/jpeg" or "application/pdf". Must match the collection whitelist.
attachable_idYesIdentifier of the attachable resource. For "listing" pass the listing hashid (e.g. "d5yqqgoa") — the same id every read tool returns. For "user" pass "me" to attach to yourself. For "page" pass its numeric id.
attachable_typeYesMorph alias of the resource to attach to: "listing", "user", or "page".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / collection / description
      Previous value: -"Optional explicit collection: \"photos\", \"documents\", \"avatar\", \"logo\", or \"cover\". Omit to auto-route by MIME (images→photos, PDFs→documents; documents are PDF only). Singleton slots (avatar/cover/logo) must be set explicitly."New value: +"Optional explicit collection: \"photos\", \"documents\", \"avatar\", or \"cover\". Omit to auto-route by MIME (images→photos, PDFs→documents; documents are PDF only). Singleton slots (avatar/cover) must be set explicitly."
  2. Changed1 schema field changed
    • changedInput schema / properties / collection / description
      Previous value: -"Optional explicit collection: \"photos\", \"documents\", \"avatar\", \"logo\", or \"cover\". Omit to auto-route by MIME (images→photos, docs→documents). Singleton slots (avatar/cover/logo) must be set explicitly."New value: +"Optional explicit collection: \"photos\", \"documents\", \"avatar\", \"logo\", or \"cover\". Omit to auto-route by MIME (images→photos, PDFs→documents; documents are PDF only). Singleton slots (avatar/cover/logo) must be set explicitly."
  3. Added

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the out-of-band data flow (bytes go directly to storage, never through this channel), the required follow-up confirmation, the return payload (presigned PUT URL plus headers), and an avatar content-check behavior. These are exactly the operational traits annotations cannot convey.

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?

Front-loads purpose, then return value, then the required follow-up call, then supported targets and the avatar caveat. Every sentence contributes distinct information with no 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?

No output schema exists, and the description compensates by describing the returned artifacts (presigned URL, headers, attachment_id). Together with 100% schema coverage and clear workflow sequencing, an agent has everything needed to call the tool and chain it 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 coverage is 100%, so every parameter is already documented, including collection routing and attachable_id conventions. The description restates the attachable types and collections but adds no syntax or format detail beyond the schema. Baseline 3 is appropriate when the schema carries the load.

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 ("Begin an out-of-band file upload") and immediately clarifies the mechanism: returns a presigned R2 PUT URL. It names the sibling tool confirm_attachment_upload as the next step, so an agent can distinguish this signing step from the confirmation step without opening either schema.

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?

Gives a clear two-step workflow: PUT the file, then call confirm_attachment_upload with the returned attachment_id. It also enumerates supported attachable targets (listings, users, pages). It does not, however, explain when to prefer this over the sibling attach_listing_photo, leaving that alternative unaddressed.

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