Skip to main content
Glama

List Directory with Sizes

list_directory_with_sizes
Read-only

Lists files and directories in a given path with their sizes, distinguishing entries with [FILE] and [DIR] prefixes for quick identification.

Instructions

Get a detailed listing of all files and directories in a specified path, including sizes. Results clearly distinguish between files and directories with [FILE] and [DIR] prefixes. This tool is useful for understanding directory structure and finding specific files within a directory. Only works within allowed directories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
sortByNoSort entries by name or sizename

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.0.1

TDQS

B3/5.0
Behavior4/5

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

The description adds useful behavioral context beyond the readOnlyHint and openWorldHint annotations by stating that the tool only works within allowed directories and that results use [FILE] and [DIR] prefixes. This does not contradict the annotations and gives the agent additional expectations about output and constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is reasonably concise at three sentences, but the sentence 'This tool is useful for understanding directory structure and finding specific files within a directory' adds little value and could be removed or replaced with more specific guidance. The core information is present without excessive verbosity.

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?

Given the output schema exists, return-value details are not required, but the description omits important operational details such as whether listing is recursive, how hidden files are handled, and what path values are valid. It also lacks differentiation from list_directory, leaving the agent without enough context to confidently select and invoke this tool.

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 only 50%: sortBy has a description and enum, but path has no description. The tool description does not compensate by explaining path format, whether it must be absolute/relative, or how it relates to allowed directories. This leaves a key parameter underspecified.

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 clearly states the tool's purpose: to get a detailed listing of files and directories in a specified path, including sizes. It also mentions the distinguishing [FILE] and [DIR] prefixes, which sets it apart from the sibling list_directory, though it does not explicitly name the alternative.

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

Usage Guidelines2/5

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

The description gives no explicit guidance on when to use this tool versus the sibling list_directory or other tools. The phrase 'useful for understanding directory structure and finding specific files' is generic and applies equally to list_directory, so it does not help an agent choose between them.

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

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/TimurRakhmatullin86/mcp-drill'

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