getAvailableMetrics
Retrieve a list of available metrics from the mcp-comexstat server to enable efficient data analysis and monitoring processes.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/ComexstatMCP.ts:81-88 (handler)Handler for the MCP tool 'getAvailableMetrics': calls the client's getAvailableMetrics method and returns the result as JSON stringified text content.this.server.tool("getAvailableMetrics", {}, async () => ({ content: [ { type: "text", text: JSON.stringify(await this.client.getAvailableMetrics()), }, ], }));
- src/ComexstatClient.ts:223-244 (helper)Supporting method that fetches the list of available metrics from the Comexstat API endpoint '/general/metrics'.async getAvailableMetrics(language: string = "pt"): Promise< Array<{ id: string; text: string; depends: null | { filter?: string; flow?: "import" }; }> > { const response = await this.get<{ data: { list: Array<{ id: string; text: string; depends: null | { filter?: string; flow?: "import" }; }>; }; success: boolean; message: string | null; processo_info: any; language: string; }>("/general/metrics", { language }); return response.data.list; }