Skip to main content
Glama

TOS 上传文件 tos/object/put

tos_object_put

Upload a local file to a private Volcengine TOS bucket and return a presigned download URL (default 24h) for controlled access.

Instructions

上传本地文件到火山引擎 TOS(API Action: PutObject,对应工具名 tos_object_put = 服务_资源_动作),bucket 保持私有,返回预签名下载 URL(默认 24h 有效)。对象 key 默认为 //<文件名>。需要环境变量 VOLC_TOS_ACCESS_KEY / VOLC_TOS_SECRET_KEY / VOLC_TOS_BUCKET / VOLC_TOS_REGION。

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": {
      "file_path": "<file_path>"
    },
    "name": "tos_object_put"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyNo完整对象 key;不传则自动生成 <prefix>/<日期>/<文件名>
bucketNo覆盖默认 bucket
prefixNokey 前缀,默认取 VOLC_TOS_PREFIX,再默认 volcengine-api-mcp
regionNo覆盖默认 region
expiresNo预签名 URL 有效期(秒),默认 86400(24h)
endpointNo覆盖默认 endpoint
file_pathYes要上传的本地文件路径(绝对路径)
content_typeNo覆盖 Content-Type(默认按扩展名推导,未知类型为 application/octet-stream)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A3.6/5.0
Behavior3/5

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

Because no annotations are provided, the description must carry the full burden of explaining behavior. It does add real value by stating that the bucket remains private, by describing the returned presigned URL and its 24h validity, by defining the default key pattern, and by naming the four required environment variables. However, it omits critical write semantics: it does not say whether uploading to an existing key overwrites or fails, does not describe size limits or multipart thresholds, and gives no error behavior for a mutation 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?

The purpose and storage target are front-loaded, and the return value and credential requirements follow in a compact paragraph with no filler. It is a single dense block rather than clearly separated concerns, but nothing is redundant enough to count as wasted space.

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

Completeness3/5

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

For an 8-parameter write tool with no annotations and no output schema, the description should explain result shape (it does: presigned URL) and side effects. Its remaining gap is overwrite and failure semantics for an upload that can silently replace an existing object. Because the definition is otherwise complete, that omission is the main shortfall.

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 every one of the 8 parameters is already documented in the schema, including the key generation rule, the env-var-derived defaults for prefix/bucket/region, and the expires default. The description restates a subset of that (key pattern, 24h default) without adding new syntax or constraints. Baseline 3 is appropriate because the schema does the heavy lifting.

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?

The description gives a concrete verb and resource ("上传本地文件到火山引擎 TOS"), names the underlying API Action (PutObject), and explains the naming convention tos_object_put = 服务_资源_动作. An agent can immediately tell this writes a local file into object storage, and no sibling tool covers that.

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

Usage Guidelines3/5

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

Usage is implicitly clear from the single-sentence purpose statement. The description never says when to use this tool instead of other tools, nor when not to use it, such as when to overwrite an existing object or when to use a multipart upload for large files. The runtime prerequisites (env vars) are stated, which helps with invocation.

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