Skip to main content
Glama

ima_upload_file_to_knowledge

Uploads a local file to an IMA knowledge base by checking for duplicates, creating the media entry, uploading to COS, and adding the file as knowledge.

Instructions

上传本地文件到 IMA 知识库:预检、查重、创建媒体、COS 上传、添加知识。

Input Schema

NameRequiredDescriptionDefault
passwordNo
file_pathYes
folder_idNo
timeout_msNo
content_typeNo
fail_if_repeatedNo
knowledge_base_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.1/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, and it does disclose that this is a multi-stage mutating pipeline (media creation, COS upload, knowledge insertion) with a dedup check. However, it says nothing about required auth/permissions, what happens on a duplicate hit, whether partial failures leave orphaned media, or how long the default 300s timeout behaves.

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?

A single short line, front-loaded with the action and resource, with the pipeline stages in a compact colon-list. No waste, though the terseness is partly the cause of the specification gaps.

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

Completeness2/5

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

For a 7-parameter mutating upload tool with no annotations and no output schema, the description is far too thin: it explains neither parameter behaviors nor the failure/duplicate semantics an agent needs before committing a file to a knowledge base.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so all 7 parameters (file_path, knowledge_base_id, folder_id, password, content_type, timeout_ms, fail_if_repeated) are undocumented. The description's mention of 查重 loosely hints at fail_if_repeated but explains none of the other parameters, leaving a severe gap for an upload tool with a password field and a timeout.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (upload local file to IMA knowledge base) and enumerates the pipeline stages (precheck, dedup, create media, COS upload, add knowledge). It distinguishes itself implicitly from ima_import_urls by specifying a *local* file, but never names that sibling explicitly.

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 phrase '上传本地文件' implies this is the route for local files rather than URLs or existing notes, but there is no explicit when-to-use/when-not statement and no mention of the obvious alternative ima_import_urls or ima_add_note_to_knowledge. Usage must be inferred.

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