siigo_get_cities
Retrieve the complete catalog of Colombian cities for accurate location data in Siigo accounting software integration.
Instructions
Get cities catalog
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:717-721 (registration)Registration of the 'siigo_get_cities' tool in the getTools() method, including name, description, and empty input schema.{ name: 'siigo_get_cities', description: 'Get cities catalog', inputSchema: { type: 'object', properties: {} }, },
- src/index.ts:1111-1114 (handler)MCP server handler for 'siigo_get_cities' tool. Delegates to SiigoClient.getCities() and returns the result as formatted JSON text content.private async handleGetCities(args: any) { const result = await this.siigoClient.getCities(); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- src/siigo-client.ts:242-244 (handler)Core tool implementation in SiigoClient. Performs an authenticated GET request to the Siigo API '/v1/cities' endpoint to fetch the cities catalog.async getCities(): Promise<SiigoApiResponse<any>> { return this.makeRequest<any>('GET', '/v1/cities'); }
- src/siigo-client.ts:41-59 (helper)Generic helper method used by all Siigo API calls, including getCities. Handles authentication, makes the axios request, and processes responses or errors.private async makeRequest<T>(method: string, endpoint: string, data?: any, params?: any): Promise<SiigoApiResponse<T>> { await this.authenticate(); try { const response: AxiosResponse<SiigoApiResponse<T>> = await this.httpClient.request({ method, url: endpoint, data, params, }); return response.data; } catch (error: any) { if (error.response?.data) { return error.response.data; } throw new Error(`API request failed: ${error.message}`); } }