Skip to main content
Glama

list_files

Read-onlyIdempotent

Browse folder entries and document IDs in a Connapse container to answer inventory questions like "what files exist here." Returns file metadata only, not file contents.

Instructions

Lists folder entries and document IDs at a path within a container (does NOT return file contents — for content questions, use search_knowledge). Intended for inventory requests such as 'what files exist in X' or when the user named a specific filename. Large listings return a soft error directing you to search_knowledge; override with confirmLarge: true or paginate with limit. Each file shows when it was added and, if since changed, when it was updated. For the newest N entries of a folder, pass sort: "newest" and limit: N, then read them all with get_documents.

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": {
      "containerId": "<containerId>"
    },
    "name": "list_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoFolder path to list (default: root '/')
sortNoLeave unset for folders by name, then files newest first. "name": every entry by name, folders first, so `limit` keeps the first names. "newest": every entry most recently added first, so `limit` keeps the newest.
limitNoMaximum number of entries to return. When set, large listings are truncated instead of returning a soft error. Recommended: 25.
containerIdYesContainer ID or name
confirmLargeNoSet to true to confirm you intentionally want the full listing of a large folder. Without this, listings exceeding the soft limit return an error directing you to `search_knowledge`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.4.0
    • addedInput schema / properties / confirmLarge
      Added value: +{
      +  "default": null,
      +  "description": "Set to true to confirm you intentionally want the full listing of a large folder. Without this, listings exceeding the soft limit return an error directing you to `search_knowledge`.",
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": null,
      +  "description": "Maximum number of entries to return. When set, large listings are truncated instead of returning a soft error. Recommended: 25.",
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / sort
      Added value: +{
      +  "default": null,
      +  "description": "Leave unset for folders by name, then files newest first. \"name\": every entry by name, folders first, so `limit` keeps the first names. \"newest\": every entry most recently added first, so `limit` keeps the newest.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. First observedv0.3.2

TDQS

A4.8/5.0
Behavior5/5

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

Beyond readOnlyHint/idempotentHint, the description discloses non-obvious runtime behavior: large listings return a soft error rather than data, `confirmLarge: true` overrides it, and `limit` truncates instead of erroring. It also describes the return payload (each file shows added and, if changed, updated timestamps), which annotations cannot convey.

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 exclusion ('does NOT return file contents') is front-loaded in the first sentence, followed by usage, failure mode, and the newest-N recipe in descending priority. Four sentences, each contributing a distinct fact with no filler.

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?

Covers purpose, routing, error behavior, overrides, and return contents for a 5-parameter read tool with no output schema — enough to call it correctly. The only gap is that the actual size threshold of the 'soft limit' is left unspecified, requiring trial and error.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning on top: how `sort: "newest"` pairs with `limit` to get recent entries, and how `limit`/`confirmLarge` interact with the soft-error threshold. It does not restate the `path` or `containerId` semantics, which the schema already covers well.

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 ('Lists folder entries and document IDs at a path within a container') and immediately disambiguates the scope with 'does NOT return file contents'. It also names the sibling that handles the excluded case (`search_knowledge`), so an agent can route without opening either schema.

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?

Gives concrete positive triggers ('what files exist in X', user named a specific filename), a negative condition with an alternative (`search_knowledge` for content questions), and a workflow for the newest-N case (sort:"newest" + limit then `get_documents`). Exclusions and alternatives are both explicit.

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