getAvailableFilters
Retrieve available data filters for analysis and reporting within the mcp-comexstat server to streamline query customization.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/ComexstatClient.ts:156-173 (handler)The core handler function `getAvailableFilters` in ComexstatClient that fetches available filters from the Comexstat API endpoint '/general/filters' using an axios GET request with optional language parameter.async getAvailableFilters( language: string = "pt" ): Promise<Array<{ filter: string; text: string }>> { const response = await this.get<{ data: { "0": string; list: Array<{ filter: string; text: string; }>; }; success: boolean; message: string | null; processo_info: any; language: string; }>("/general/filters", { language }); return response.data.list; }
- src/ComexstatMCP.ts:42-49 (registration)Registration of the 'getAvailableFilters' tool in the MCP server using `server.tool`, which takes no input parameters (empty schema) and returns the JSON-stringified result from the client handler as text content.this.server.tool("getAvailableFilters", {}, async () => ({ content: [ { type: "text", text: JSON.stringify(await this.client.getAvailableFilters()), }, ], }));