Skip to main content
Glama

ubuntu_list_directory

List directory entries in policy-allowed paths, returning compact counts and previews for agent planning or detailed metadata for full inspection.

Instructions

List directory entries for a policy-allowed path.

By default this returns a compact summary suitable for agent planning. In detailed mode it returns full per-item metadata.

Args: path: Directory path to inspect. detailed: If True, returns full item list; if False, returns summarized counts and preview subset.

Returns: JSON string in unified {ok, data|error} contract. Detailed entries are marked with untrusted_content=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
detailedNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

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

  1. First observedv1.1.0

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses the policy-allowed path constraint, the two output modes, the unified JSON return contract, and the untrusted_content=true marker on detailed entries. It doesn't cover error behavior or permission nuances, but the critical safety-relevant behavior is disclosed.

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?

The description is compact and well organized: purpose first, then mode behavior, then Args/Returns. Every sentence adds useful information without repetition or fluff.

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 two-parameter directory listing tool with no annotations, this is nearly complete: it covers purpose, modes, return contract, and the untrusted-content flag. The main missing piece is concrete guidance about what 'policy-allowed path' means and what the unified error contract contains, though the output schema likely covers return structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description compensates by explaining both parameters: path is the directory to inspect, and detailed switches between full listing and a summarized preview. It doesn't clarify path format or detailed=null behavior explicitly, but the default-mode sentence implies null/false treatment.

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?

Opens with a specific verb and resource: 'List directory entries for a policy-allowed path.' This clearly distinguishes it from siblings like read_file, execute_command, and search_packages, and the two output modes further refine what the tool does.

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?

Explains when to use the default compact summary (agent planning) versus detailed mode (full metadata), whih gives clear contextual guidance. It does not explicitly name alternatives or state when NOT to use this tool vs. read_file/execute_command, so it falls short of a full 5.

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/bill-kopp-ai-dev/percival-ubuntu-mcp'

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