Skip to main content
Glama
rowanlin-dev

ima-mcp-server

by rowanlin-dev

upload_file

Upload local files to a specified knowledge base, supporting PDF, Word, PPT, Excel, Markdown, images, TXT, XMind, audio, and HTML. Automatically renames duplicates with a timestamp.

Instructions

将本地文件上传到指定知识库(支持 PDF / Word / PPT / Excel / Markdown / 图片 / TXT / XMind / 音频 / HTML 等)。内部流程:类型与大小预检 → 重名检测(命中自动追加时间戳)→ create_media 获取 COS 临时凭证 → 上传 COS → add_knowledge 正式入库。视频文件(.mp4 等)不支持,请改用 import_urls 以 URL 方式添加。verify=true 时仅上传到 COS 不入库,便于验证凭证与网络。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
verifyNo仅 true 时只上传到 COS 不调用 add_knowledge(用于验证凭证/网络),默认 false。
file_pathYes待上传文件的本地绝对路径(或相对路径,将按进程工作目录解析)。
folder_idNo目标文件夹 ID(folder_ 前缀)。省略则上传到根目录。
knowledge_base_idYes目标知识库 ID。
Behavior5/5

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

With no annotations, the description carries full responsibility for disclosure. It reveals the complete internal workflow (precheck, duplicate handling with timestamp, COS credential acquisition, upload, and storage) and the special behavior of verify=true (only uploads to COS, does not store). This is a high level of transparency about side effects and edge cases.

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 concise and front-loaded: the first sentence states the core purpose, the second explains the internal flow, the third handles the video exception, and the fourth clarifies the verify parameter. No redundant or filler text; each sentence contributes unique, useful information.

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?

For a tool with no output schema and no annotations, the description provides robust context: supported formats, internal steps, unsupported cases, and parameter behavior. It lacks explicit return-value details, but for an upload operation this is minor and the description is otherwise comprehensive for selection and invocation.

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 descriptions for all 4 parameters (100% coverage), so the baseline is 3. The description adds value by explaining how parameters fit into the pipeline (e.g., verify=true skips the final add_knowledge step) and by noting that folder_id defaults to root via behavior rather than just schema. This extra context raises it above the baseline.

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 opens with a clear action: '将本地文件上传到指定知识库' (upload local files to specified knowledge base), listing supported formats. It distinguishes from siblings by explicitly stating that video files are not supported and directing to 'import_urls' instead, making the tool's scope specific and unambiguous.

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?

The description explicitly provides an alternative for unsupported video files ('请改用 import_urls 以 URL 方式添加') and explains the purpose of verify=true ('用于验证凭证与网络'). This gives clear guidance on when to use this tool versus alternatives and when to use a specific parameter.

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/rowanlin-dev/ima-mcp-server'

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