Skip to main content
Glama

upload_artifact

Destructive

Store base64-encoded files in a workspace content-addressed artifact store, register metadata, and return a SHA-256 record; identical bytes deduplicate and reuse the same hash.

Instructions

Store a file in the workspace's content-addressed artifact store from base64 bytes and register its metadata, returning the artifact record with its sha256, size_bytes, kind and mime_type. Identical bytes share one sha256, and uploading them again overwrites the workspace's recorded kind and mime_type and emits another artifact_upserted event. The whole request must fit the server's request body limit (2 MiB by default); for larger files use begin_artifact_multipart, which needs an S3 backend. The upload is refused, and nothing stored, when the workspace is over its stored-bytes allowance or when a screenshot, recording or attachment would exceed its media quota. Use link_thread_artifact to attach the result to a thread as evidence. Requires artifact:upload.

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

Input Schema

NameRequiredDescriptionDefault
kindYesWhat the artifact is: screenshot, recording, transcript, code_dump or attachment. Screenshot, recording and attachment are media and count toward the workspace's media quota and can expire; transcript and code_dump are evidence and are never counted or expired.
mime_typeNoOptional media type of the bytes, for example image/png, recorded on the artifact's metadata.
content_base64YesThe file's bytes, standard base64 encoded. It must decode and must not be empty.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv479.0.2
    • addedInput schema / properties / content_base64 / description
      Added value: +"The file's bytes, standard base64 encoded. It must decode and must not be empty."
    • addedInput schema / properties / kind / description
      Added value: +"What the artifact is: screenshot, recording, transcript, code_dump or attachment. Screenshot, recording and attachment are media and count toward the workspace's media quota and can expire; transcript and code_dump are evidence and are never counted or expired."
    • addedInput schema / properties / mime_type / description
      Added value: +"Optional media type of the bytes, for example image/png, recorded on the artifact's metadata."
  2. First observedv479.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, it discloses the content-addressing model (identical bytes share one sha256), the overwrite of recorded kind/mime_type on re-upload, the emitted artifact_upserted event, the 2 MiB request-body ceiling with its S3-backed alternative, quota-based refusal with nothing stored, and the required artifact:upload scope. This is unusually complete disclosure for a mutating tool.

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 and the return contract, then limits, then quotas, then the follow-up tool. Dense but nearly every clause carries distinct operational information; the opening sentence is long and could be split for scanability.

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 mutation tool with no output schema, it fully covers the returned record fields, the size and quota constraints, the auth requirement, failure semantics, and the correct sibling alternatives. Nothing an agent needs in order to call it safely is missing.

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 description coverage is 100%, so kind, mime_type and content_base64 are already documented, including the media-vs-evidence distinction. The description adds only the clarification that the 2 MiB limit applies to the whole request body rather than the decoded bytes, which is useful but marginal against a fully documented 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 (store a file in the content-addressed artifact store from base64 bytes) plus the metadata registration and return shape. It is clearly separable from begin_artifact_multipart and the other multipart siblings, which are 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 Guidelines5/5

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

Gives explicit routing rules: use begin_artifact_multipart for files beyond the 2 MiB body limit, use link_thread_artifact to attach the result to a thread. It also states the refusal conditions (stored-bytes allowance, media quota) up front so the agent knows when not to call it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools