getCities
Retrieve city data for analysis and integration with trade statistics using the MCP server mcp-comexstat.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/ComexstatMCP.ts:347-354 (handler)MCP tool registration and handler for 'getCities'. This inline async function executes the tool by calling ComexstatClient.getCities() and returning the JSON-stringified result as text content.this.server.tool("getCities", {}, async () => ({ content: [ { type: "text", text: JSON.stringify(await this.client.getCities()), }, ], }));
- src/ComexstatClient.ts:517-525 (helper)Implementation of getCities in ComexstatClient, which fetches the list of Brazilian cities from the '/tables/cities' API endpoint using the internal get method.async getCities(): Promise<{ data: Array<{ id: string; text: string; noMunMin: string; }>; }> { return this.get("/tables/cities"); }
- src/ComexstatClient.ts:518-523 (schema)TypeScript type definition for the output of getCities, defining the structure of the cities data returned from the API.data: Array<{ id: string; text: string; noMunMin: string; }>; }> {
- src/ComexstatMCP.ts:347-354 (registration)Registration of the 'getCities' tool on the MCP server with empty input schema.this.server.tool("getCities", {}, async () => ({ content: [ { type: "text", text: JSON.stringify(await this.client.getCities()), }, ], }));