Skip to main content
Glama
daomengKJ
by daomengKJ

upload_attachment

Upload attachment files for leave applications by providing base64 encoded file content. Supports batch upload of multiple files up to 10MB each.

Instructions

批量上传附件文件。

将 base64 编码的文件内容解码后调用接口 7 上传。支持同时上传多个附件。 单文件大小上限由 MAX_ATTACHMENT_SIZE_MB 控制(默认 10MB)。

Args: user_token: 用户认证 Token。 files: 附件列表,每个元素包含 file_name、mime_type、file_base64。

Returns: UploadResult: 包含上传后的文件 ID 和文件名列表。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYes
user_tokenYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYes执行结果描述
successYes是否执行成功
file_idsNo上传后的文件 ID 列表
file_namesNo上传后的文件名列表
Behavior3/5

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

The description reveals that it decodes base64 and calls an internal API, and mentions a file size limit (10MB default). However, with no annotations, it does not disclose potential side effects, authentication requirements beyond user_token, or error handling behavior, which limits transparency.

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 description is structured with a brief introductory sentence followed by sections for details, args, and returns. It is clear but could be more concise; the front-loaded purpose sentence is effective.

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?

Given the presence of an output schema (UploadResult) and no annotations, the description adequately covers purpose, parameters, size limits, and multiple file support. Missing details like error handling and output format description are partially compensated by the output schema.

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?

The schema already provides detailed descriptions for each parameter (e.g., file_name, file_base64). The tool description adds value by explaining the decoding process and the size limit, which are not in the schema. This extra context justifies a score above baseline 3.

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 clearly states '批量上传附件文件' (batch upload attachment files) with a specific verb and resource. The name and context distinguish it from siblings like check_attachment_requirement and calculate_leave_days, making its purpose unambiguous.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. The description does not mention any prerequisites, exclusions, or comparison to other tools, leaving the agent to infer usage context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/daomengKJ/leave_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server