Skip to main content
Glama
yeison-liscano

Simple HTTP MCP Server

Get Weather

get_weather
Idempotent

Retrieve real-time weather data for a specified location with customizable temperature units using this HTTP-based utility on the Simple HTTP MCP Server.

Instructions

Get the current weather in a given location.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
locationYesThe location to get the weather for
unitNoThe unit of temperaturecelsius

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
weatherYesThe weather in the given location

Implementation Reference

  • The main handler function that implements the logic for the 'get_weather' tool, which simulates returning weather data for a given location and unit.
    async def get_weather(args: Arguments[GetWeatherInput]) -> GetWeatherOutput:
        """Get the current weather in a given location."""
        args.get_state_key("context", Context).add_called_tool("get_weather")
        return GetWeatherOutput(
            weather=f"The weather in {args.inputs.location} is 25 degrees {args.inputs.unit}",
        )
  • Pydantic input schema for the 'get_weather' tool defining location and unit parameters.
    class GetWeatherInput(BaseModel):
        location: str = Field(description="The location to get the weather for")
        unit: str = Field(description="The unit of temperature", default="celsius")
  • Pydantic output schema for the 'get_weather' tool defining the weather response.
    class GetWeatherOutput(BaseModel):
        weather: str = Field(description="The weather in the given location")
  • Registration of the 'get_weather' tool in the TOOLS tuple using the Tool constructor with handler, input schema, and output schema.
        func=get_weather,
        inputs=GetWeatherInput,
        output=GetWeatherOutput,
    ),
    Tool(
Behavior3/5

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

Annotations already provide key behavioral hints (readOnlyHint=false, openWorldHint=true, idempotentHint=true, destructiveHint=false), covering safety and idempotency. The description adds minimal context beyond this, stating it retrieves 'current' weather, which implies real-time data but doesn't elaborate on rate limits, authentication needs, or data freshness.

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 that directly states the tool's function without unnecessary words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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 low complexity, rich annotations, and the presence of an output schema, the description is reasonably complete. It covers the core purpose adequately, though it lacks usage guidelines and deeper behavioral context, which are partially mitigated by the structured data.

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?

With 100% schema description coverage, the input schema fully documents both parameters (location and unit). The description adds no additional semantic context beyond implying location is required, which is already clear from the schema. Baseline 3 is appropriate when schema handles parameter documentation.

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 ('Get') and resource ('current weather'), and specifies the scope ('in a given location'). However, it doesn't explicitly differentiate from potential weather-related siblings, though none are listed among the provided sibling 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 scenarios where other tools might be more appropriate, leaving the agent with minimal context for decision-making.

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/yeison-liscano/http_mcp'

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