get_city
Retrieve comprehensive city details by providing its UUID. Access name, country, region, and multilingual data.
Instructions
Get full details for a single city by its UUID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | City UUID |
Implementation Reference
- src/server.ts:45-48 (handler)The handler function for the 'get_city' tool. It receives a city UUID, calls client.cities.get(id), and returns the result as formatted JSON text.
async ({ id }) => { const result = await client.cities.get(id); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }, - src/server.ts:44-44 (schema)Input schema for the 'get_city' tool: a single required string parameter 'id' representing the city UUID.
{ id: z.string().describe('City UUID') }, - src/server.ts:41-49 (registration)Registration of the 'get_city' tool via server.tool() with its name, description, input schema, and handler function.
server.tool( 'get_city', 'Get full details for a single city by its UUID.', { id: z.string().describe('City UUID') }, async ({ id }) => { const result = await client.cities.get(id); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }, );