Skip to main content
Glama

cities_by_coordinates_largest

Find the largest cities near given coordinates, sorted by population. Supports multilingual names.

Instructions

Find the largest cities near given coordinates, ordered by population.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
latYesLatitude
lonYesLongitude
preferredLanguagesNoComma-separated BCP 47 language tags

Implementation Reference

  • src/server.ts:85-97 (registration)
    Registration of the 'cities_by_coordinates_largest' tool via server.tool(), with input schema (lat, lon, preferredLanguages), description, and handler that delegates to client.cities.byCoordinatesLargest()
    server.tool(
      'cities_by_coordinates_largest',
      'Find the largest cities near given coordinates, ordered by population.',
      {
        lat: z.number().describe('Latitude'),
        lon: z.number().describe('Longitude'),
        preferredLanguages: z.string().optional().describe('Comma-separated BCP 47 language tags'),
      },
      async (params) => {
        const result = await client.cities.byCoordinatesLargest(params);
        return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
      },
    );
  • Handler function that calls client.cities.byCoordinatesLargest(params) and returns the result as JSON text content
    async (params) => {
      const result = await client.cities.byCoordinatesLargest(params);
      return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
    },
  • Input schema defined using Zod: lat (number), lon (number), preferredLanguages (optional string)
    {
      lat: z.number().describe('Latitude'),
      lon: z.number().describe('Longitude'),
      preferredLanguages: z.string().optional().describe('Comma-separated BCP 47 language tags'),
    },
Behavior3/5

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

Discloses ordering by population, but lacks details on what 'near' means, radius, limit, or return format. With no annotations, description carries full burden but is insufficiently detailed.

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?

Single sentence with no redundant words; purpose is front-loaded and efficient.

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?

With no annotations and no output schema, the description should detail what is returned (e.g., fields, count limit). It fails to provide sufficient context for an AI agent to use correctly.

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?

Schema covers 100% of parameters; description adds no additional meaning beyond the schema definitions for lat, lon, and preferredLanguages.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool finds largest cities near coordinates ordered by population. It distinguishes from sibling 'cities_by_coordinates_closest' by specifying 'largest' vs 'closest'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Description implies usage for finding largest cities by population near coordinates, but provides no explicit guidance on when to use this vs sibling alternatives or when not 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/930m310n/geomelon-mcp'

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