Skip to main content
Glama

docshelf_add_directory

Idempotent

Add every matching file in a directory to a shelf category, rebuilding INDEX.md once. Supports Markdown, PDF, DOCX, HTML, and EPUB.

Instructions

Add every matching file in a directory, rebuilding INDEX.md once.

Scans source_dir (non-recursively) for patterns — every supported input type by default (Markdown, PDF, DOCX, HTML, EPUB) — adds each under category with a title derived from its filename, and regenerates INDEX.md a single time. A corrupt or unreadable file is reported in failed without aborting the batch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Beyond annotations (idempotentHint=true, destructiveHint=false), the description adds key behaviors: non-recursive scan, single INDEX rebuild, default patterns, error reporting without aborting. No contradiction with annotations.

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 two sentences plus a bullet-like list. It is front-loaded with the main purpose, and every sentence contributes necessary context. No redundancy or fluff.

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?

Given the tool's complexity, the description covers scanning scope, default patterns, INDEX behavior, error handling, and parameter defaults. An output schema exists, so return values are not needed. The description fully contextualizes usage.

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 provides descriptions for each parameter (e.g., split, quality, patterns). The description adds minimal extra meaning, like default patterns and non-recursive scanning, but mostly restates what the schema covers. Baseline is 3 due to high schema coverage.

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 'add', the resource 'every matching file in a directory', and the side-effect 'rebuilding INDEX.md once'. It distinguishes from siblings like docshelf_add_document by focusing on a directory scan.

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?

The description explains the tool scans a directory non-recursively for matching patterns, which tells when to use it. It implicitly contrasts with single-file siblings, but lacks explicit when-not or alternative recommendations.

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/ignatenkofi/docshelf-mcp'

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