Skip to main content
Glama

session-get

Retrieve session details and generation history by ID for managing AI agent workflows in the LLM Conveyors platform.

Instructions

Get a session by ID. Returns the session object with generation history.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesSession ID

Implementation Reference

  • The implementation of the "session-get" MCP tool, which registers the tool, defines the input schema, and provides the handler logic that calls the `client.sessions.get` method.
    server.tool(
      "session-get",
      "Get a session by ID. Returns the session object with generation history.",
      {
        id: z.string().describe("Session ID"),
      },
      async (params) => {
        try {
          const result = await client.sessions.get(params.id);
          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