Skip to main content
Glama
TaylorChen

Multi-MCPs

by TaylorChen

get_weather_alerts

Retrieve weather alerts for any location to stay informed about severe conditions and safety warnings through the Multi-MCPs server.

Instructions

Get weather alerts for a location (requires One Call support)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
locationYes

Implementation Reference

  • The main handler function for the 'get_weather_alerts' tool. It checks for API key configuration, extracts and validates the location parameter, and delegates to the OpenWeatherClient's alertsByLocation method.
    async get_weather_alerts(args: Record<string, unknown>) {
      if (!cfg.openWeatherApiKey) throw new Error("OPENWEATHER_API_KEY is not configured");
      const location = String(args.location || "");
      if (!location) throw new Error("location is required");
      return client.alertsByLocation(location);
    },
  • Input schema definition for the 'get_weather_alerts' tool, specifying that a 'location' string is required.
    inputSchema: {
      type: "object",
      properties: {
        location: { type: "string" },
      },
      required: ["location"],
    },
  • Tool registration entry in the OpenWeather module's tools array, defining name, description, and schema.
    {
      name: "get_weather_alerts",
      description: "Get weather alerts for a location (requires One Call support)",
      inputSchema: {
        type: "object",
        properties: {
          location: { type: "string" },
        },
        required: ["location"],
      },
    },
  • Global tool registration in registerAllTools, which includes registerOpenWeather() thereby registering the 'get_weather_alerts' tool among others.
    const registrations: ToolRegistration[] = [
      registerOpenWeather(),
      registerGoogleMaps(),
      registerNewsApi(),
      registerGitHub(),
      registerNotion(),
      registerTrello(),
      registerSpotify(),
      registerTwilio(),
      registerUnsplash(),
      registerCoinGecko(),
    ];
  • Helper method in OpenWeatherClient that geocodes the location, fetches One Call API data, and extracts weather alerts.
    async alertsByLocation(location: string) {
      const geo = await this.geocodeCity(location);
      const first = Array.isArray(geo) && geo.length > 0 ? geo[0] : undefined;
      if (!first) return { alerts: [] };
      const { lat, lon } = first as { lat: number; lon: number };
      // One Call 3.0 - alerts field appears if available in your plan
      const data = await this.request("/data/3.0/onecall", {
        query: { lat, lon, appid: this.apiKey, units: "metric" },
      });
      return (data as any).alerts || [];
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While it mentions the One Call requirement, it doesn't describe what weather alerts include (e.g., types, severity, duration), how the location parameter should be formatted, error handling, or rate limits. This leaves significant gaps for a tool that likely interacts with external APIs.

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 front-loads the core purpose and includes a key constraint. There's no wasted text, and every word earns its place, making it easy to parse quickly.

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

Completeness2/5

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

Given the complexity of weather alerts (which can involve varied data like types, severity, and timing), no annotations, no output schema, and low parameter coverage, the description is incomplete. It doesn't explain what the tool returns, how to interpret results, or handle edge cases, leaving the agent with insufficient context for reliable use.

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

Parameters2/5

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

The input schema has 0% description coverage, with one required parameter 'location' that is undocumented. The description doesn't add any meaning beyond the schema—it doesn't explain what format 'location' should be in (e.g., coordinates, city name), examples, or constraints. This fails to compensate for the low schema coverage.

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 tool's purpose with a specific verb ('Get') and resource ('weather alerts for a location'), making it easy to understand what the tool does. However, it doesn't explicitly distinguish this tool from its sibling 'get_current_weather' or 'get_weather_forecast', which would be needed for a perfect score.

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

Usage Guidelines3/5

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

The description includes a constraint ('requires One Call support'), which provides some context for when the tool might fail or require specific conditions. However, it doesn't offer explicit guidance on when to use this tool versus alternatives like 'get_current_weather' or 'get_weather_forecast', nor does it mention any prerequisites beyond the One Call requirement.

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/TaylorChen/muti-mcps'

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