Skip to main content
Glama

ls

List directory contents alphabetically for local file exploration, including dotfiles, marking folders with '/', and limiting to 500 entries or 50KB.

Instructions

List directory contents. Returns entries sorted alphabetically, with '/' suffix for directories. Includes dotfiles. Output is truncated to 500 entries or 50KB (whichever is hit first).

Input Schema

NameRequiredDescriptionDefault
pathNoDirectory to list (default: current directory)
limitNoMaximum number of entries to return (default: 500)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.8/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 well: it discloses sort order, the '/' directory suffix, inclusion of dotfiles, and a concrete truncation policy (500 entries or 50KB, whichever first). It omits error behavior for nonexistent paths and permission failures, so not a 5.

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?

Three short sentences, each carrying distinct information (purpose, return format, truncation limit) with no redundancy or filler. Front-loaded with the core action.

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 two-parameter, no-annotation, no-output-schema primitive, this is nearly complete: it describes the return shape that the missing output schema would otherwise carry. It lacks only edge-case behavior (missing directory, permissions).

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%, so the schema already documents both path and limit, establishing a baseline of 3. The description only indirectly reinforces the limit parameter via the truncation note, adding no new syntax or format detail beyond the schema.

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 ('List directory contents'), which is unambiguous against siblings like read, grep, and write. It does not explicitly differentiate itself from find, which is the closest sibling (recursive search vs. single-directory listing), so it stops short of 5.

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 implied by the purpose but there is no explicit when-to-use or when-not-to-use guidance, and no mention of alternatives such as find for recursive traversal. Adequate for an obvious primitive, but no routing information.

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

Deploy Server

Other Tools