Skip to main content
Glama
wpnbos

Buienradar MCP Server

by wpnbos

get_precipitation_for

Retrieve precise 2-hour precipitation forecasts for any location using latitude and longitude coordinates, enabling accurate weather planning.

Instructions

Fetches precipitation data for the next 2 hours from Buienradar.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
latYes
lonYes

Implementation Reference

  • server.py:41-47 (handler)
    Main handler function implementing the tool logic: fetches raw precipitation data via API and formats it for output.
    async def get_precipitation_for(lat: float, lon: float) -> str:
        """Fetches precipitation data for the next 2 hours from Buienradar."""
        data = await make_request(format_url(lat, lon))
        if not data:
            return "Could not get precipitation data."
        
        return format_response(data)
  • server.py:40-40 (registration)
    Registers the tool using FastMCP's @mcp.tool() decorator, which uses the function name 'get_precipitation_for'.
    @mcp.tool()
  • Helper function to construct the Buienradar API URL from latitude and longitude.
    def format_url(lat: float, lon: float) -> str:
        lat = round(lat, 2)
        lon = round(lon, 2)
        return f"https://gadgets.buienradar.nl/data/raintext/?lat={lat}&lon={lon}"
  • Async helper to perform HTTP GET request to the API and return raw text or None on error.
    async def make_request(url) -> str | None:
        headers = {"User-Agent": USER_AGENT}
        try:
            async with httpx.AsyncClient() as client:
                response = await client.get(url, headers=headers, timeout=30)
                response.raise_for_status()
        except Exception as e:
            return None
    
        return response.text
  • Helper to parse raw API response and convert to formatted CSV-like string with mm per hour.
    def format_response(data: str) -> str:
        result = ["time, mm per hour"]
        for line in data.strip().split('\n'):
            intensity, time = line.split("|")
            intensity = int(intensity)
            mm_per_hour = round(10 ** ((intensity - 109) / 32), 1)
            result.append(f"{time}, {mm_per_hour}")
    
        return "\n".join(result)
Behavior2/5

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

With no annotations provided, the description carries full burden but only states it fetches data without disclosing behavioral traits like rate limits, authentication needs, data freshness, error conditions, or response format. It mentions the source (Buienradar) but not what that implies for reliability or availability.

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 with zero waste—it directly states the tool's function, time scope, and data source. It's appropriately sized and front-loaded, 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 no annotations, no output schema, and low schema coverage, the description is incomplete. It lacks details on parameters, return values, error handling, and operational constraints, which are critical for a data-fetching tool with required inputs.

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

Parameters1/5

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

Schema description coverage is 0%, and the description provides no information about the parameters (lat, lon). It doesn't explain what these represent (latitude/longitude coordinates), valid ranges, units, or how they affect the data fetched, leaving parameters completely undocumented.

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 ('fetches precipitation data') and resource ('from Buienradar'), with specific time scope ('for the next 2 hours'). It doesn't need to differentiate from siblings since none exist, but could be more specific about what precipitation data includes (e.g., rainfall intensity, probability).

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?

No guidance is provided on when to use this tool versus alternatives or prerequisites. The description mentions the data source (Buienradar) but doesn't explain limitations or appropriate contexts for use, leaving the agent without operational context.

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

Related 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/wpnbos/buienradar-mcp-server'

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