Skip to main content
Glama

Start file upload

start_upload

Upload local files (on the disk you can reach with a shell) to the user's AdChat library, up to 20 per call. Steps: 1. For each file get its exact byte size (wc -c < file), its MIME type (e.g. image/png) and optionally its sha256 (shasum -a 256 file), and call start_upload with files: [{name, size, type, sha256, path}]. 2. Run the curl command returned for each file (POSIX shell): it PUTs the bytes to private storage (curl -fsS --globoff -X PUT -T -H 'content-type: ' '<put_url>'); the size and content-type must match what you declared, within 10 minutes. 3. Call finish_upload with the upload_ids. It returns each file_id for meta_upload_media, read_file and the rest. A file marked reused is already saved: use its file_id, nothing to upload. Limits match the web app: images 50 MB, video and audio 200 MB, other files 25 MB, 2 GB in total.

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": {
      "files": "<files>"
    },
    "name": "start_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesYes
account_idNoe.g. act_1234567890

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare that this is a non-readonly, non-idempotent, non-destructive write. The description adds substantive context the annotations cannot convey: the bytes are PUT to private storage, size and content-type must match the declared values, the URL expires in 10 minutes, and the full per-type size limits (50 MB images, 200 MB video/audio, 25 MB other, 2 GB total). That is exactly the kind of behavioral detail an agent needs to avoid a failed upload.

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?

Purpose and batch cap are front-loaded, then a numbered workflow keeps the procedure scannable. It is dense and long for a single description, and the curl invocation string is arguably more detail than the agent needs, 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, stateful upload flow with no output schema, the description covers the entire lifecycle: what this call returns (a curl command), what it expects on the wire, the timeout, and what finish_upload produces (file_ids for meta_upload_media and read_file). Nothing an agent needs in order to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 50%, and the description compensates by giving the exact provenance for each value (wc -c for size, shasum -a 256 for sha256, MIME example for type), the constraint that type must equal the PUT content-type, and the fact that path is only used to render the curl command and is never stored. The 'sha256 lets AdChat reuse a file' line explains a parameter's effect rather than restating its type.

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, resource, and scope: 'Upload local files (on the disk you can reach with a shell) to the user's AdChat library, up to 20 per call.' It also distinguishes itself from the sibling finish_upload by naming it as the required next step, so an agent can tell the two apart 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 Guidelines5/5

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

Gives an explicit three-step procedure with the exact commands to compute byte size and SHA-256, the required field shape, and the handoff to finish_upload. It also names the 'reused' case with an explicit exclusion ('nothing to upload'), which is the when-not-to-act guidance most tools lack.

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.