Skip to main content
Glama

notify_session_progress

Send progress updates from AFK Mode to mobile clients during active sessions. Use categories like milestone, error, or info to communicate task status while away from your desk.

Instructions

Sends a progress update to the connected mobile client. Only call this when AFK mode is active (afkMode: true and clientConnected: true). Returns immediately. Use category 'milestone' for significant steps, 'error' for failures, 'info' for routine updates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesThe session ID
summaryYesShort human-readable summary
detailNoExtended detail (shown in detailed verbosity)
categoryYesCategory of the progress update
progressNoOptional structured progress
filesChangedNoOptional list of files touched
toolsUsedNoOptional list of tools called

Implementation Reference

  • The main handler for 'notify_session_progress' tool. Registers the tool with MCP server, defines Zod input schema (sessionId, summary, detail, category, progress, filesChanged, toolsUsed), creates a ProgressHistoryEntry, adds it to session history via addProgressEntry(), sends WebSocket update via sendProgressUpdate(), and triggers push notifications for error/milestone categories.
    // ── notify_session_progress ──
    server.tool(
      "notify_session_progress",
      "Sends a progress update to the connected mobile client. Only call this when AFK mode is active (afkMode: true and clientConnected: true). Returns immediately. Use category 'milestone' for significant steps, 'error' for failures, 'info' for routine updates.",
      {
        sessionId: z.string().describe("The session ID"),
        summary: z.string().describe("Short human-readable summary"),
        detail: z
          .string()
          .nullable()
          .optional()
          .describe("Extended detail (shown in detailed verbosity)"),
        category: z
          .enum(["info", "warning", "error", "success", "milestone"])
          .describe("Category of the progress update"),
        progress: z
          .object({
            current: z.number(),
            total: z.number(),
            label: z.string(),
          })
          .nullable()
          .optional()
          .describe("Optional structured progress"),
        filesChanged: z.array(z.string()).optional().describe("Optional list of files touched"),
        toolsUsed: z.array(z.string()).optional().describe("Optional list of tools called"),
      },
      async (args) => {
        const id = crypto.randomUUID();
        const timestamp = new Date().toISOString();
    
        const entry: ProgressHistoryEntry = {
          id,
          timestamp,
          summary: args.summary,
          detail: args.detail ?? null,
          category: args.category,
          progress: args.progress ?? null,
          filesChanged: args.filesChanged ?? [],
          toolsUsed: args.toolsUsed ?? [],
        };
        addProgressEntry(entry);
    
        const msg: ProgressUpdateMessage = {
          type: "progress_update",
          ...entry,
        };
        const delivered = sendProgressUpdate(msg);
    
        // Push notification for critical updates
        if (args.category === "error" || args.category === "milestone") {
          await sendPushNotification(
            args.category === "error" ? "⚠️ Error" : "🎯 Milestone",
            args.summary,
          );
        }
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify({ delivered }),
            },
          ],
        };
      },
    );
  • ProgressUpdateMessage type definition - the message structure sent to the mobile client. Contains type, id, timestamp, summary, detail, category, progress, filesChanged, and toolsUsed fields.
    export interface ProgressUpdateMessage {
      type: "progress_update";
      id: string;
      timestamp: string;
      summary: string;
      detail: string | null;
      category: ProgressCategory;
      progress: ProgressInfo | null;
      filesChanged: string[];
      toolsUsed: string[];
    }
  • NotifyProgressInput interface - defines the input type for the notify_session_progress tool with sessionId, summary, detail, category, progress, filesChanged, and toolsUsed fields.
    export interface NotifyProgressInput {
      sessionId: string;
      summary: string;
      detail?: string | null;
      category: ProgressCategory;
      progress?: ProgressInfo | null;
      filesChanged?: string[];
      toolsUsed?: string[];
    }
  • sendProgressUpdate helper function - wraps sendToClient to send the ProgressUpdateMessage to the connected WebSocket client. Returns boolean indicating delivery status.
    export function sendProgressUpdate(update: ProgressUpdateMessage): boolean {
      return sendToClient(update);
    }
  • addProgressEntry helper function - adds a ProgressHistoryEntry to the session's progressHistory array for tracking all progress updates.
    export function addProgressEntry(entry: ProgressHistoryEntry): void {
      getSession().progressHistory.push(entry);
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden and does well by disclosing key behavioral traits: it specifies the prerequisite conditions (AFK mode active), indicates immediate return behavior ('Returns immediately'), and explains how different categories should be used. However, it doesn't mention potential side effects like network errors or client response handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tightly focused sentences with zero waste: first states purpose and prerequisites, second describes return behavior, third provides category usage guidance. Every sentence earns its place by adding essential information not found elsewhere.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 7 parameters, 100% schema coverage, and no output schema, the description provides excellent contextual completeness by covering prerequisites, behavioral traits, and usage guidelines. The only minor gap is lack of information about return values or error conditions, but this is reasonable given the tool's complexity level.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, providing comprehensive parameter documentation. The description adds minimal value beyond the schema, only mentioning category usage guidelines which partially overlap with the enum description. Baseline 3 is appropriate when the schema does most of the work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Sends a progress update') and target ('to the connected mobile client'), distinguishing it from sibling tools like get_afk_status or get_user_decision that perform different functions. It goes beyond restating the name by specifying the communication context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use ('Only call this when AFK mode is active (afkMode: true and clientConnected: true)') and provides detailed guidance on category usage ('Use category 'milestone' for significant steps, 'error' for failures, 'info' for routine updates'), offering clear alternatives within the tool itself.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/paulbennet/afk-mode-mcp'

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