Skip to main content
Glama

List directory with sizes

list_directory_with_sizes
Read-onlyIdempotent

List directory contents with file sizes, sorted by name or size, to identify large files or organize folders.

Instructions

List a directory with file sizes, sorted by name or size. Without sizes: list_directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
sortByNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered structurally. The description adds the sorting behavior but says nothing about output format (e.g., size units), recursion, or symlink handling. With annotations carrying the safety burden, a 3 is appropriate.

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?

Two tight sentences, front-loaded with the core capability and followed by the routing hint. No wasted words.

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 simple read-only listing tool whose annotations cover safety, the description is nearly complete: capability, sorting, and sibling routing are all present. It could mention the size unit or non-recursive scope, but no output schema exists so return-value detail is not strictly 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?

Schema description coverage is 0%, so the schema documents only types and the sortBy enum. The description does add meaning by pairing 'file sizes' with the sortBy values ('sorted by name or size'), partially tying the enum to intent, but it says nothing about the required path parameter.

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?

States a specific verb and resource ('List a directory'), names the distinguishing feature (with file sizes), and immediately contrasts with the sibling list_directory. An agent can tell it apart from list_directory without opening either schema.

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?

It explicitly routes the agent to the alternative tool when sizes aren't needed ('Without sizes: list_directory'), which is clear guidance. It does not state when to prefer sortBy=size vs sortBy=name, but the primary tool-selection decision is covered.

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