Skip to main content
Glama

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
NameRequiredDescriptionDefault
pageNoPage number for pagination
limitNoNumber of sessions per page
agentTypeNoFilter by agent type

Implementation Reference

  • 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 };
        }
      },
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ebenezer-isaac/llmconveyors-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server