Skip to main content
Glama

get_future_weather

Retrieve 3-hourly weather forecasts for dates 14 to 300 days ahead. Provide location details and a future date to access long-range weather predictions.

Instructions

Get future weather forecast for a date between 14 and 300 days from today. Returns 3-hourly data. Available on Pro+ plan and above.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesLocation query — city name, lat/lon, zip, postcode, IATA, or IP.
dtYesFuture date in yyyy-MM-dd format. Must be between 14 and 300 days from today.

Implementation Reference

  • The handler implementation for the "get_future_weather" tool, which calls the "/future.json" WeatherAPI endpoint.
    case "get_future_weather": {
      const { q, dt } = args as { q: string; dt: string };
      result = await weatherRequest("/future.json", { q, dt });
      break;
    }
  • The tool registration and input schema definition for "get_future_weather".
      name: "get_future_weather",
      description:
        "Get future weather forecast for a date between 14 and 300 days from today. Returns 3-hourly data. Available on Pro+ plan and above.",
      inputSchema: {
        type: "object",
        properties: {
          q: {
            type: "string",
            description: "Location query — city name, lat/lon, zip, postcode, IATA, or IP.",
          },
          dt: {
            type: "string",
            description:
              "Future date in yyyy-MM-dd format. Must be between 14 and 300 days from today.",
          },
        },
        required: ["q", "dt"],
      },
    },
  • Helper function used by "get_future_weather" and other tools to perform authenticated requests to the WeatherAPI.
    async function weatherRequest(
      endpoint: string,
      params: Record<string, string | number>
    ): Promise<unknown> {
      const searchParams = new URLSearchParams({ key: API_KEY! });
      for (const [k, v] of Object.entries(params)) {
        searchParams.set(k, String(v));
      }
      const url = `${BASE_URL}${endpoint}?${searchParams.toString()}`;
      const res = await fetch(url);
      const data = await res.json();
      if (!res.ok) {
        const err = data as { error?: { code: number; message: string } };
        throw new McpError(
          ErrorCode.InternalError,
          `WeatherAPI error ${err.error?.code}: ${err.error?.message ?? res.statusText}`
        );
      }
      return data;
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds useful context about the return format ('Returns 3-hourly data') and access restrictions ('Pro+ plan and above'), but doesn't cover other behavioral aspects like error conditions, rate limits, authentication needs, or what happens with invalid dates beyond the range.

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 extremely concise (three short sentences) with zero wasted words. Each sentence adds distinct value: purpose, return format, and access restrictions. It's perfectly front-loaded with the core functionality.

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

Completeness4/5

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

Given the tool's moderate complexity (future weather forecasting), no annotations, and no output schema, the description does well by covering purpose, timeframe, return granularity, and access tier. However, it lacks details about response format, error handling, and how it differs from similar siblings like get_forecast, leaving some gaps for an agent.

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?

Schema description coverage is 100%, so the schema already fully documents both parameters. The description reinforces the date range constraint for 'dt' but doesn't add meaningful semantic context beyond what the schema provides. 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.

Purpose5/5

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

The description clearly states the specific action ('Get future weather forecast'), resource ('weather'), and scope ('for a date between 14 and 300 days from today'). It distinguishes from siblings like get_current_weather (present) and get_forecast (likely short-term) by specifying the long-range future timeframe.

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?

The description provides clear context on when to use this tool (for dates 14-300 days ahead) and mentions availability constraints ('Pro+ plan and above'), which helps differentiate from other weather tools. However, it doesn't explicitly state when not to use it or name specific alternatives among siblings.

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/weatherapicom/weatherapi-mcp'

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