Skip to main content
Glama
pragaurav44

WeatherMCP

by pragaurav44

WeatherMCP

This project is an MCP server built as a hands-on exercise. It provides weather data and alerts from the US National Weather Service (NWS) via a simple API using the FastMCP framework.

Features

  • Weather Alerts: Get active weather alerts for any US state.

  • Forecast: Retrieve weather forecasts for a specific latitude and longitude.

Related MCP server: Weather MCP Server

Requirements

  • Python 3.8+

  • uv (for dependency management and running)

Installation

  1. Install dependencies using uv:

    uv pip install -r requirements.txt

    Or, if you use pyproject.toml:

    uv pip install -r pyproject.toml
  2. (Optional) Create a virtual environment:

    uv venv .venv
    source .venv/bin/activate

Running the MCP Server

To start the server using uv:

uv pip install -e .  # if you want to install as editable, or just ensure dependencies are installed
uv python weather.py

The server will start and listen for MCP requests via stdio.

Available Tools

1. get_alerts(state: str)

  • Description: Get active weather alerts for a US state.

  • Argument: state — Two-letter US state code (e.g., CA, NY).

  • Returns: Formatted string of current alerts or a message if none are found.

2. get_forecast(latitude: float, longitude: float)

  • Description: Get weather forecast for a specific location.

  • Arguments:

    • latitude — Latitude of the location (float)

    • longitude — Longitude of the location (float)

  • Returns: Formatted string with the next 5 forecast periods.

Notes


Feel free to extend or modify the project for your own experiments!

Available Tools

2 tools
get_alertsB

Get weather alerts for a US state.

Args:
    state: Two-letter US state code (e.g. CA, NY)
ParametersJSON Schema
NameRequiredDescriptionDefault
stateYes

TDQS

B3.1/5.0
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. It states what the tool does but lacks details on behavioral traits such as rate limits, authentication needs, error handling, or response format. The description does not contradict any annotations (since none exist), but it fails to provide sufficient context for safe and effective use.

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 appropriately sized and front-loaded, with the main purpose stated first followed by parameter details. It uses two sentences efficiently, with no wasted words. However, the structure could be slightly improved by integrating parameter info more seamlessly, but it remains clear and concise.

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?

Given the tool's low complexity (1 parameter, no output schema, no annotations), the description is minimally adequate. It covers the purpose and parameter semantics but lacks behavioral context and usage guidelines. Without annotations or output schema, the description should do more to explain what to expect from the tool, but it meets a basic threshold for this simple case.

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?

The description adds meaningful semantics beyond the input schema. The schema has 0% description coverage (only titles), but the description explains that 'state' is a 'Two-letter US state code (e.g. CA, NY)', clarifying the format and providing examples. This compensates well for the low schema coverage, though it doesn't cover all potential edge cases.

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: 'Get weather alerts for a US state.' It specifies the verb ('Get') and resource ('weather alerts'), and distinguishes it from the sibling tool 'get_forecast' by focusing on alerts rather than forecasts. However, it doesn't explicitly differentiate from potential other alert-related tools beyond the sibling.

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. It mentions the sibling tool 'get_forecast' in context signals, but the description itself does not compare or contrast usage scenarios, prerequisites, or exclusions. Usage is implied by the purpose but not explicitly stated.

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

get_forecastC

Get weather forecast for a location.

Args:
    latitude: Latitude of the location
    longitude: Longitude of the location
ParametersJSON Schema
NameRequiredDescriptionDefault
latitudeYes
longitudeYes

TDQS

C2.9/5.0
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 basic action but lacks critical details such as data freshness, rate limits, error conditions, authentication requirements, or response format. This is inadequate for a tool that presumably interacts with external weather data.

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 efficiently structured with a clear purpose statement followed by parameter explanations. Both sentences earn their place, though the parameter section could be more integrated rather than a separate 'Args:' block.

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?

For a tool with no annotations, no output schema, and a sibling tool, the description is incomplete. It lacks information about what the forecast returns (e.g., time periods, weather elements), how it differs from 'get_alerts', and behavioral constraints. The agent would struggle to use this effectively without additional context.

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?

The description lists both parameters (latitude and longitude) and explains they represent the location coordinates, adding meaning beyond the schema's 0% description coverage. However, it doesn't specify coordinate formats, valid ranges, or units, leaving gaps in parameter understanding.

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 forecast for a location'), making it immediately understandable. However, it doesn't explicitly differentiate from its sibling tool 'get_alerts', which likely serves a related but distinct weather-related function.

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 its sibling 'get_alerts', nor does it mention any prerequisites, constraints, or alternative scenarios. Usage context is implied but not explicitly stated.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updates
    • First observedget_alerts
    • First observedget_forecast

TDQS

B3.1/5.0
Disambiguation5/5

The two tools have clearly distinct purposes: get_alerts retrieves weather alerts for US states, while get_forecast provides forecasts for geographic coordinates. There is no overlap in functionality or ambiguity between them.

Naming Consistency5/5

Both tools follow a consistent verb_noun naming pattern (get_alerts, get_forecast) with identical verb usage and snake_case formatting. The naming is perfectly predictable and uniform.

Tool Count2/5

With only 2 tools, this server feels thin for a weather domain. It lacks basic operations like current conditions, historical data, or broader geographic coverage, making it insufficient for comprehensive weather-related tasks.

Completeness2/5

The tool surface is severely incomplete for weather functionality. It misses core operations such as current weather, historical data, multi-day forecasts, or international coverage, leaving significant gaps that will limit agent effectiveness.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

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/pragaurav44/WeatherMCP'

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