Skip to main content
Glama
jdlar1

Siigo MCP Server

by jdlar1

siigo_get_customer

Retrieve customer details from Siigo accounting software using a customer ID to access specific client information.

Instructions

Get a specific customer by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesCustomer ID

Implementation Reference

  • MCP tool handler for 'siigo_get_customer' that extracts the customer ID from args, calls SiigoClient.getCustomer, and returns the JSON-stringified result as text content.
    private async handleGetCustomer(args: any) {
      const result = await this.siigoClient.getCustomer(args.id);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Core handler in SiigoClient that performs the authenticated GET request to the Siigo API endpoint `/v1/customers/{id}` using the generic makeRequest method.
    async getCustomer(id: string): Promise<SiigoApiResponse<SiigoCustomer>> {
      return this.makeRequest<SiigoCustomer>('GET', `/v1/customers/${id}`);
    }
  • src/index.ts:286-296 (registration)
    Tool registration in getTools() method, including name, description, and input schema for validation.
    {
      name: 'siigo_get_customer',
      description: 'Get a specific customer by ID',
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'string', description: 'Customer ID' },
        },
        required: ['id'],
      },
    },
  • TypeScript interface defining the structure of a Siigo customer object, used for type safety in the getCustomer response.
    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;
      };
    }
  • Generic helper method that handles authentication, makes the Axios HTTP request to Siigo API, and processes responses or errors uniformly.
    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}`);
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Get' suggests a read-only operation, but the description doesn't confirm this or provide details on permissions, error handling, or response format. It lacks critical behavioral context for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It's front-loaded and wastes no space, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (single parameter, no output schema, no annotations), the description is minimally adequate. However, it lacks details on what the tool returns (e.g., customer object structure) and behavioral aspects, leaving gaps that could hinder an agent's understanding in a no-annotation context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'id' parameter clearly documented as 'Customer ID'. The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline score of 3 for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('a specific customer by ID'), which distinguishes it from sibling tools like 'siigo_get_customers' (plural) that likely retrieve multiple customers. However, it doesn't explicitly mention what 'Get' entails (e.g., retrieving customer details), making it slightly less specific than a perfect 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose this over 'siigo_get_customers' for multiple customers, or how it relates to other customer-related tools like 'siigo_create_customer' or 'siigo_update_customer'. Usage context is implied but not stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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