Skip to main content
Glama

upload_file

Upload actual file bytes as Base64 (at most 1MiB decoded); larger files use begin_file_upload/append_file_chunk/finish_file_upload. Return a user/module-bound file ID. / 上传小文件,大文件使用分块工具,总大小最多50MiB。

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

Input Schema

NameRequiredDescriptionDefault
filenameYes
module_idYes
input_nameNofile
content_base64Yes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose the decoded byte cap, the return value binding (user/module), and the chunked fallback. It omits permissions/scopes required, overwrite/duplicate-filename behavior, error modes, and any rate limits, which matter 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.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The English sentence is tight and front-loads the size limit before the alternative tools. The trailing bilingual restatement repeats the same content while introducing a conflicting 50MiB figure, which is wasted length that actively muddies the routing decision.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-value detail is not required, and the description still names the returned file ID. For a simple single-shot upload with an explicit fallback path this is close to complete, with the main residual gap being no statement of required permissions or failure behavior.

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 0% across 4 parameters, so the description must compensate. It adds real meaning for content_base64 (Base64 bytes, decoded size cap) and implies module binding via the returned 'module-bound file ID', but says nothing about filename or the input_name field (default 'file'), leaving half the parameters opaque.

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 actual file bytes as Base64') plus the scope constraint (at most 1MiB decoded) and what it returns (a user/module-bound file ID). It is clearly distinguished from the chunked-upload siblings, so an agent can tell it apart without opening schemas.

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?

Explicitly routes large files to begin_file_upload/append_file_chunk/finish_file_upload, which is exactly the when-not guidance needed. However, the Chinese sentence adds '总大小最多50MiB' (total size at most 50MiB), which does not reconcile with the 1MiB decoded limit and can leave the agent unsure where the cutoff lies.

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