Skip to main content
Glama
mikeysrecipes

interactive-mcp

message_complete_notification

Signal completion of responses in interactive MCP server sessions by sending cross-platform notifications when tasks or queries are finished.

Instructions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNameYesNotification title
messageYesNotification body

Implementation Reference

  • The handler function that executes the tool logic: extracts projectName and message from arguments, sends an OS notification using node-notifier, and returns a confirmation response.
    (args) => {
      // Use inferred args type
      const { projectName, message } = args;
      notifier.notify({ title: projectName, message });
      return { content: [{ type: 'text', text: 'Notification sent.' }] };
    },
  • src/index.ts:155-169 (registration)
    Registration of the message_complete_notification tool using server.tool(), including dynamic description handling, schema reference, and inline handler function.
      server.tool(
        'message_complete_notification',
        // Description is a string here, but handle consistently
        typeof messageCompleteNotificationTool.description === 'function'
          ? messageCompleteNotificationTool.description(globalTimeoutSeconds) // Should not happen based on definition, but safe
          : messageCompleteNotificationTool.description,
        messageCompleteNotificationTool.schema, // Use schema property
        (args) => {
          // Use inferred args type
          const { projectName, message } = args;
          notifier.notify({ title: projectName, message });
          return { content: [{ type: 'text', text: 'Notification sent.' }] };
        },
      );
    }
  • Zod schema (raw shape) defining input parameters: projectName and message, used for input validation.
    const rawSchema: ZodRawShape = {
      projectName: z.string().describe('Notification title'),
      message: z.string().describe('Notification body'),
    };
  • ToolCapabilityInfo including JSON schema for parameters (input schema advertised to MCP client).
    const capabilityInfo: ToolCapabilityInfo = {
      description: 'Notify when a response has completed via OS notification.',
      parameters: {
        type: 'object',
        properties: {
          projectName: {
            type: 'string',
            description:
              'Identifies the context/project making the notification (appears in notification title)',
          },
          message: {
            type: 'string',
            description: 'The specific notification text (appears in the body)',
          },
        },
        required: ['projectName', 'message'],
      },
    };
  • Export of the ToolDefinition object aggregating capability, description, and schema, imported and used for registration in index.ts.
    export const messageCompleteNotificationTool: ToolDefinition = {
      capability: capabilityInfo,
      description: registrationDescription,
      schema: rawSchema, // Use the raw shape here
    };

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

No annotations provided, so description carries behavioral info. It specifies cross-platform OS notifications and best practices like consistent projectName usage. Lacks details on potential side effects, but for a simple notification tool this is sufficient.

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

Conciseness4/5

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

The description is well-structured into sections (description, notes, when to use, features, best practices, parameters, examples). It is detailed but each section adds necessary value; no redundancy.

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

Completeness5/5

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

For a simple tool with 2 string parameters and no output schema, the description is fully complete: it explains purpose, usage, parameters, examples, and best practices. No gaps remain.

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

Parameters4/5

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

Schema has 100% coverage with concise descriptions. The description adds value by explaining parameter use (title vs body) and providing examples, exceeding the baseline of 3.

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 tool notifies when a response completes and must be used exactly once per message. It distinguishes itself from sibling chat tools by focusing on signaling completion.

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?

Explicit 'whenToUseThisTool' and 'importantNotes' provide comprehensive guidance: use at end of query, after tool sequences, or multi-step processes. The mandatory once-per-message rule is emphasized.

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