Skip to main content
Glama

CreateUploadUrlTool

Returns a short-lived URL for uploading a file directly to storage and a signed blob id for attaching it to a piece or to a message on it. attachable_to_piece says whether the piece itself will take the file; when false, attach it to a message on the piece.

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": {
      "account_code": "<account_code>",
      "piece_relative_id": "<piece_relative_id>",
      "file_name": "<file_name>",
      "byte_size": "<byte_size>",
      "checksum": "<checksum>"
    },
    "name": "CreateUploadUrlTool"
  }
}

Input Schema

NameRequiredDescriptionDefault
checksumYesBase64-encoded MD5 digest of the file, as printed by `openssl md5 -binary FILE | base64`
byte_sizeYesExact file size in bytes
file_nameYesFilename with extension (e.g., "screenshot.png")
account_codeYesAccount code (e.g., "bcp", "jchsoft")
content_typeNoMIME type of the file; derived from the file extension when omitted
piece_relative_idYesRelative ID of the piece the file will be attached to

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, openWorldHint=false, so the bar is lower, and the description still adds useful behavior: the URL is short-lived, the blob id is signed, and the attachable_to_piece flag controls destination. It omits upload mechanics (HTTP method, required headers, TTL length) that an agent would need to actually perform the upload.

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?

Two tight sentences, both front-loaded: first what is returned, then how to interpret the routing flag. No filler or restatement of the tool name.

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?

With no output schema, the description carries the burden of explaining returns and does so by naming the three things an agent gets back (URL, signed blob id, attachable_to_piece). The main residual gap is the mechanics of the upload itself, which matter for a tool whose whole purpose is to enable that upload.

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 the schema already documents all six parameters in detail, including the checksum format and content_type fallback. The description adds no parameter-level meaning of its own and only explains attachable_to_piece, which is a return value, not an input.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: returns a short-lived upload URL plus a signed blob id, and explains the two downstream targets (a piece or a message on it). An agent can tell this is the pre-upload negotiation step rather than the attachment-creation step, though no sibling is named explicitly.

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 conditional 'when attachable_to_piece is false, attach it to a message on the piece' gives real routing guidance, but there is no explicit statement of when to call this instead of AddAttachmentTool/CreateAttachmentLinkTool, nor any prerequisite ordering beyond the implied flow.

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