siigo_get_users
Retrieve the complete catalog of users from the Siigo accounting system to manage user access and permissions.
Instructions
Get users catalog
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:697-701 (registration)Tool registration entry defining the name, description, and input schema (no parameters required).{ name: 'siigo_get_users', description: 'Get users catalog', inputSchema: { type: 'object', properties: {} }, },
- src/index.ts:1091-1094 (handler)MCP tool handler that invokes SiigoClient.getUsers() and formats the result as MCP response content.private async handleGetUsers(args: any) { const result = await this.siigoClient.getUsers(); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- src/siigo-client.ts:226-228 (handler)SiigoClient method implementing the API call to retrieve the users catalog via authenticated GET to /v1/users.async getUsers(): Promise<SiigoApiResponse<any>> { return this.makeRequest<any>('GET', '/v1/users'); }
- src/siigo-client.ts:41-59 (helper)Shared helper method for making authenticated API requests to Siigo endpoints.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}`); } }