Skip to main content
Glama
narmaku

Linux MCP Server

by narmaku

list_directories_by_size

Identify largest directories to manage disk space by analyzing storage usage with sorted size results for local or remote Linux systems.

Instructions

List directories sorted by size (largest first). Uses efficient Linux du command.

Args:
    path: Directory path to analyze
    top_n: Number of top largest directories to return (1-1000)
    host: Remote host to connect to via SSH (optional, executes locally if not provided)
    username: SSH username for remote host (required if host is provided)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
top_nYes
hostNo
usernameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool 'Uses efficient Linux du command,' which hints at performance but doesn't detail execution behavior, error handling, or output format. It specifies remote execution via SSH with conditional parameters, adding some context, but lacks info on permissions, rate limits, or side effects. This is adequate but has gaps for a tool with no annotations.

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 appropriately sized and front-loaded: the first sentence states the core purpose, followed by a brief implementation note and a structured parameter list. Every sentence adds value without redundancy, making it efficient and easy to parse for an AI agent.

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?

Given the tool's complexity (4 parameters, no annotations, but has an output schema), the description is mostly complete. It covers the purpose, usage context, and parameter semantics adequately. Since an output schema exists, it doesn't need to explain return values, but it could benefit from more behavioral details like error conditions or execution constraints. Overall, it's sufficient but not exhaustive.

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?

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains each parameter: 'path' as the directory to analyze, 'top_n' as the number of top largest directories with a range (1-1000), and 'host' and 'username' for optional remote SSH execution. This compensates well for the schema's lack of descriptions, though it doesn't cover all possible edge cases or defaults beyond the optional nature.

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?

The description clearly states the tool's purpose: 'List directories sorted by size (largest first).' It specifies the verb ('list'), resource ('directories'), and sorting criteria ('by size, largest first'), which distinguishes it from sibling tools like list_directories_by_modified_date and list_directories_by_name. This makes the purpose specific and well-differentiated.

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?

The description provides clear context for when to use the tool (to analyze directory sizes) and mentions the efficient Linux du command, which implies it's for performance-oriented tasks. However, it doesn't explicitly state when not to use it or name alternatives among siblings, such as list_directories_by_modified_date for time-based sorting. This keeps it from a perfect score.

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

Install Server

Other Tools

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/narmaku/linux-mcp-server'

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