Skip to main content
Glama

upload_file

Upload local files to a knowledge base. Supports PDF, Word, PPT, Excel, Markdown, images, TXT, XMind, and audio, with automatic duplicate detection and registration.

Instructions

上传本地文件到知识库。支持 PDF、Word(.doc/.docx)、PPT(.ppt/.pptx)、Excel(.xls/.xlsx/.csv)、Markdown(.md)、图片(PNG/JPG/WebP)、TXT、XMind、音频(MP3/M4A/WAV/AAC)。会自动检查文件名重复、创建媒体、上传到 COS、注册到知识库。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes本地文件的绝对路径(如 C:\\Users\\xxx\\report.pdf)。
folder_idNo目标文件夹 ID(folder_ 前缀)。省略则添加到根目录。
knowledge_base_idNo目标知识库 ID(可省略,自动解析)。
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It reveals the internal pipeline: duplicate name check, media creation, COS upload, and knowledge base registration. However, it does not mention outcomes on duplicate names or potential side effects beyond the listed steps, which would be useful.

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, consisting of two sentences. The first sentence states the primary purpose and supported formats, and the second enumerates the internal process steps. No redundant or filler content is present.

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 file upload tool, the description is fairly complete: it covers supported formats and the multi-step backend process. However, it does not specify the behavior when a duplicate file name is detected (e.g., rejection, overwrite, or renaming), leaving a notable gap in edge-case handling. No output schema exists, so return value explanation is not required.

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?

The input schema already describes all three parameters with 100% coverage. The description adds no additional semantic information about the parameters themselves, such as default behaviors or constraints, so the baseline score of 3 is appropriate.

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 the verb 'upload' and the resource 'local files to knowledge base', with a comprehensive list of supported file formats. This distinguishes it from siblings like import_urls, which handle URLs, and create_note, which creates notes.

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?

The supported file types imply the intended use case, but there is no explicit statement of when to use this tool versus alternatives. For instance, it does not say 'use import_urls for URLs' or exclude non-file inputs. The context is clear but not explicitly guided.

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

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