Skip to main content
Glama
jdlar1

Siigo MCP Server

by jdlar1

siigo_create_customer

Add new customers to Siigo accounting software by entering identification, contact details, and address information.

Instructions

Create a new customer

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
customerYesCustomer data

Implementation Reference

  • MCP tool handler for siigo_create_customer that extracts arguments, calls SiigoClient.createCustomer, and returns formatted JSON response.
    private async handleCreateCustomer(args: any) {
      const result = await this.siigoClient.createCustomer(args.customer);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Input schema validating the customer object structure for the siigo_create_customer tool.
      inputSchema: {
        type: 'object',
        properties: {
          customer: {
            type: 'object',
            description: 'Customer data',
            properties: {
              person_type: { type: 'string', enum: ['Person', 'Company'] },
              id_type: { type: 'string', description: 'ID type code' },
              identification: { type: 'string', description: 'Customer identification' },
              name: { type: 'array', items: { type: 'string' }, description: 'Customer names' },
              address: {
                type: 'object',
                properties: {
                  address: { type: 'string' },
                  city: {
                    type: 'object',
                    properties: {
                      country_code: { type: 'string' },
                      state_code: { type: 'string' },
                      city_code: { type: 'string' },
                    },
                    required: ['country_code', 'state_code', 'city_code'],
                  },
                },
                required: ['address', 'city'],
              },
              phones: { type: 'array', items: { type: 'object' } },
              contacts: { type: 'array', items: { type: 'object' } },
            },
            required: ['person_type', 'id_type', 'identification', 'name', 'address', 'phones', 'contacts'],
          },
        },
        required: ['customer'],
      },
    },
    {
  • src/index.ts:77-78 (registration)
    Registration and dispatch point in the tool switch statement within CallToolRequest handler.
    case 'siigo_create_customer':
      return await this.handleCreateCustomer(args);
  • SiigoClient helper method implementing the core API call to create a customer via POST to /v1/customers.
    async createCustomer(customer: SiigoCustomer): Promise<SiigoApiResponse<SiigoCustomer>> {
      return this.makeRequest<SiigoCustomer>('POST', '/v1/customers', customer);
    }

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