Skip to main content
Glama
devashish234073

my-mcp-server

weather_info

Retrieve mock weather data for a specific city using the weather_info tool on my-mcp-server. Input the city name to get weather information instantly.

Instructions

Get weather information for a city

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cityYesThe city name

Implementation Reference

  • Handler for the 'weather_info' tool that provides mock weather information for specified cities using a hardcoded data map.
    case "weather_info":
      // Mock weather data (you could integrate with a real API)
      const weatherData = {
        "New York": "Sunny, 72°F",
        "London": "Cloudy, 65°F",
        "Tokyo": "Rainy, 68°F",
        "Sydney": "Partly cloudy, 75°F",
      };
    
      const weather = weatherData[args.city] || "Weather data not available for this city";
    
      return {
        content: [
          {
            type: "text",
            text: `Weather in ${args.city}: ${weather}`,
          },
        ],
      };
  • server1.js:54-67 (registration)
    Registration of the 'weather_info' tool in the listTools handler, including name, description, and input schema requiring a 'city' string.
    {
      name: "weather_info",
      description: "Get weather information for a city",
      inputSchema: {
        type: "object",
        properties: {
          city: {
            type: "string",
            description: "The city name",
          },
        },
        required: ["city"],
      },
    }
  • Input schema for the 'weather_info' tool, defining a required 'city' string property.
    inputSchema: {
      type: "object",
      properties: {
        city: {
          type: "string",
          description: "The city name",
        },
      },
      required: ["city"],
    },
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 'Get weather information for a city', which implies a read-only operation, but does not specify details like error handling, rate limits, authentication needs, or what happens if the city is invalid. This leaves significant gaps in understanding the tool's behavior.

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 purpose without any unnecessary words. It is 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.

Completeness3/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 (one parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on behavioral traits, usage context, and output format, which are important for a tool with no annotations or output schema to guide the 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?

The input schema has 100% description coverage, with the 'city' parameter clearly documented as 'The city name'. The description does not add any additional meaning beyond this, such as format examples or constraints, so it meets the baseline score of 3 where the schema does the heavy lifting.

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 ('weather information for a city'), making it immediately understandable. However, it does not distinguish this tool from potential siblings (like 'calculate' or 'greet'), which would require explicit differentiation to earn 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, such as the sibling tools 'calculate' or 'greet'. It lacks any context about prerequisites, exclusions, or specific scenarios, leaving the agent to infer usage based solely on the tool name and 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

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/devashish234073/my-mcps'

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