Skip to main content
Glama

list_documents

Read-onlyIdempotent

Discover all documents in the configured directory with format detection and metadata like filename, page count, and size before reading or searching.

Instructions

List all documents in the configured directory with format detection and metadata (filename, pages, size). Use this to discover available documents before reading or searching. Read-only.

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

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
documentsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.4.1
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "documents": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "filename": {
      +            "type": "string"
      +          },
      +          "pages": {
      +            "type": "integer"
      +          },
      +          "size_bytes": {
      +            "type": "integer"
      +          },
      +          "title": {
      +            "type": "string"
      +          },
      +          "type": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "filename",
      +          "title",
      +          "type",
      +          "pages",
      +          "size_bytes"
      +        ],
      +        "type": "object"
      +      },
      +      "type": [
      +        "null",
      +        "array"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "documents"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive, and closed-world, so the trailing "Read-only." largely repeats structured data. The description does add what each entry contains (filename, pages, size, detected format), but says nothing about ordering, recursion into subdirectories, or behavior on an empty/missing directory for what is a listing operation.

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?

Two tight, front-loaded sentences with zero filler; the discovery purpose comes first and the returned fields second. The trailing "Read-only." is a minor redundancy given readOnlyHint=true.

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

Completeness5/5

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

For a no-parameter, read-only listing tool with an output schema and full annotation coverage, nothing is missing. It even previews the returned metadata, and the directory being "configured" rather than passed explains the absent parameters.

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?

The tool takes zero parameters, which sets the baseline at 4. Schema coverage is 100% and there is nothing parameter-level the description needs to compensate for.

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?

Specific verb + resource ("List all documents in the configured directory") plus the scope of what is returned (format detection, filename, pages, size). It is clearly distinguishable from siblings such as list_formats, read_document, or search_document.

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 this to discover available documents before reading or searching" gives an explicit entry-point role and names the downstream alternatives (read/search). It stops short of stating when NOT to use it (e.g., when the filename is already known) or naming sibling tools explicitly.

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