Skip to main content
Glama

siigo_update_customer

Modify existing customer information in the Siigo accounting system by providing the customer ID and updated data fields.

Instructions

Update an existing customer

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
customerYesCustomer data to update
idYesCustomer ID

Implementation Reference

  • MCP tool handler function that executes the tool logic by calling SiigoClient.updateCustomer and formatting the response as MCP content.
    private async handleUpdateCustomer(args: any) { const result = await this.siigoClient.updateCustomer(args.id, args.customer); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • Core handler in SiigoClient that performs the actual API PUT request to update the customer in Siigo.
    async updateCustomer(id: string, customer: Partial<SiigoCustomer>): Promise<SiigoApiResponse<SiigoCustomer>> { return this.makeRequest<SiigoCustomer>('PUT', `/v1/customers/${id}`, customer);
  • src/index.ts:336-347 (registration)
    Registration of the siigo_update_customer tool in the MCP server's getTools() method, defining name, description, and input schema.
    { name: 'siigo_update_customer', description: 'Update an existing customer', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Customer ID' }, customer: { type: 'object', description: 'Customer data to update' }, }, required: ['id', 'customer'], }, },
  • TypeScript interface defining the structure of customer data used for update operations.
    export interface SiigoCustomer { id?: string; type?: 'Customer' | 'Supplier' | 'Other'; person_type: 'Person' | 'Company'; id_type: string; identification: string; check_digit?: string; name: string[]; commercial_name?: string; branch_office?: number; active?: boolean; vat_responsible?: boolean; fiscal_responsibilities?: Array<{ code: string }>; address: { address: string; city: { country_code: string; state_code: string; city_code: string; }; postal_code?: string; }; phones: Array<{ indicative?: string; number: string; extension?: string; }>; contacts: Array<{ first_name: string; last_name: string; email: string; phone?: { indicative?: string; number?: string; extension?: string; }; }>; comments?: string; related_users?: { seller_id?: number; collector_id?: number; }; }

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