Skip to main content
Glama
jeannassereldine

MCP Weather Server

get_coordinates

Convert city names to latitude and longitude coordinates for weather data retrieval and location-based applications.

Instructions

Returns the latitude and longitude of the specified city as a tuple.
 Args:
    city: the city of 

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cityYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler function for the 'get_coordinates' tool. It accepts a city name as input and returns a hardcoded tuple of latitude and longitude coordinates (San Francisco). The implementation notes to replace the hardcoded values with a real API call.
    def get_coordinates(city: str) -> Tuple[float, float]:
       """
       Returns the latitude and longitude of the specified city as a tuple.
        Args:
           city: the city of 
       """
       # Hardcode replace it with you api to get the latitude and longitude of any city
       return (37.7749, -122.4194)
  • Registration of the 'get_coordinates' tool using the @mcp.tool() decorator within the register(mcp) function.
    @mcp.tool()   
    def get_coordinates(city: str) -> Tuple[float, float]:
  • Input schema: city (str). Output schema: Tuple[float, float] for latitude and longitude.
    def get_coordinates(city: str) -> Tuple[float, float]:
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. While it states the return format (tuple), it doesn't mention error conditions, rate limits, authentication requirements, or what happens with invalid city names. For a tool with no annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is brief but poorly structured. The first sentence is clear, but the 'Args:' section is incomplete ('the city of' ends abruptly). While it's concise, the incomplete sentence undermines its effectiveness. Every sentence should earn its place, and the incomplete second sentence doesn't.

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 simplicity (one parameter) and the presence of an output schema, the description is somewhat complete but has gaps. The output schema existence means the description doesn't need to explain return values in detail, but it should still cover behavioral aspects. With no annotations and minimal parameter documentation, it's adequate but with clear room for improvement.

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 description adds minimal parameter semantics beyond what the schema provides. It mentions 'city: the city of' but this is incomplete and adds little value. With 0% schema description coverage and only one parameter, the baseline would be 4 for zero parameters, but here we have one undocumented parameter. The description doesn't compensate for the coverage gap.

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: 'Returns the latitude and longitude of the specified city as a tuple.' This is a specific verb (returns) + resource (latitude and longitude) combination. However, it doesn't distinguish this tool from its sibling 'get_forecast' - both likely involve geographic data but serve different purposes.

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 about when to use this tool versus alternatives. There's no mention of the sibling tool 'get_forecast' or any context about when coordinate retrieval is appropriate versus weather forecasting. The description only states what the tool does, not when to use it.

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/jeannassereldine/mcp-server'

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