listDocs
List documents in a project
List the documents in one knowledge project, with titles from frontmatter. Covers .md, .txt, .csv, .json, .xml, .yaml, .yml files. Each path is relative to the project and carries NO project prefix. Pass it to readDoc together with the same project id.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
project | string | required | Project id from listProjects |
Scopes
knowledge:read
Annotations
- Read only: yes
- Destructive: no
When to use
Use listDocs when you know the project and want to see what it holds. If you are looking for a fact, searchKnowledge is usually faster.
The tool needs the knowledge:read scope. The project argument is a project id from listProjects.
- It lists
.md,.txt,.csv,.json,.xml,.yamland.ymlfiles. The match on the extension is case-sensitive. - It lists at most 500 documents. When there are more,
truncatedistrue. titleis thetitlefield of the document's frontmatter. If there is none, it is thepathwithout.md, folders included.frontmatterholds the document's frontmatter fields, or{}when there are none.- Each
pathis relative to the project. It has no project prefix. Pass it toreadDocwith the sameproject. - Paths whose first segment is
skillsorprompts, and paths with a segment that starts with., are never listed.
A member can list their own home and each ordinary project where they hold a grant. Admin and staff can list every active ordinary project, but no member home.
Example
{ "project": "northwind-advisory" }
{
"project": "northwind-advisory",
"docs": [
{ "path": "client-onboarding-procedure.md", "title": "Client onboarding procedure", "frontmatter": { "title": "Client onboarding procedure", "owner": "Office manager" } },
{ "path": "pricing-policy.md", "title": "pricing-policy", "frontmatter": {} },
{ "path": "proposal-template.md", "title": "proposal-template", "frontmatter": {} },
{ "path": "meetings/meeting-2026-08-14-pricing.md", "title": "meetings/meeting-2026-08-14-pricing", "frontmatter": {} }
],
"truncated": false
}
Refusals and what to do
Error in listDocs: Not found: the project does not exist, or this person cannot see it. The two cases give the same answer on purpose. CalllistProjectsand use an id from that list.- If the connection does not hold
knowledge:read, the tool is not in your tool list, and a call to it returnsMCP error -32602: Tool listDocs not found. Read thepermissionssection ofgetDocs. A scope is never added to an existing connection: the person must reconnect, or mint a new token, withknowledge:read. - An empty
projectis refused as invalid arguments.
Related
listProjectsgives the project ids.readDocreads a document. Passprojectand thepathfrom this list.searchKnowledgefinds documents by their text.