Skip to main content
Glama
atmospore

Atmospore

Official

get_pollen

Retrieve daily pollen forecasts for any location on Earth. Shows overall risk level and per-species pollen counts in grains per cubic meter to help plan outdoor activities.

Instructions

Get the daily pollen forecast for a specific point on Earth.

Use this for questions like "what's the pollen in Oslo?" or "is the pollen bad in Bergen tomorrow?".

Returns a list of daily forecasts. Each day includes:

  • date (YYYY-MM-DD)

  • overall_risk: "Low" | "Moderate" | "High" | "Very High"

  • species: per-species values in grains/m³ with individual risk levels

If the user asks about a city by name, look up its coordinates first (or use the get_area_average tool with rough coords if you only know the city).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
latYes
lonYes
forecast_daysNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the get_pollen tool. It takes lat, lon, and optional forecast_days, calls the AtmosporeClient.pollen() method, and returns a dict with per-day date, overall_risk, and filtered per-species values (dropping zero-value entries). Results are wrapped via _safe_call for structured error handling.
    @mcp.tool(description=GET_POLLEN_DESCRIPTION)
    async def get_pollen(lat: float, lon: float, forecast_days: int = 1) -> dict[str, Any]:
        async def call() -> Any:
            days = await client.pollen(lat=lat, lon=lon, forecast_days=forecast_days)
            return [
                {
                    "date": d.date,
                    "overall_risk": d.overall_risk,
                    "species": {
                        slug: {
                            "value": lvl.value,
                            "units": lvl.units,
                            "risk_level": lvl.risk_level,
                        }
                        for slug, lvl in d.pollen_levels.items()
                        if lvl.value > 0  # drop zero entries to keep the LLM's context clean
                    },
                }
                for d in days
            ]
    
        return await _safe_call(call())
  • The tool is registered using the @mcp.tool decorator on the FastMCP instance within build_server(). The tool name is automatically derived from the function name 'get_pollen'.
    @mcp.tool(description=GET_POLLEN_DESCRIPTION)
    async def get_pollen(lat: float, lon: float, forecast_days: int = 1) -> dict[str, Any]:
  • The tool description/schema is defined as a constant string (GET_POLLEN_DESCRIPTION) used in the @mcp.tool decorator, describing the tool's behavior and output shape to the LLM.
    GET_POLLEN_DESCRIPTION = """Get the daily pollen forecast for a specific point on Earth.
  • The _safe_call helper wraps all tool handler coroutines, catching known error types (AuthenticationError, RateLimitError, APIError) and returning structured error dicts so the LLM can present actionable messages to the user.
    async def _safe_call(coro) -> dict[str, Any]:
        """Wrap a client call so structured errors reach the LLM cleanly."""
        try:
            return {"ok": True, "data": await coro}
        except AuthenticationError as e:
            return {
                "ok": False,
                "error": "authentication_failed",
                "message": str(e),
                "hint": "Check ATMOSPORE_API_KEY. Get a free key at https://atmospore.com/account.",
            }
        except RateLimitError as e:
            return {
                "ok": False,
                "error": "quota_exceeded",
                "message": str(e),
                "limit": e.limit,
                "used": e.used,
                "resets_at": e.resets_at,
                "hint": "Daily quota hit. Upgrade at https://atmospore.com/plans for higher limits.",
            }
        except APIError as e:
            return {
                "ok": False,
                "error": "api_error",
                "status": e.status,
                "message": str(e),
            }
        except Exception as e:  # noqa: BLE001 — surface unknown errors to LLM
            logger.exception("Unexpected error in MCP tool")
            return {"ok": False, "error": "unexpected_error", "message": str(e)}
Behavior3/5

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

No annotations provided. Description mentions return structure (date, overall_risk, species) but does not disclose rate limits, auth requirements, or side effects. Adequate but not thorough.

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?

Well-structured with bullet points and examples. Front-loads purpose. Some minor redundancy, but overall efficient.

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?

Covers return format and usage hints. With output schema, return details are helpful but not essential. Lacks coordinate format, forecast_days limits, or error handling. Adequate for simple tool.

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?

Schema description coverage is 0%. Description does not explain lat, lon, or forecast_days beyond mentioning coordinates. No format or range information, adding minimal value.

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?

Clearly states it retrieves daily pollen forecast for a point on Earth. Distinguishes from sibling get_area_average by implying point-specific vs area, though not explicitly.

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

Usage Guidelines4/5

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

Provides example questions and guidance on when to use this tool vs get_area_average for city names. Lacks explicit when-not-to-use, but context is good.

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/atmospore/atmospore-mcp'

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