Skip to main content
Glama

weather_search

Search for locations using a query to quickly find weather data. Integrated with Weather MCP Server to provide accurate results for AI-driven weather inquiries.

Instructions

Search for locations matching query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesLocation query

Implementation Reference

  • Executes the weather_search tool by validating the 'q' parameter, fetching data from the 'search.json' endpoint using the shared fetch function, and formatting the result as JSON.
    elif tool_name == "weather_search": q = arguments.get("q") if not q: raise ValueError("Location (q) is required") result = await fetch("search.json", {"q": q}) content = json.dumps(result, indent=2)
  • server.py:147-160 (registration)
    Registers the weather_search tool in the tools/list response, including its name, description, and input schema.
    { "name": "weather_search", "description": "Search for locations matching query", "inputSchema": { "type": "object", "properties": { "q": { "type": "string", "description": "Location query" } }, "required": ["q"] } }
  • Defines the input schema for the weather_search tool, requiring a 'q' string parameter for the location query.
    "inputSchema": { "type": "object", "properties": { "q": { "type": "string", "description": "Location query" } }, "required": ["q"] }

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/first-it-consulting/weather-mcp-server'

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