Skip to main content
Glama

Upload Code Step File

uploadCodeStepFile
Idempotent

Upload one UTF-8 file of a code step's program to the content-addressed store. Put the returned sha256 and sizeBytes entry in the revision's config source.bundle manifest (using the returned bucket) via updateRevision on a draft. Uploading does not change a revision or make code live.

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": {
      "agent_id": "<agent_id>",
      "content": "<content>"
    },
    "name": "uploadCodeStepFile"
  }
}

Input Schema

NameRequiredDescriptionDefault
contentYesThe file's contents, as UTF-8 text
agent_idYesThe code step's unique identifier

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Goes beyond the annotations by stating 'Uploading does not change a revision or make code live' — a meaningful side-effect disclosure that reinforces destructiveHint=false and explains the two-step manifest flow. It also indirectly supports idempotentHint=true via the content-addressed store framing, but does not mention size limits, auth requirements, or overwrite/dedup behavior.

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?

Three tight sentences, front-loaded with the action, then the required follow-up, then the non-effect caveat. No restated title or filler; each sentence carries distinct information.

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?

With no output schema, the description compensates by naming the returned fields (sha256, sizeBytes, bucket) and where they go. For a two-parameter upload tool it covers action, return handling, and side effects completely.

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 both agent_id and content are already documented. The description adds only the UTF-8 constraint, which the schema also states, so it does not meaningfully deepen parameter meaning beyond the schema baseline.

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?

Names a specific verb and resource: 'Upload one UTF-8 file of a code step's program to the content-addressed store.' The scoping to code-step programs and the content-addressed store makes the intent unambiguous, though it never explicitly contrasts itself with the sibling uploadSandboxFile or the create*UploadUrl family.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

Clear situational guidance is embedded in the workflow: after upload, place the returned sha256/sizeBytes entry in the revision's config source.bundle manifest via updateRevision on a draft. That tells the agent both when to use it and what must follow. It stops short of stating prerequisites (e.g. draft revision must already exist) or exclusion cases.

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