getLastUpdate
Retrieve the most recent update timestamp from the mcp-comexstat server to track data synchronization and ensure accurate, timely information.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/ComexstatClient.ts:121-134 (handler)The core handler function that implements the logic for getLastUpdate by calling the Comexstat API endpoint '/general/dates/updated' and returning the updated date.async getLastUpdate(): Promise<string> { const response = await this.get<{ data: { updated: string; year: string; monthNumber: string; }; success: boolean; message: string | null; processo_info: any; language: string; }>("/general/dates/updated"); return response.data.updated; }
- src/ComexstatMCP.ts:27-29 (registration)MCP tool registration for 'getLastUpdate' with empty input schema, delegating execution to ComexstatClient.getLastUpdate().this.server.tool("getLastUpdate", {}, async () => ({ content: [{ type: "text", text: await this.client.getLastUpdate() }], }));