get_books
Retrieve and filter books from BookStack knowledge management systems using pagination, sorting, and advanced criteria to locate specific documentation content.
Instructions
List available books with advanced filtering and sorting
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| offset | No | Pagination offset | |
| count | No | Number of results to return | |
| sort | No | Sort field (e.g., 'name', '-created_at', 'updated_at') | |
| filter | No | Filter criteria |
Implementation Reference
- src/bookstack-client.ts:320-341 (handler)The getBooks method in BookStackClient class makes an API request to fetch books with pagination and optional sorting/filtering.
async getBooks(options?: { offset?: number; count?: number; sort?: string; filter?: Record<string, any>; }): Promise<ListResponse<Book>> { const params: any = { offset: options?.offset || 0, count: Math.min(options?.count || 50, 500) }; if (options?.sort) params.sort = options.sort; if (options?.filter) params.filter = JSON.stringify(options.filter); const response = await this.client.get('/books', { params }); const data = response.data; return { ...data, data: data.data.map((book: Book) => this.enhanceBookResponse(book)) }; }