Skip to main content
Glama
MCP Directory Share

MCP Directory Share

Listar Conteúdo do Diretório

list_directory_contents

Lists files and folders in a shared directory so AI agents can use local contents as context, with options for recursion, depth limits, and hidden files.

Instructions

Lista o conteúdo de um diretório compartilhado

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "list_directory_contents"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesCaminho do diretório
maxDepthNoProfundidade máxima (apenas para busca recursiva)
recursiveNoBusca recursiva
showHiddenNoMostrar arquivos ocultos

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden of behavioral disclosure, and it adds almost nothing: it does not say whether the listing is recursive by default, whether hidden files are included, what happens on a missing or unauthorized path, or what the result looks like. The default of non-recursive and hidden files excluded is discoverable only from the schema defaults, not from the description. For a read-only tool the risk is low, but the transparency is still minimal.

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?

A single front-loaded sentence with no filler or repetition. Its brevity is close to the point of under-specification, but that is penalized under other dimensions rather than here.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Four parameters, no annotations, and no output schema mean the description is the only place to explain behavior, yet it conveys less than the field names do. An agent cannot tell from the text whether recursion is opt-in, how deep traversal goes, or how the results are shaped, which matters for a directory-listing tool.

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 100%, so every parameter (path, maxDepth, recursive, showHidden) is already documented in the schema with its type and default. The description mentions none of them, adding no extra meaning. Baseline 3 applies when the schema does the heavy lifting.

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?

The description gives a specific verb and resource: 'Lista o conteúdo de um diretório compartilhado'. That is clearly a listing operation scoped to one directory, which an agent can distinguish from a metadata or file-content read. It stops short of contrasting itself with sibling tools such as list_shared_directories, so the differentiation is only implicit.

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?

There is no statement on when this tool should be used instead of the alternatives, and no prerequisites such as the need for the path to exist or be shared. The agent has to infer that 'list directory contents' is the right choice whenever it wants entries under a directory, without any help from the text.

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