siigo_get_account_groups
Retrieve the account groups catalog from Siigo accounting software to organize and categorize financial accounts for Colombian businesses.
Instructions
Get account groups catalog
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/siigo-client.ts:238-240 (handler)Core implementation of the tool: makes authenticated GET request to Siigo API endpoint /v1/account-groups to retrieve account groups.async getAccountGroups(): Promise<SiigoApiResponse<any>> { return this.makeRequest<any>('GET', '/v1/account-groups'); }
- src/index.ts:1106-1109 (handler)MCP server wrapper handler that calls the SiigoClient method and formats the response as MCP content.private async handleGetAccountGroups(args: any) { const result = await this.siigoClient.getAccountGroups(); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- src/index.ts:712-716 (registration)Tool registration in the list returned by ListToolsRequestHandler, including name, description, and empty input schema.{ name: 'siigo_get_account_groups', description: 'Get account groups catalog', inputSchema: { type: 'object', properties: {} }, },
- src/index.ts:161-162 (handler)Dispatch case in CallToolRequestHandler switch that routes the tool call to the specific handler.case 'siigo_get_account_groups': return await this.handleGetAccountGroups(args);
- src/siigo-client.ts:41-59 (helper)Generic helper method used by all API calls, handles authentication and makes the axios request.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}`); } }