Skip to main content
Glama

list_dir

Read-only

Lists files and folders inside a WordPress site directory with adjustable depth (1–4), hiding blocked sensitive files.

Instructions

List a folder inside a site. depth 1-4. Blocked files are hidden.

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_dir"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNo.
siteNo
depthNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.2

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds genuine context beyond that — the depth 1-4 recursion bound and the fact that blocked files are silently hidden, meaning results can be incomplete — but says nothing about return shape, pagination, or behavior on a missing path.

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 terse sentences, front-loaded with the action and scope, then the depth bound, then the filtering caveat. No filler or redundancy; the telegraphic style is efficient rather than unclear.

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 three-parameter read tool with no output schema and annotations already covering safety, the missing pieces are the return value (directory entries, file metadata), what "blocked" means, and error behavior for an invalid path or site. Adequate to call correctly, not complete enough to predict results.

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 0%, so the description must carry the load; it does add real meaning for `depth` by constraining it to 1-4 and implying recursive traversal. It also loosely frames `path` as a folder and `site` as the containing site, but leaves defaults, the meaning of a null site, and path format/root semantics unstated.

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 a folder inside a site") so an agent can distinguish it from read_file (retrieves a file) and list_sites (enumerates sites). It stops short of explicitly naming or contrasting any sibling, which keeps it from a 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 only implied by the scope phrase "inside a site" — there is no statement of when to prefer this over search, stat, or read_file, and no prerequisites or exclusions. An agent must infer that this is the directory-enumeration entry point before opening files.

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