get_list_view_objects
Retrieve filtered and sorted objects from a specific list view in Anytype using space, list, and view identifiers with pagination support.
Instructions
Retrieves objects from a specific list view with applied filters and sorting.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| space_id | Yes | Space ID containing the list | |
| list_id | Yes | List ID | |
| view_id | Yes | View ID | |
| offset | No | Pagination offset | |
| limit | No | Number of results per page (1-1000) |
Implementation Reference
- src/index.ts:560-581 (handler)Handler function that retrieves objects from a specific list view by making an authenticated GET request to the Anytype API endpoint `/spaces/{space_id}/lists/{list_id}/{view_id}/objects` with pagination parameters.
async ({ space_id, list_id, view_id, offset, limit }) => { try { const validLimit = Math.max(1, Math.min(1000, limit)); const response = await this.makeRequest( "get", `/spaces/${space_id}/lists/${list_id}/${view_id}/objects`, null, { offset, limit: validLimit } ); return { content: [ { type: "text" as const, text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { return this.handleApiError(error); } } ); - src/index.ts:550-559 (schema)Zod schema defining the input parameters for the get_list_view_objects tool: space_id, list_id, view_id (required strings), offset and limit (optional numbers with defaults).
space_id: z.string().describe("Space ID containing the list"), list_id: z.string().describe("List ID"), view_id: z.string().describe("View ID"), offset: z.number().optional().default(0).describe("Pagination offset"), limit: z .number() .optional() .default(100) .describe("Number of results per page (1-1000)"), }, - src/index.ts:546-581 (registration)MCP server tool registration call that registers the get_list_view_objects tool with name, description, input schema, and handler function.
this.server.tool( "get_list_view_objects", "Retrieves objects from a specific list view with applied filters and sorting.", { space_id: z.string().describe("Space ID containing the list"), list_id: z.string().describe("List ID"), view_id: z.string().describe("View ID"), offset: z.number().optional().default(0).describe("Pagination offset"), limit: z .number() .optional() .default(100) .describe("Number of results per page (1-1000)"), }, async ({ space_id, list_id, view_id, offset, limit }) => { try { const validLimit = Math.max(1, Math.min(1000, limit)); const response = await this.makeRequest( "get", `/spaces/${space_id}/lists/${list_id}/${view_id}/objects`, null, { offset, limit: validLimit } ); return { content: [ { type: "text" as const, text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { return this.handleApiError(error); } } );