documents-list
List all documents in Shortcut project management to access and organize project files directly from AI tools.
Instructions
List all documents in Shortcut.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/documents.ts:91-100 (handler)The handler function for the 'documents-list' tool. Fetches all documents using this.client.listDocs() and returns a formatted list or error message using toResult.private async listDocuments() { try { const docs = await this.client.listDocs(); if (!docs?.length) return this.toResult("No documents were found."); return this.toResult(`Found ${docs.length} documents.`, docs); } catch (error) { const errorMessage = error instanceof Error ? error.message : "Unknown error"; return this.toResult(`Failed to list documents: ${errorMessage}`); } }
- src/tools/documents.ts:24-28 (registration)Registration of the 'documents-list' tool on the CustomMcpServer instance with read access and no parameters, linking to the listDocuments handler.server.addToolWithReadAccess( "documents-list", "List all documents in Shortcut.", async () => await tools.listDocuments(), );