session-list
List and filter AI agent sessions with pagination for the LLM Conveyors platform. Manage session data by agent type, page, and limit parameters.
Instructions
List sessions with optional filtering and pagination. Returns an array of session objects.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number for pagination | |
| limit | No | Number of sessions per page | |
| agentType | No | Filter by agent type |
Implementation Reference
- src/tools/sessions.ts:25-46 (handler)Implementation of the 'session-list' tool, which wraps the client.sessions.list method and handles request parameters and potential errors.
server.tool( "session-list", "List sessions with optional filtering and pagination. Returns an array of session objects.", { page: z.number().optional().describe("Page number for pagination"), limit: z.number().optional().describe("Number of sessions per page"), agentType: z.string().optional().describe("Filter by agent type"), }, async (params) => { try { const result = await client.sessions.list({ page: params.page, limit: params.limit, agentType: params.agentType, }); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (err) { const message = err instanceof Error ? err.message : String(err); return { content: [{ type: "text", text: `Error: ${message}` }], isError: true }; } }, );