Skip to main content
Glama

List files in the open Overleaf project

list_files
Read-onlyIdempotent

Lists project files and folders as flat project-relative paths, with optional kind and path filters; opens a specified project if not active.

Instructions

Returns the file tree of the currently open project as a flat list of project-relative paths. Uses the cached file tree when the requested project is already active; otherwise project_id opens it first. Each entity has a path (e.g. 'chapters/intro.tex'), an id, and a kind ('doc' | 'file' | 'folder').

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

Input Schema

NameRequiredDescriptionDefault
kindNoFilter by entity kind. 'doc' = editable .tex/.md files, 'file' = binary assets (images, PDFs), 'folder' = directories.all
project_idNoOverleaf project id from list_projects or open_project. Opens the project if it is not already active. Pass it on every call when MCP sessions may change between calls. Writes without it only go to the project last confirmed by open_project or by a write naming it.
path_containsNoCase-insensitive substring filter on the project-relative path.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.0
    • addedInput schema / properties / project_id
      Added value: +{
      +  "description": "Overleaf project id from list_projects or open_project. Opens the project if it is not already active. Pass it on every call when MCP sessions may change between calls. Writes without it only go to the project last confirmed by open_project or by a write naming it.",
      +  "minLength": 8,
      +  "type": "string"
      +}
  2. First observedv0.3.5

TDQS

A4.1/5.0
Behavior4/5

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

The annotations already establish that this is read-only and idempotent, so the description does not need to defend safety. It adds meaningful behavioral context by explaining that the cached file tree is used when the project is active and that project_id can open a project first, though it does not mention error behavior or ordering.

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 description is three sentences, front-loaded with the primary return value and followed by caching/project-opening behavior and entity structure. There is no redundant wording, and every sentence adds useful information.

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?

With no output schema, the description must explain the return value, which it does by specifying a flat list of paths with id and kind fields. For a three-parameter read-only listing tool, this covers the operational and output details an agent needs to invoke it correctly.

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 input schema already documents all three parameters in detail, including the project_id behavior and kind values. The description adds only a path example and a return-shape note, so baseline 3 is appropriate.

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?

The description uses a specific verb and resource: it returns the file tree of the currently open project as a flat list of project-relative paths. This clearly distinguishes it from project-level listing tools such as list_projects by anchoring it to the active project.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Usage is implied by the tool name and the phrase 'currently open project', but the description does not explicitly say when to use this versus siblings like read_file, list_projects, or search_project. It gives useful context about active-project behavior but no direct use-versus-alternative guidance.

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