Skip to main content
Glama
shtansky-bikeleasing

Weather MCP Server

send_notification

Delivers weather alerts as macOS notifications by sending provided weather data directly to the user's desktop for immediate awareness.

Instructions

Send a macOS notification with provided weather data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesNotification title
messageYesNotification message

Implementation Reference

  • The main handler function for the 'send_notification' tool. It executes an AppleScript via child_process to display a macOS notification dialog with the given title and message.
    async sendNotification(title, message) {
        try {
            const { exec } = await import('child_process');
            const { promisify } = await import('util');
            const execAsync = promisify(exec);
    
            const combinedMessage = `${title}\\n\\n${message}`;
            const script = `osascript -e 'tell application "System Events" to display dialog "${combinedMessage}" with title "Weather Update" buttons {"OK"} default button "OK" giving up after 10'`;
    
            console.error("Executing:", script);
            await execAsync(script);
    
            return {
                content: [
                    {
                        type: "text",
                        text: `✅ Weather dialog displayed!\nTitle: ${title}\nMessage: ${message}`,
                    },
                ],
            };
        } catch (error) {
            return {
                content: [
                    {
                        type: "text",
                        text: `❌ Failed: ${error.message}`,
                    },
                ],
            };
        }
    }
  • index.js:48-65 (registration)
    Tool registration in the ListTools response, defining the name, description, and input schema for 'send_notification'.
    {
        name: "send_notification",
        description: "Send a macOS notification with provided weather data",
        inputSchema: {
            type: "object",
            properties: {
                title: {
                    type: "string",
                    description: "Notification title",
                },
                message: {
                    type: "string",
                    description: "Notification message",
                },
            },
            required: ["title", "message"],
        },
    },
  • index.js:77-79 (handler)
    Dispatch logic in the CallToolRequest handler that routes calls to the sendNotification method.
    if (name === "send_notification") {
        return await this.sendNotification(args.title, args.message);
    }
  • Input schema definition for the 'send_notification' tool, specifying title and message as required strings.
    inputSchema: {
        type: "object",
        properties: {
            title: {
                type: "string",
                description: "Notification title",
            },
            message: {
                type: "string",
                description: "Notification message",
            },
        },
        required: ["title", "message"],
    },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool sends notifications but doesn't mention important behavioral aspects like whether this requires specific macOS permissions, if notifications are persistent or transient, what happens if the system is in Do Not Disturb mode, or whether there are rate limits. The description provides basic functionality but lacks operational context.

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?

The description is a single, efficient sentence that gets straight to the point with zero wasted words. It's appropriately sized for a simple notification tool and front-loads the essential information about what the tool does.

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

Completeness3/5

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

For a simple 2-parameter tool with no output schema and no annotations, the description provides basic functionality but lacks important context. It doesn't explain what happens after sending (success/failure indicators), doesn't connect to the sibling weather tool, and doesn't address macOS-specific considerations. While adequate for the simplest use case, there are clear gaps in completeness.

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?

With 100% schema description coverage, the input schema already fully documents both parameters (title and message). The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain what constitutes appropriate weather data formatting, character limits, or how the parameters relate to the weather context mentioned. The baseline 3 is appropriate when the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the action ('send') and resource ('macOS notification with provided weather data'), making the tool's purpose immediately understandable. However, it doesn't explicitly differentiate from the sibling 'get_weather' tool, which appears to be a data retrieval function rather than a notification delivery mechanism.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. While it mentions 'weather data' which might imply usage after obtaining weather information, there's no explicit connection to the sibling 'get_weather' tool or any other alternatives. No context about appropriate scenarios or exclusions is provided.

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/shtansky-bikeleasing/weather-mcp-server'

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