Skip to main content
Glama

summarizeDirectory

Lists files and subdirectories in a specified directory with their names, types, and byte sizes, so you can inspect folder contents and metadata in one step.

Instructions

Lists all files and subdirectories in the specified directory with their metadata (name, type, size in bytes).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "summarizeDirectory"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute or relative path to the directory to summarize

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does disclose the return fields (name, type, size in bytes) and implicitly frames the operation as a read, but it never states whether listing is recursive into nested subdirectories, how large directories or permission errors are handled, or whether hidden files are included.

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 tight sentence with the resource and return fields front-loaded and no filler wording. It loses a point only because the compressed phrasing 'all files and subdirectories' is the source of the recursion ambiguity rather than resolving it.

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

Completeness3/5

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

For a simple one-parameter read tool with full schema coverage and no output schema, the description covers the shape of the result adequately. It falls short on recursion behavior, error conditions, and any size or count limits, which are the details an agent would need before calling it on an arbitrary directory.

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?

Schema description coverage is 100% and the single `path` parameter is already documented as accepting absolute or relative paths. The description adds nothing about path semantics beyond 'specified directory', so the schema does all the work and the baseline of 3 applies.

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?

The description gives a specific verb and resource — 'Lists all files and subdirectories in the specified directory' — and names the metadata returned (name, type, size in bytes), which resolves the vagueness of the name 'summarizeDirectory'. It does not distinguish itself from plausible siblings such as searchFiles or readFile, so an agent must infer the difference from the sibling names alone.

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?

Usage is only implied: the phrase 'all files and subdirectories' suggests an unfiltered full listing, in contrast to a filtered search. There is no explicit statement of when to prefer this over searchFiles, nor any prerequisite or exclusion. An agent can guess the intended context but is given no routing guidance.

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