get_documents
Retrieve documents from Backlog projects using project IDs. Supports pagination to manage large document lists.
Instructions
Gets a list of documents in a project.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectIds | Yes | Project ID List | |
| offset | No | Offset for pagination (default is 0) |
Implementation Reference
- src/tools/getDocuments.ts:36-38 (handler)The handler function that executes the tool logic by calling the Backlog API's getDocuments method with provided projectIds and offset.handler: async ({ projectIds, offset }) => { return backlog.getDocuments({ projectId: projectIds, offset }); },
- src/tools/getDocuments.ts:7-18 (schema)Input schema definition for the get_documents tool, including projectIds (array of project IDs) and optional offset for pagination.const getDocumentsSchema = buildToolSchema((t) => ({ projectIds: z .array(z.number()) .describe(t('TOOL_GET_DOCUMENTS_PROJECT_ID_LIST', 'Project ID List')), offset: z .number() .optional() .default(0) .describe( t('TOOL_GET_DOCUMENTS_OFFSET', 'Offset for pagination (default is 0)') ), }));
- src/tools/tools.ts:151-155 (registration)Registration of the getDocumentsTool within the 'document' toolset group in the allTools function.tools: [ getDocumentsTool(backlog, helper), getDocumentTreeTool(backlog, helper), getDocumentTool(backlog, helper), ],
- src/tools/getDocuments.ts:29-35 (schema)Tool metadata including name 'get_documents', description, input/output schemas, and important fields.description: t( 'TOOL_GET_DOCUMENTS_DESCRIPTION', 'Gets a list of documents in a project.' ), schema: z.object(getDocumentsSchema(t)), outputSchema: DocumentItemSchema, importantFields: ['id', 'projectId', 'title', 'plain'],