list_docs
Retrieve and filter documents in Dart with parameters like folder, title, content, or trash status. Supports pagination and ordering for efficient document management.
Instructions
List docs from Dart with optional filtering parameters. You can filter by folder, title, text content, and more.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | No | Filter by folder title | |
| folderId | No | Filter by folder ID | |
| ids | No | Filter by IDs | |
| inTrash | No | Filter by trash status | |
| limit | No | Number of results per page | |
| o | No | Ordering options (use - prefix for descending) | |
| offset | No | Initial index for pagination | |
| s | No | Search by title, text, or folder title | |
| text | No | Filter by text content | |
| title | No | Filter by title |
Implementation Reference
- index.ts:445-449 (handler)Handler for the 'list_docs' tool in the MCP CallToolRequestSchema switch statement. It calls DocService.listDocs(args) and returns the JSON stringified result.case LIST_DOCS_TOOL.name: { const docs = await DocService.listDocs(args); return { content: [{ type: "text", text: JSON.stringify(docs, null, 2) }], };
- tools.ts:447-490 (schema)Schema definition for the 'list_docs' tool, including name, description, and detailed inputSchema for filtering docs.export const LIST_DOCS_TOOL: Tool = { name: "list_docs", description: "List docs from Dart with optional filtering parameters. You can filter by folder, title, text content, and more.", inputSchema: { type: "object", properties: { folder: { type: "string", description: "Filter by folder title" }, folderId: { type: "string", description: "Filter by folder ID", pattern: "^[a-zA-Z0-9]{12}$", }, ids: { type: "string", description: "Filter by IDs" }, inTrash: { type: "boolean", description: "Filter by trash status" }, limit: { type: "number", description: "Number of results per page" }, offset: { type: "number", description: "Initial index for pagination" }, text: { type: "string", description: "Filter by text content" }, title: { type: "string", description: "Filter by title" }, o: { type: "array", items: { type: "string", enum: [ "-created_at", "-order", "-title", "-updated_at", "created_at", "order", "title", "updated_at", ], }, description: "Ordering options (use - prefix for descending)", }, s: { type: "string", description: "Search by title, text, or folder title", }, }, required: [], }, };
- index.ts:192-214 (registration)Registration of 'list_docs' tool (as LIST_DOCS_TOOL) in the TOOLS array, used by ListToolsRequestSchema handler.const TOOLS = [ // Config GET_CONFIG_TOOL, // Tasks CREATE_TASK_TOOL, LIST_TASKS_TOOL, GET_TASK_TOOL, UPDATE_TASK_TOOL, DELETE_TASK_TOOL, // Docs CREATE_DOC_TOOL, LIST_DOCS_TOOL, GET_DOC_TOOL, UPDATE_DOC_TOOL, DELETE_DOC_TOOL, // Comments ADD_TASK_COMMENT_TOOL, LIST_TASK_COMMENTS_TOOL, // Other GET_DARTBOARD_TOOL, GET_FOLDER_TOOL, GET_VIEW_TOOL, ];
- index.ts:371-373 (registration)MCP server request handler for ListToolsRequestSchema that returns the TOOLS array including 'list_docs'.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS, }));
- index.ts:36-52 (registration)Import of LIST_DOCS_TOOL from tools.js for use in index.ts.ADD_TASK_COMMENT_TOOL, CREATE_DOC_TOOL, CREATE_TASK_TOOL, DELETE_DOC_TOOL, DELETE_TASK_TOOL, GET_CONFIG_TOOL, GET_DARTBOARD_TOOL, GET_DOC_TOOL, GET_FOLDER_TOOL, GET_TASK_TOOL, GET_VIEW_TOOL, LIST_DOCS_TOOL, LIST_TASK_COMMENTS_TOOL, LIST_TASKS_TOOL, UPDATE_DOC_TOOL, UPDATE_TASK_TOOL, } from "./tools.js";