Skip to main content
Glama

Upload a file

upload_artifact

Upload a file from base64 content and return its id, its private share link as url, expires_at, size_bytes and secret_flags. The link stops working when the file expires. The decoded file can be up to 25 MiB; for larger files, create_upload_url takes the bytes by PUT instead. The secret scan reads the first 1 MiB of the file, and secret_flags names each kind of secret-shaped content it finds. With on_secret "flag", the default, a flagged file is stored and the result adds a warning and secret_flag_locations. With on_secret "reject", a flagged file is not stored and the call returns the secret_detected error.

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": {
      "filename": "<filename>",
      "content_base64": "<content_base64>"
    },
    "name": "upload_artifact"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameYesThis is the file name, including its extension, such as screenshot.png. The allowed extensions are png, jpg, jpeg, webp, gif, txt, md, log, json, har and pdf, and the file's contents must match its extension.
ttl_daysNoThis is the number of days until the link expires, as a whole number of 1 or more. If you leave it out, the link expires at the plan's maximum, which is 7 days on Free, 90 on Team, 90 on Team Plus and 365 on Scale. A larger value is lowered to the plan's maximum, and the result then includes ttl_adjusted: true. A value of zero or less is rejected. The result's expires_at is the applied expiry.
mime_typeNoThe server does not use this value; it takes the file's type from the extension in filename. If you send it, it must be a string.
on_secretNoThe value is either "flag" or "reject", and the default is "flag". With "flag", a file with secret-shaped content is stored, and the result lists secret_flags and adds a warning and secret_flag_locations. With "reject", that file is not stored and the call returns the secret_detected error.
content_base64YesThis is the file's content as standard base64. Line breaks and a data:<mime>;base64, prefix are accepted. The decoded file can be up to 25 MiB.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnly=false, destructive=false, idempotent=false, openWorld=false; the description goes well beyond by disclosing the 25 MiB decoded cap, the 1 MiB secret-scan window, the fact that the link stops working at expiry, and the divergent outcomes of on_secret (stored plus warning and secret_flag_locations vs. not stored plus the secret_detected error). That is exactly the mutation-and-failure context the annotations cannot carry.

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 return fields are front-loaded and every sentence carries information about limits, expiry, or secret handling. It is a dense single block, though, with the on_secret explanation appearing both in the description and the schema, which is slight 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?

There is no output schema, yet the description documents the return fields (id, url, expires_at, size_bytes, secret_flags), the conditional extras (warning, secret_flag_locations, ttl_adjusted), and the secret_detected error path. For a five-parameter mutation tool, an agent has everything needed to call it and interpret the result.

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 100%, so the baseline is 3; the description still adds real meaning by explaining that secret_flags names each kind of secret-shaped content found and that flagging only inspects the first 1 MiB. It largely restates the on_secret enum semantics already in the schema, which keeps it from a 5.

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 ("Upload a file from base64 content") and enumerates what comes back (id, url, expires_at, size_bytes, secret_flags). It also names the sibling create_upload_url and the exact condition (files over 25 MiB) that selects it, so the tool is distinguishable without opening any 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 alternative and the threshold that triggers it: "for larger files, create_upload_url takes the bytes by PUT instead." It also spells out the two on_secret modes with their consequences, so the agent knows both when to pick this tool and how to configure the secret policy.

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.