Skip to main content
Glama

ls

Read-only

List directory contents inside a workspace using a given path, with an optional limit to control the number of entries returned.

Instructions

List directory contents using Pi.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoAbsolute path or path relative to the workspace. Home is a starting directory, not a sandbox.
limitNo
workspace_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

B3/5.0
Behavior3/5

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

Annotations already establish readOnlyHint=true and destructiveHint=false, so the safety profile is known. The description adds no behavior beyond the core listing action; that is adequate for a simple read-only tool.

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?

The description is a single short sentence with no fluff, though 'using Pi' is unnecessary and slightly vague. It is concise without being under-specified.

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 read-only listing tool, the combination of the safe annotations and clear core action is minimally sufficient. However, return behavior and the meaning of limit/workspace_id are left unexplained, and no distinction from sibling search tools is made.

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 description coverage is only 33%; only the path parameter is partially documented. The description contributes minimal parameter meaning (path should be a directory) but says nothing about limit or workspace_id, failing to compensate for the low coverage.

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. It is clear what the tool does, though 'using Pi' is vague and it does not differentiate from siblings like find or read.

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?

No when-to-use guidance or alternative routing is provided. Siblings such as find and grep could overlap for listing/searching, but the description offers no criteria for choosing ls over them.

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