Skip to main content
Glama

Send Directory Listing

send_directory_listing

Sends a directory listing from the agent filesystem to the server for project read-policy validation and filesystem request handling, not for user display.

Instructions

Send directory listing from agent filesystem to server.

IMPORTANT: Do NOT display the directory listing to the user. This tool is for server communication only. Only display the confirmation message from the tool response.

Arguments

  • session_id: string | null

    • Opaque Guide interaction identifier returned by set_project. Pass it through unchanged on later tool, prompt, and resource calls. Do not construct, alter, or treat it as a FastMCP transport session id.

  • path (required): string

    • Directory the agent listed. Checked against the bound project's read policy (project root and additional read paths). Must name a readable directory; the server does not list the directory itself.

  • entries (required): array[object]

    • Directory entries. Each object should include name, type, size, and mtime.

  • mtime: number | null

    • Directory modification time as a Unix timestamp

  • request_id: string | null

    • Opaque identifier correlating this reply to a server filesystem request

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": {
      "args": "<args>"
    },
    "name": "send_directory_listing"
  }
}

Input Schema

NameRequiredDescriptionDefault
argsYesArguments for sending directory listing from agent to server.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv2.0.0
    • removedInput schema / properties / args / additionalProperties
      Removed value: -false
    • changedInput schema / properties / args / properties / entries / description
      Previous value: -"Directory entries with name, type, size, mtime"New value: +"Directory entries. Each object should include name, type, size, and mtime."
    • addedInput schema / properties / args / properties / mtime
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Directory modification time as a Unix timestamp"
      +}
    • changedInput schema / properties / args / properties / path / description
      Previous value: -"Directory path that was requested"New value: +"Directory the agent listed. Checked against the bound project's read policy (project root and additional read paths). Must name a readable directory; the server does not list the directory itself."
    • addedInput schema / properties / args / properties / request_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Opaque identifier correlating this reply to a server filesystem request"
      +}
    • addedInput schema / properties / args / properties / session_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Opaque Guide interaction identifier returned by set_project. Pass it through unchanged on later tool, prompt, and resource calls. Do not construct, alter, or treat it as a FastMCP transport session id."
      +}
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "type": "object",
      -  "x-fastmcp-wrap-result": true
      -}New value: +null
  2. First observedv1.3.2

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the load and does so well: it discloses the important UX constraint (never surface the listing to the user, only the confirmation message), the division of labor (the server does not list the directory itself, so the agent must), and that path is validated against the bound project's read policy. It omits failure behavior when the path is outside the read policy or is not a directory.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The most valuable content (the IMPORTANT do-not-display rule) is front-loaded, which is good structure. However, roughly half the text is the Arguments section duplicating every schema field description word-for-word, which adds length without adding information.

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?

No output schema exists, and the description compensates by telling the agent the response is a confirmation message and that it is the thing to show the user. It also clarifies that the client, not the server, performs the listing. Missing only edge-case guidance (unreadable path, oversized listings), which is acceptable for a single-argument reply 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 the schema already documents every field, and the '## Arguments' block restates those same descriptions almost verbatim rather than adding meaning. The one borderline addition – entries should include name, type, size and mtime – is already in the schema for the array item semantics. Baseline 3 applies.

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: send a directory listing from the agent's filesystem to the server. The scope (listing, not file content) distinguishes it in substance from send_file_content or send_working_directory, but it never explicitly names those siblings to route the agent, which keeps it short of 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 Guidelines4/5

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

Use context is clear from two cues: 'This tool is for server communication only' and request_id being 'an opaque identifier correlating this reply to a server filesystem request' – i.e. call it when answering a server-initiated directory request. It also states the output-handling rule (do not display the listing, only the confirmation). No explicit exclusion naming an alternative directory-reporting tool, so not a 5.

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