getStates
Retrieve and analyze state-related data for streamlined processing and reporting using this MCP server tool.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/ComexstatMCP.ts:321-328 (registration)Registers the 'getStates' MCP tool with empty input schema. The inline handler fetches states using the client and returns JSON-formatted response as text content.this.server.tool("getStates", {}, async () => ({ content: [ { type: "text", text: JSON.stringify(await this.client.getStates()), }, ], }));
- src/ComexstatMCP.ts:322-328 (handler)Inline handler function for the getStates tool that executes the tool logic by calling client.getStates() and formatting as JSON text.content: [ { type: "text", text: JSON.stringify(await this.client.getStates()), }, ], }));
- src/ComexstatClient.ts:479-491 (helper)Core implementation of getStates that queries the Comexstat API endpoint /tables/uf and returns typed response with list of states (UF).async getStates(): Promise<{ data: Array<{ text: string; id: string; uf: string; }>; success: boolean; message: string | null; processo_info: any; language: string; }> { return this.get("/tables/uf"); }
- src/ComexstatClient.ts:480-489 (schema)TypeScript type definition for the output schema of getStates, defining the structure of the states list response.data: Array<{ text: string; id: string; uf: string; }>; success: boolean; message: string | null; processo_info: any; language: string; }> {