Skip to main content
Glama
jdlar1

Siigo MCP Server

by jdlar1

siigo_get_invoice

Retrieve a specific invoice from Siigo accounting software by providing its unique ID to access invoice details and records.

Instructions

Get a specific invoice by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesInvoice ID

Implementation Reference

  • The MCP tool handler for 'siigo_get_invoice' that extracts the invoice ID from arguments, calls SiigoClient.getInvoice, and returns the result as a formatted JSON text content block.
    private async handleGetInvoice(args: any) {
      const result = await this.siigoClient.getInvoice(args.id);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • src/index.ts:363-373 (registration)
    Registration of the 'siigo_get_invoice' tool in the MCP server's tool list, including its name, description, and input schema definition.
    {
      name: 'siigo_get_invoice',
      description: 'Get a specific invoice by ID',
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'string', description: 'Invoice ID' },
        },
        required: ['id'],
      },
    },
  • Core implementation of the invoice retrieval in SiigoClient, which uses the shared makeRequest method to perform an authenticated GET request to the Siigo API endpoint `/v1/invoices/{id}`.
    async getInvoice(id: string): Promise<SiigoApiResponse<SiigoInvoice>> {
      return this.makeRequest<SiigoInvoice>('GET', `/v1/invoices/${id}`);
    }
  • TypeScript interface SiigoInvoice defining the structure of an invoice object, used as the generic type for the API response in getInvoice.
    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;
    }
Behavior2/5

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

With no annotations, the description carries full burden but only states the action without behavioral details. It doesn't disclose whether this is a read-only operation, requires authentication, has rate limits, returns structured data or errors, or what happens if the invoice doesn't exist—critical for a retrieval tool.

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, direct sentence with no wasted words, front-loading the core action. It efficiently communicates the tool's purpose without redundancy or unnecessary detail.

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 retrieval tool with no annotations and no output schema, the description is incomplete. It lacks information on return values (e.g., invoice details, error responses), behavioral context (e.g., read-only nature, potential failures), and usage guidelines, leaving gaps for an AI agent to operate effectively.

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%, with the parameter 'id' documented as 'Invoice ID'. The description adds minimal value beyond the schema by implying the ID is used to fetch a specific invoice, but doesn't elaborate on format, validation, or examples. Baseline 3 is appropriate given 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 verb ('Get') and resource ('a specific invoice'), specifying it's by ID. It distinguishes from sibling tools like 'siigo_get_invoices' (plural) by indicating retrieval of a single invoice, but doesn't explicitly contrast with other get operations for different resources.

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. It doesn't mention prerequisites (e.g., needing a valid invoice ID), compare with 'siigo_get_invoices' for listing multiple invoices, or specify error conditions (e.g., invalid ID).

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