Skip to main content
Glama
Moe03

Google Maps MCP Server

by Moe03

get_weather

Retrieve current weather conditions for any specified location using Google Maps data. Provide a city or address to get temperature, precipitation, and atmospheric details.

Instructions

Gets the current weather.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
locationYesThe location to get weather for (city, address, etc.)

Implementation Reference

  • The main handler function for the get_weather tool, which returns a simulated weather response for the given location.
    async function handleGetWeather(location: string) {
      
      return {
        content: [{
          type: "text",
          text: `Weather in ${location}: Sunny, 75 degrees Fahrenheit.`
        }],
        isError: false
      };
    }
  • The schema definition for the get_weather tool, specifying name, description, and input schema requiring a 'location' parameter.
    const GET_WEATHER_TOOL: Tool = {
      name: "get_weather",
      description: "Gets the current weather.",
      inputSchema: {
        type: "object",
        properties: {
          location: {
            type: "string",
            description: "The location to get weather for (city, address, etc.)"
          }
        },
        required: ["location"]
      },
    };
  • src/index.ts:77-82 (registration)
    Registration of the get_weather tool (as GET_WEATHER_TOOL) in the array of available tools returned by listTools.
    const SIMPLE_TOOLS = [
      GET_WEATHER_TOOL,
      ADD_POST_TOOL,
      GET_POSTS_TOOL,
      DELETE_POST_TOOL,
    ] as const;
  • src/index.ts:181-184 (registration)
    Registration in the CallToolRequest handler switch statement, dispatching get_weather calls to the handler.
    case "get_weather": {
      const { location } = request.params.arguments as { location: string };
      return await handleGetWeather(location);
    }
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 the tool 'Gets the current weather,' which implies a read-only operation, but doesn't disclose any behavioral traits such as rate limits, data freshness, error handling, or authentication requirements. For a tool with no annotations, this leaves significant gaps in understanding how it behaves beyond the basic action.

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 and front-loaded, consisting of a single sentence that directly states the tool's purpose. There is no wasted language or unnecessary elaboration, making it efficient and easy to parse. Every word earns its place, and the structure is straightforward without any fluff.

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 tool's complexity (a simple read operation with one parameter) and the absence of annotations and output schema, the description is incomplete. It doesn't explain what the return values are, potential errors, or any contextual details like data sources or update frequency. For a tool with no structured output information, the description should provide more context to be fully helpful.

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 input schema has 100% description coverage, with the 'location' parameter fully documented as 'The location to get weather for (city, address, etc.)'. The description doesn't add any additional meaning beyond what the schema provides, such as examples or constraints on location formats. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 ('Gets') and resource ('current weather'), making it immediately understandable. However, it doesn't differentiate from potential sibling tools like 'get_forecast' or 'get_historical_weather', which aren't present in the provided sibling list but could exist conceptually. The description is accurate but lacks explicit distinction from similar weather-related tools.

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 doesn't mention any prerequisites, constraints, or context for usage, such as real-time vs. forecasted data or geographic limitations. With sibling tools like 'add_post' and 'delete_post' that are unrelated to weather, there's no explicit comparison or exclusion criteria provided in the description.

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/Moe03/mcp-hello-world'

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