Skip to main content
Glama
admin0330

KnowledgeBase MCP

by admin0330

kb_import_file

Copy a file or folder from allowed Mac locations into the knowledge base so text-bearing documents become searchable while other media are stored and indexed; duplicate content is skipped.

Instructions

Copy a file or a whole folder from this Mac into the knowledge base.

Allowed sources: ~/Downloads, ~/Desktop, ~/Documents, ~/Claude, iCloud Drive, plus folders listed in KB_IMPORT_DIRS. Text-bearing files (PDF, Word, PPT, EPUB, Markdown ...) are searchable immediately; other files (images, video) are stored and listed in INDEX.md. Files whose exact content is already on the drive are skipped (skipped_duplicates).

:param source_path: Absolute path, e.g. "~/Downloads/报告.pdf" or a folder. :param category: Target folder on the drive (default "_Inbox"). :param new_name: Optional new name (a file's extension is kept if omitted). :param move: Delete the source after a successful copy (default: keep it). :param allow_duplicate: Import even if identical content already exists.

Input Schema

NameRequiredDescriptionDefault
moveNo
categoryNo_Inbox
new_nameNo
source_pathYes
allow_duplicateNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses that text-bearing files become searchable immediately while images/video are only stored and indexed in INDEX.md, that identical content is skipped (naming the ``skipped_duplicates`` result key), and that `move` deletes the source. It omits failure modes, permission/auth requirements, and size or batching limits.

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?

Front-loaded with the operation and its constraints, then a compact param block. The Sphinx-style :param markup duplicates names already in the schema, costing a little density, but no sentence is wasted.

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

Completeness5/5

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

An output schema exists, so return values need not be re-explained; the description still surfaces the one result key an agent must handle (``skipped_duplicates``). Combined with source-scope rules, dedupe behavior, and move semantics, an agent has everything needed to invoke this correctly.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate, and it documents all five parameters with meaning beyond their types: source_path as an absolute path with a concrete example, category as the target drive folder with default '_Inbox', new_name preserving the extension, move's deletion semantics, and allow_duplicate overriding the dedupe rule.

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 ('Copy a file or a whole folder ... into the knowledge base') and clarifies the source machine ('from this Mac'), which implicitly separates it from drive-internal tools like kb_move_file. It never names a sibling as an alternative, so the differentiation is inferred rather than explicit.

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

Usage Guidelines4/5

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

Gives concrete usage context: allowed source locations (~/Downloads, ~/Desktop, ~/Documents, ~/Claude, iCloud Drive, KB_IMPORT_DIRS) and what happens per file type. It does not say when to prefer kb_add_note, kb_scan_inbox, or kb_move_file instead, so the exclusion guidance is absent.

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