Skip to main content
Glama

STEM — Persistent AI Memory

Save a file to STEM

upload_file

On explicit user request, save actual file bytes privately to STEM. Requires a media-enabled plan. Use a host-provided file reference, or actual base64 bytes from a file-capable client; never invent bytes or a URL. Maximum 8 MiB per call; larger files use the STEM Library. If unavailable, direct the user to the Library and do not claim the image was saved.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "upload_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNo
nameNoFile name, required for data_base64.
data_base64NoAlternative actual file bytes, standard base64, maximum 8 MiB decoded.

Output Schema

NameRequiredDescriptionDefault
okNo
fileNo
nextNo
statusNo
attachedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedOutput schema / properties / file / properties / downloadUrl
      Added value: +{
      +  "format": "uri",
      +  "type": "string"
      +}
    • addedOutput schema / properties / file / properties / viewUrl
      Added value: +{
      +  "format": "uri",
      +  "type": "string"
      +}
    • addedOutput schema / properties / status
      Added value: +{
      +  "enum": [
      +    "file_stored"
      +  ],
      +  "type": "string"
      +}
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond annotations, the description discloses a media-enabled plan requirement, privacy expectations, byte provenance rules, an 8 MiB per-call limit, and fallback behavior. It also warns not to claim success when the file was not saved, which is important behavioral context for a write operation.

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?

The description is dense but front-loaded with the core action and permission condition, then proceeds through input methods, limits, and failure handling. Every sentence adds operational value without unnecessary repetition.

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?

Given the nested input schema and the presence of an output schema, the description covers the key non-schema details an agent needs: plan requirement, valid input sources, size limit, and fallback behavior. Return values need not be explained because an output schema exists.

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 67%, so the description must add meaning for the file input. It clarifies the two supported input modes—host-provided file reference versus actual base64 bytes—and warns never to invent bytes or a URL, though it does not explain the nested file fields such as file_id, download_url, or mime_type.

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?

The description states a specific verb and resource: save actual file bytes privately to STEM. It is distinguishable from sibling tools like link and read_file, but it does not explicitly name or contrast with attach_file, so sibling differentiation is implicit rather than explicit.

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?

It gives explicit when-to-use guidance: only on explicit user request, using a host-provided file reference or actual base64 bytes. It also states when not to use it, including larger files using the STEM Library and unavailability handling.

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