Skip to main content
Glama
jdlar1

Siigo MCP Server

by jdlar1

siigo_create_product

Create new products in Siigo accounting software by providing product code, name, account group, and other essential details for inventory and financial management.

Instructions

Create a new product

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
productYesProduct data

Implementation Reference

  • MCP handler function for siigo_create_product tool: extracts product from args, calls SiigoClient.createProduct, and returns formatted JSON response.
    private async handleCreateProduct(args: any) {
      const result = await this.siigoClient.createProduct(args.product);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Core handler in SiigoClient: makes authenticated POST request to Siigo API /v1/products endpoint to create the product.
    async createProduct(product: SiigoProduct): Promise<SiigoApiResponse<SiigoProduct>> {
      return this.makeRequest<SiigoProduct>('POST', '/v1/products', product);
    }
  • src/index.ts:65-66 (registration)
    Switch case registration in CallToolRequestSchema handler that routes siigo_create_product calls to the specific handler.
    case 'siigo_create_product':
      return await this.handleCreateProduct(args);
  • Tool definition in getTools(): registers siigo_create_product with description and detailed input schema matching SiigoProduct.
    {
      name: 'siigo_create_product',
      description: 'Create a new product',
      inputSchema: {
        type: 'object',
        properties: {
          product: {
            type: 'object',
            description: 'Product data',
            properties: {
              code: { type: 'string', description: 'Product code' },
              name: { type: 'string', description: 'Product name' },
              account_group: { type: 'number', description: 'Account group ID' },
              type: { type: 'string', enum: ['Product', 'Service', 'ConsumerGood'] },
              stock_control: { type: 'boolean' },
              active: { type: 'boolean' },
              tax_classification: { type: 'string', enum: ['Taxed', 'Exempt', 'Excluded'] },
              tax_included: { type: 'boolean' },
              unit: { type: 'string' },
              unit_label: { type: 'string' },
              reference: { type: 'string' },
              description: { type: 'string' },
            },
            required: ['code', 'name', 'account_group'],
          },
        },
        required: ['product'],
      },
    },
  • TypeScript interface SiigoProduct defining the structure for product data used in createProduct.
    export interface SiigoProduct {
      id?: string;
      code: string;
      name: string;
      account_group: number;
      type?: 'Product' | 'Service' | 'ConsumerGood';
      stock_control?: boolean;
      active?: boolean;
      tax_classification?: 'Taxed' | 'Exempt' | 'Excluded';
      tax_included?: boolean;
      tax_consumption_value?: number;
      taxes?: Array<{
        id: number;
        milliliters?: number;
        rate?: number;
      }>;
      prices?: Array<{
        currency_code: string;
        price_list: Array<{
          position: number;
          value: number;
        }>;
      }>;
      unit?: string;
      unit_label?: string;
      reference?: string;
      description?: string;
      additional_fields?: {
        barcode?: string;
        brand?: string;
        tariff?: string;
        model?: string;
      };
    }

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