Skip to main content
Glama

list_documents

Read-only

Lists the rich documents (ProseMirror tree) attached to the blocks of the project — a LIGHT index (title, block, modification date, archiving), without the content. cellId filters on ONE block; omitted, the index covers the whole project and excludes archived documents in every case. No entry carries a link by default: fields: ["url"] adds url, the DIRECT LINK of the document, to each one. A document can be attached to SEVERAL blocks (anchor_document): without cellId, each entry then carries cellIds — ALL its blocks, from the oldest attachment to the most recent — and cellId is only the first of them. WITH cellId, the response is limited to the requested block and does NOT carry cellIds: computing it there would cost one query per document. The number of blocks of a document is read by listing WITHOUT cellId. Each entry carries empty: the document contains NOTHING (created but never filled). On BOTH branches — an index that counts documents without saying which are hollow lets empty shells be taken for documentation. A RAW FILE dropped as is (PDF, image, spreadsheet, docx) is NOT "empty": its content lives in the file, and the entry then carries attachment: { mimeType } (field ABSENT for a rich document); file name, size and upload date are read with get_document. No tool writes a raw file. WHERE this deployment returns file text, get_document also carries it as attachmentText (for the formats it can read); where it does not, the text of a file is not readable by an agent. Documents live OUTSIDE SchemaData: no other tool that reads or serializes the schema (neither get_full_data, nor the diagrams, nor a version diff) sees them. WITHOUT cellId only, also returns orphanedAnchors: the document attachments that LOST their block (the block was deleted or detached) — {documentId, documentTitle, anchorId, rememberedCellId}. Field absent = no dead attachment visible, which does not mean "I did not look". And relocatedAnchors: among these dead attachments, those whose remembered block was FOUND again — moved to ANOTHER project that YOU can access — with the project and block name, to re-attach (anchor_document) or detach (unanchor_document) knowingly. Field absent = no accessible block found, which means neither "I did not look" nor "no access". For an API key limited to a list of projects (such as a key created from the canvas button), bounded by a project scope whose listing setting is on, or issued by such a key, the candidates are limited to the projects that key may see; any other key (no list of projects, either no project scope or a scope whose listing setting is off, and not issued by such a key) receives every candidate its account can access, unless the key or a key up its issuing chain cannot be read or is no longer active, or that chain is longer than five keys (then no candidate is named). Covers ONLY this class of orphaned object — not tasks without a block, not broken cross-project pointers. Each entry carries ageDays (days since the last edit: age alone says nothing about correctness). freshness appears ONLY if the subject of the document has DRIFTED — a change of substance (content block, name, description; not a drag, a collapse or a task) touched an attached block since its last edit, the first dating from more than 14 d (state: 'a-verifier') or more than 90 d ('perime'): { state, lagDays, evidence: { count, firstAt, lastAt } }. Field absent = no drift SEEN, which does not mean "guaranteed up to date": the log only exists since 2026-07-30, a bulk replacement (replace_schema, import, restore) leaves only an aggregate there with no attributable block, and archiving or setting the visibility of a document counts as an edit. freshnessUnchecked ({ reason, documents }), present only if there is a gap — unreadable log, log too active to be read in full, or more blocks than the reading cap: this number of documents could NOT be verified, so their lack of freshness says nothing. notUpdatedSinceDays only keeps the documents not edited for at least that many days (filter on ageDays, both branches); orphanedAnchors and relocatedAnchors are NOT filtered by it. WITHOUT cellId, entries come most recently edited first, NOT ranked by relevance: with query, a document whose title equals the query exactly is not moved to the top — look for it by its title in the list.

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
queryNoWHOLE-PROJECT filter by TITLE OR by CONTENT (`search_text`, the text derived from the document — filtering is done IN THE SQL QUERY, not in memory, unlike `list_tasks.query`). Used to check that an equivalent document does not already exist before `create_document` — `anchor_document` attaches an existing result instead of creating a duplicate. IGNORED if `cellId` is provided: looking for a document to attach HERE assumes precisely that it is not attached yet (same rule as the `?q=`/`?cellId=` of the HTTP route).
cellIdNoOnly return the documents attached to THIS block. Omitted: the light index of the whole project.
fieldsNoExtra fields to ADD to each entry, on request: `["url"]` adds `url`, the DIRECT LINK of the document (the one to put in a Markdown link). Unlike `list_tasks.fields`, it never restricts the default fields. Omitted: no `url` (an absolute address per line is context paid for nothing).
includeArchivedNoInclude archived documents — relevant only with `cellId`.
expectedProjectIdNoUUID of the project THIS call targets (overrides the session project).
notUpdatedSinceDaysNoOnly keep the documents NOT EDITED for at least N days (`ageDays` >= N) — the candidates for a review. Applies to BOTH branches (with or without `cellId`). In-memory filter on the date of the last edit; it says nothing about the correctness of a document (see `freshness` for drift). Omitted: no filter.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / includeArchived / description
      Previous value: -"Include archived documents — relevant only with `cellId`: the project index (without `cellId`) excludes archived documents in every case, whatever this value."New value: +"Include archived documents — relevant only with `cellId`."
  2. Changed1 schema field changed
    • changedInput schema / properties / expectedProjectId / description
      Previous value: -"UUID of the project THIS call targets (overrides the session project). No access: refused, nothing changed."New value: +"UUID of the project THIS call targets (overrides the session project)."
  3. Changed1 schema field changed
    • changedInput schema / properties / expectedProjectId / description
      Previous value: -"UUID of the project targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted."New value: +"UUID of the project THIS call targets (overrides the session project). No access: refused, nothing changed."
  4. Changed1 schema field changed
    • addedInput schema / properties / fields
      Added value: +{
      +  "description": "Extra fields to ADD to each entry, on request: `[\"url\"]` adds `url`, the DIRECT LINK of the document (the one to put in a Markdown link). Unlike `list_tasks.fields`, it never restricts the default fields. Omitted: no `url` (an absolute address per line is context paid for nothing).",
      +  "items": {
      +    "enum": [
      +      "url"
      +    ],
      +    "type": "string"
      +  },
      +  "maxItems": 1,
      +  "minItems": 1,
      +  "type": "array"
      +}
  5. Changed5 schema fields changed
    • changedInput schema / properties / cellId / description
      Previous value: -"Ne renvoyer que les documents ancrés à CE bloc. Omis : l'index léger de tout le projet."New value: +"Only return the documents attached to THIS block. Omitted: the light index of the whole project."
    • changedInput schema / properties / expectedProjectId / description
      Previous value: -"UUID du projet visé par CET appel. Cible RÉELLEMENT ce projet au lieu du projet de session. Refusé sans rien modifier si l'accès n'est pas accordé."New value: +"UUID of the project targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted."
    • changedInput schema / properties / includeArchived / description
      Previous value: -"Inclure les documents archivés — pertinent seulement avec `cellId` : l'index projet (sans `cellId`) exclut TOUJOURS les archivés, quelle que soit cette valeur."New value: +"Include archived documents — relevant only with `cellId`: the project index (without `cellId`) excludes archived documents in every case, whatever this value."
    • changedInput schema / properties / notUpdatedSinceDays / description
      Previous value: -"Ne garder que les documents NON ÉDITÉS depuis au moins N jours (`ageDays` ≥ N) — les candidats à une relecture. Vaut sur les DEUX branches (avec ou sans `cellId`). Filtre EN MÉMOIRE sur la date de dernière édition ; il ne dit rien de la justesse d'un document (voir `freshness` pour la dérive). Omis : aucun filtre."New value: +"Only keep the documents NOT EDITED for at least N days (`ageDays` >= N) — the candidates for a review. Applies to BOTH branches (with or without `cellId`). In-memory filter on the date of the last edit; it says nothing about the correctness of a document (see `freshness` for drift). Omitted: no filter."
    • changedInput schema / properties / query / description
      Previous value: -"Filtre PROJET ENTIER par TITRE OU par CONTENU (`search_text`, le texte dérivé du document — filtrage CÔTÉ REQUÊTE SQL, pas en mémoire, contrairement à `list_tasks.query`). Sert à vérifier qu'un document équivalent n'existe pas déjà avant `create_document` — `anchor_document` ancre un résultat existant au lieu de créer un doublon. IGNORÉ si `cellId` est fourni : chercher un document à attacher ICI suppose justement qu'il ne l'est pas encore (même règle que le `?q=`/`?cellId=` de la route HTTP)."New value: +"WHOLE-PROJECT filter by TITLE OR by CONTENT (`search_text`, the text derived from the document — filtering is done IN THE SQL QUERY, not in memory, unlike `list_tasks.query`). Used to check that an equivalent document does not already exist before `create_document` — `anchor_document` attaches an existing result instead of creating a duplicate. IGNORED if `cellId` is provided: looking for a document to attach HERE assumes precisely that it is not attached yet (same rule as the `?q=`/`?cellId=` of the HTTP route)."
  6. Changed1 schema field changed
    • changedInput schema / properties / query / description
      Previous value: -"Filtre PROJET ENTIER par TITRE OU par CONTENU (`search_text`, le texte dérivé du document — filtrage CÔTÉ REQUÊTE SQL, pas en mémoire, contrairement à `list_tasks.query`). Sert à vérifier qu'un document équivalent n'existe pas déjà avant `create_document` — appelle `anchor_document` sur un résultat existant plutôt que de créer un doublon. IGNORÉ si `cellId` est fourni : chercher un document à attacher ICI suppose justement qu'il ne l'est pas encore (même règle que le `?q=`/`?cellId=` de la route HTTP)."New value: +"Filtre PROJET ENTIER par TITRE OU par CONTENU (`search_text`, le texte dérivé du document — filtrage CÔTÉ REQUÊTE SQL, pas en mémoire, contrairement à `list_tasks.query`). Sert à vérifier qu'un document équivalent n'existe pas déjà avant `create_document` — `anchor_document` ancre un résultat existant au lieu de créer un doublon. IGNORÉ si `cellId` est fourni : chercher un document à attacher ICI suppose justement qu'il ne l'est pas encore (même règle que le `?q=`/`?cellId=` de la route HTTP)."
  7. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnlyHint=true and destructiveHint=false annotations, it discloses archived-document exclusion, orphanedAnchors and relocatedAnchors semantics, freshness drift rules, freshnessUnchecked gaps, API-key scoping limits, and the absence of cellIds on the cellId branch. These are substantive behavioral traits that annotations do not cover.

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

Conciseness2/5

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

The description is a single, extremely dense block of prose with heavy capitalization and parenthetical asides, making it hard to scan. Key routing information such as query usage and file-versus-rich-document distinctions is buried mid-paragraph rather than front-loaded.

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?

For a complex read tool with no output schema, the description covers return fields, branch differences, orphan and freshness semantics, and scoping thoroughly. It could be better structured, but an agent has enough information to invoke and interpret it correctly.

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; the description still adds branch-specific meaning: query is ignored with cellId, fields never restricts default fields and only adds url, notUpdatedSinceDays applies to both branches but does not filter orphanedAnchors/relocatedAnchors. It does not add syntax detail beyond the schema, but the semantic interactions are useful.

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 opens with a specific verb and resource: it lists the rich documents attached to blocks as a LIGHT index (title, block, modification date, archiving) without content. It distinguishes itself from get_document (which reads file metadata) and from schema-reading tools, so an agent can identify its role without opening a 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?

It explicitly names alternatives and conditions: use query to check for an existing equivalent document before create_document/anchor_document, use get_document for file name, size, and upload date, and query is ignored when cellId is provided. It also states that no tool writes raw files and that documents are invisible to schema tools like get_full_data.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.