Skip to main content
Glama
TaylorChen

Multi-MCPs

by TaylorChen

get_current_weather

Retrieve current weather conditions for any city using the Multi-MCPs server, which integrates multiple third-party APIs into unified tools.

Instructions

Get current weather by city name

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
locationYesCity name, e.g., London

Implementation Reference

  • The handler function that implements the core logic for the 'get_current_weather' tool, handling input validation and API call delegation.
    async get_current_weather(args: Record<string, unknown>) {
      if (!cfg.openWeatherApiKey) throw new Error("OPENWEATHER_API_KEY is not configured");
      const location = String(args.location || "");
      if (!location) throw new Error("location is required");
      return client.currentWeatherByCity(location);
    },
  • Input schema defining the parameters for the 'get_current_weather' tool.
    inputSchema: {
      type: "object",
      properties: {
        location: { type: "string", description: "City name, e.g., London" },
      },
      required: ["location"],
    },
  • Tool registration entry in the OpenWeather registration function, including name, description, and schema.
    {
      name: "get_current_weather",
      description: "Get current weather by city name",
      inputSchema: {
        type: "object",
        properties: {
          location: { type: "string", description: "City name, e.g., London" },
        },
        required: ["location"],
      },
    },
  • Invocation of the OpenWeather tool registration as part of central all-tools registration.
    registerOpenWeather(),
  • Helper method in OpenWeatherClient class that makes the actual API request for current weather.
    async currentWeatherByCity(location: string) {
      return this.request("/data/2.5/weather", {
        query: { q: location, appid: this.apiKey, units: "metric" },
      });
    }
Behavior2/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 states the action but doesn't mention any traits like rate limits, data freshness, error handling, or what the output contains (e.g., temperature, conditions). This leaves significant gaps for an agent to understand how the tool behaves.

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 with no wasted words. It is front-loaded with the core purpose, making it easy to parse quickly. Every part of the sentence contributes directly to understanding the tool's function.

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 complexity of a weather tool with no annotations and no output schema, the description is insufficient. It doesn't explain what data is returned (e.g., temperature, humidity), potential errors, or how it differs from sibling weather tools, leaving the agent with incomplete context for effective use.

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 schema description coverage is 100%, with the parameter 'location' fully documented in the schema as 'City name, e.g., London'. The description adds minimal value beyond this, only implying the parameter's use without providing additional context like format constraints or examples beyond the schema.

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 verb ('Get') and resource ('current weather'), and specifies the input method ('by city name'), making the purpose unambiguous. However, it doesn't explicitly differentiate from its sibling 'get_weather_forecast' or 'get_weather_alerts', which prevents a perfect score.

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 like 'get_weather_forecast' or 'geocode_address' (which might handle location input differently). It lacks any context about prerequisites, limitations, or typical use cases.

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/TaylorChen/muti-mcps'

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