Skip to main content
Glama

list_directory

Read-onlyIdempotent

Lists immediate subdirectories and files under a specified root path, helping agents inspect folder structure before accessing or managing 3D printer G-code files.

Instructions

List one directory's immediate contents (subdirectories and files) under a root. Use this instead of list_gcode_files when you care about folder structure.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_directory"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNogcodes
extendedNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.1

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so the safety profile is covered. The description adds useful behavioral detail that the listing is non-recursive ('immediate contents') and scoped 'under a root', but says nothing about ordering, limits, or how the root constrains the path. With annotations carrying the write/read burden, a 3 reflects modest added value.

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?

Two short sentences with no filler; the core behavior is front-loaded and the disambiguation sentence follows. Every clause earns its place.

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?

An output schema exists and annotations cover safety, so return values and mutability need no explanation. However, for a two-parameter tool with zero schema description coverage, the unexplained 'extended' flag is a real gap that leaves the agent unable to use the tool's full surface correctly.

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 0%, so the description must carry parameter meaning — and it largely does not. The 'path' parameter is only hinted at via 'under a root', and the 'extended' boolean is never mentioned at all, leaving an agent to guess what it changes about the listing.

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?

States a specific verb and resource — list one directory's immediate contents, subdirectories and files — plus the scoping qualifier 'under a root'. It also explicitly distinguishes itself from the sibling list_gcode_files, so an agent can choose between them without inspecting schemas.

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

Usage Guidelines5/5

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

Directly names the alternative tool and the condition that selects it: use this instead of list_gcode_files when folder structure matters. That is explicit routing guidance rather than implied usage.

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