Skip to main content
Glama

handoff_list

View saved conversation transfers with summaries to manage context between AI chats or projects. Opens interactive UI when available.

Instructions

List all saved handoffs with summaries. Returns lightweight metadata without full conversation content. Opens interactive UI if supported.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for handoff_list tool that retrieves all handoffs from storage and returns them in both text format and structured content. Includes error handling and audit logging.
      async (): Promise<CallToolResult> => {
        const audit = getAuditLogger();
        const timer = audit.startTimer();
    
        const { storage } = await getStorage();
        const result = await storage.list();
    
        audit.logTool({
          event: "tool_call",
          toolName: "handoff_list",
          durationMs: timer.elapsed(),
          success: result.success,
          error: result.error,
        });
    
        if (!result.success) {
          return {
            content: [{ type: "text", text: `\u274C Error: ${result.error}` }],
          };
        }
    
        const handoffs = result.data || [];
    
        if (handoffs.length === 0) {
          return {
            content: [{ type: "text", text: "No handoffs saved. Use handoff_save to create one." }],
            structuredContent: { count: 0, handoffs: [] },
          };
        }
    
        return {
          content: [{ type: "text", text: JSON.stringify(handoffs, null, 2) }],
          structuredContent: { count: handoffs.length, handoffs },
        };
      }
    );
  • src/tools.ts:212-236 (registration)
    Tool registration using registerAppTool with MCP Apps UI support. Defines the tool name, title, description, empty input schema, output schema (zod validation for count and handoffs array), and UI resource metadata.
    registerAppTool(
      server,
      "handoff_list",
      {
        title: "Handoff List",
        description:
          "List all saved handoffs with summaries. Returns lightweight metadata without full conversation content. Opens interactive UI if supported.",
        inputSchema: {},
        outputSchema: z.object({
          count: z.number().describe("Number of handoffs"),
          handoffs: z
            .array(
              z.object({
                key: z.string(),
                title: z.string(),
                summary: z.string(),
                from_ai: z.string(),
                from_project: z.string(),
                created_at: z.string(),
              })
            )
            .describe("List of handoffs"),
        }),
        _meta: { ui: { resourceUri: VIEWER_RESOURCE_URI } },
      },
  • LocalStorage implementation of list() method that maps stored handoffs to HandoffSummary objects (excluding conversation content) for efficient listing without loading full data.
    /**
     * List all saved handoffs (summaries only, no conversation content).
     * @returns Result with array of handoff summaries
     */
    async list(): Promise<StorageResult<HandoffSummary[]>> {
      const summaries: HandoffSummary[] = Array.from(this.handoffs.values()).map((h) => ({
        key: h.key,
        title: h.title,
        from_ai: h.from_ai,
        from_project: h.from_project,
        created_at: h.created_at,
        summary: h.summary,
      }));
    
      return { success: true, data: summaries };
    }
  • RemoteStorage implementation of list() method that makes an HTTP GET request to the /handoff endpoint to retrieve handoff summaries from a remote server.
    /** @inheritdoc */
    async list(): Promise<StorageResult<HandoffSummary[]>> {
      return this.request("GET", "/handoff");
    }
  • HandoffSummary interface defining the structure of handoff metadata returned by list(): key, title, from_ai, from_project, created_at, and summary (excludes conversation).
    export interface HandoffSummary {
      key: string;
      title: string;
      from_ai: string;
      from_project: string;
      created_at: string;
      summary: string;
    }

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/trust-delta/conversation-handoff-mcp'

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