list_documents
List files inside an allowed root, using an optional glob filter to locate documents. Returns file paths, sizes, and modified timestamps for downstream extraction.
Instructions
List files in a directory inside the allowed root.
Args: directory: Directory path, relative to the allowed root (use '.' for the root itself) or absolute but inside it. glob_pattern: Filename filter, e.g. '.pdf' or '**/.csv' for recursive matching. Defaults to '*'. Must be relative and must not contain '..'; matching never leaves the allowed root.
Returns a list of {path, name, size_bytes, modified} entries; 'path' is relative to the allowed root and is what other tools accept.
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": {
"directory": "<directory>"
},
"name": "list_documents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| directory | Yes | ||
| glob_pattern | No | * |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |