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
| Name | Required | Description | Default |
|---|---|---|---|
| lat | Yes | Latitude | |
| lon | Yes | Longitude | |
| preferredLanguages | No | Comma-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) }] }; }, ); - src/server.ts:93-96 (handler)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) }] }; }, - src/server.ts:88-92 (schema)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'), },