Skip to main content
Glama

siigo_get_customers

Retrieve customer lists from Siigo accounting software with pagination and filtering options to manage client data efficiently.

Instructions

Get list of customers from Siigo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number
page_sizeNoNumber of items per page
typeNoCustomer type filter

Implementation Reference

  • Core handler function that performs the API call to retrieve customers from Siigo (/v1/customers) using the makeRequest helper.
    async getCustomers(params?: { page?: number; page_size?: number; type?: string }): Promise<SiigoApiResponse<SiigoCustomer>> { return this.makeRequest<SiigoCustomer>('GET', '/v1/customers', undefined, params); }
  • MCP server wrapper handler that calls SiigoClient.getCustomers and formats the response.
    private async handleGetCustomers(args: any) { const result = await this.siigoClient.getCustomers(args); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • Tool schema definition including input parameters for pagination and filtering.
    { name: 'siigo_get_customers', description: 'Get list of customers from Siigo', inputSchema: { type: 'object', properties: { page: { type: 'number', description: 'Page number' }, page_size: { type: 'number', description: 'Number of items per page' }, type: { type: 'string', description: 'Customer type filter' }, }, }, },
  • src/index.ts:73-74 (registration)
    Dispatch case in the main CallToolRequestSchema handler that routes to the tool handler.
    case 'siigo_get_customers': return await this.handleGetCustomers(args);
  • Helper method that handles authentication, makes the Axios request to Siigo API, and processes responses/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}`); } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jdlar1/siigo-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server