Skip to main content
Glama
jdlar1

Siigo MCP Server

by jdlar1

siigo_get_invoices

Retrieve invoice lists from Siigo accounting software with date range and pagination filters for financial management.

Instructions

Get list of invoices from Siigo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number
page_sizeNoNumber of items per page
created_startNoStart date filter (YYYY-MM-DD)
created_endNoEnd date filter (YYYY-MM-DD)

Implementation Reference

  • Core handler function in SiigoClient that performs the authenticated GET request to the Siigo /v1/invoices API endpoint.
    async getInvoices(params?: { page?: number; page_size?: number; created_start?: string; created_end?: string }): Promise<SiigoApiResponse<SiigoInvoice>> {
      return this.makeRequest<SiigoInvoice>('GET', '/v1/invoices', undefined, params);
  • MCP server wrapper handler that calls SiigoClient.getInvoices and returns formatted JSON response.
    private async handleGetInvoices(args: any) {
      const result = await this.siigoClient.getInvoices(args);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
  • src/index.ts:350-362 (registration)
    Tool registration in getTools() method, defining name, description, and input schema.
    {
      name: 'siigo_get_invoices',
      description: 'Get list of invoices from Siigo',
      inputSchema: {
        type: 'object',
        properties: {
          page: { type: 'number', description: 'Page number' },
          page_size: { type: 'number', description: 'Number of items per page' },
          created_start: { type: 'string', description: 'Start date filter (YYYY-MM-DD)' },
          created_end: { type: 'string', description: 'End date filter (YYYY-MM-DD)' },
        },
      },
    },
  • TypeScript interface defining the structure of a Siigo invoice (output schema).
    export interface SiigoInvoice {
      id?: string;
      document: {
        id: number;
        number?: number;
      };
      date: string;
      customer: {
        person_type?: string;
        id_type?: string;
        identification: string;
        branch_office?: number;
        name?: string[];
        address?: any;
        phones?: any[];
        contacts?: any[];
      };
      cost_center?: number;
      currency?: {
        code: string;
        exchange_rate: number;
      };
      seller: number;
      observations?: string;
      items: Array<{
        code: string;
        description?: string;
        quantity: number;
        price: number;
        discount?: number;
        taxes?: Array<{ id: number }>;
      }>;
      payments: Array<{
        id: number;
        value: number;
        due_date?: string;
      }>;
      stamp?: {
        send: boolean;
      };
      mail?: {
        send: boolean;
      };
      global_discounts?: Array<{
        id: number;
        percentage?: number;
        value?: number;
      }>;
      additional_fields?: any;
    }
  • Helper method that handles authentication, makes the Axios HTTP request, and processes responses/errors for all API calls.
    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?

With no annotations provided, the description carries full burden but offers minimal behavioral information. It doesn't disclose whether this is a read-only operation, what authentication is needed, whether there are rate limits, what the return format looks like, or how pagination works. The description only states what the tool does at a high level without behavioral details.

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 extremely concise at just 5 words, front-loading the essential purpose with zero wasted words. Every word earns its place, making it easy to parse quickly while still communicating the core function.

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

Completeness2/5

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

For a list retrieval tool with 4 parameters and no output schema, the description is insufficient. It doesn't explain what data is returned, how results are structured, whether there are default behaviors for missing parameters, or how to interpret the pagination parameters. With no annotations and no output schema, users need more context about what to expect from this operation.

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?

Schema description coverage is 100%, so the schema already fully documents all 4 parameters. The description adds no additional parameter information beyond what's in the schema - it doesn't explain how parameters interact, provide examples, or clarify semantics. This meets the baseline 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 list') and resource ('invoices from Siigo'), making the purpose immediately understandable. It distinguishes from siblings like siigo_get_invoice (singular) by indicating it retrieves multiple invoices, but doesn't explicitly differentiate from other list tools like siigo_get_credit_notes or siigo_get_payment_receipts beyond the resource type.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention when this list tool should be used instead of siigo_get_invoice (for a single invoice) or how it differs from other list tools like siigo_get_credit_notes. There's no context about prerequisites, filtering capabilities, or typical use cases.

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