Skip to main content
Glama
jdlar1

Siigo MCP Server

by jdlar1

siigo_get_invoice_pdf

Retrieve PDF invoices from Siigo accounting software by providing the invoice ID to access and download financial documents.

Instructions

Get invoice PDF

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesInvoice ID

Implementation Reference

  • Core handler function that performs the authenticated GET request to Siigo API to fetch the invoice PDF as base64.
    async getInvoicePdf(id: string): Promise<SiigoApiResponse<{ base64: string }>> {
      return this.makeRequest<{ base64: string }>('GET', `/v1/invoices/${id}/pdf`);
    }
  • MCP server wrapper handler that calls SiigoClient.getInvoicePdf and formats the response for MCP.
    private async handleGetInvoicePdf(args: any) {
      const result = await this.siigoClient.getInvoicePdf(args.id);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
  • src/index.ts:420-430 (registration)
    Tool registration in MCP server's getTools() method, including name, description, and input schema.
    {
      name: 'siigo_get_invoice_pdf',
      description: 'Get invoice PDF',
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'string', description: 'Invoice ID' },
        },
        required: ['id'],
      },
    },
  • Dispatcher switch case that routes the tool call to the specific handler.
    case 'siigo_get_invoice_pdf':
      return await this.handleGetInvoicePdf(args);
  • Helper method used by all API calls, including authentication and axios request handling.
    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}`);
      }
    }
Behavior1/5

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

No annotations are provided, so the description must fully disclose behavioral traits, but it offers none. It does not indicate whether this is a read-only operation, if it requires authentication, potential rate limits, error conditions (e.g., invalid ID handling), or the format of the PDF output (e.g., binary data, download link). The description fails to add any context beyond the basic action, leaving the agent unaware of how the tool behaves.

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 with just three words, making it front-loaded and free of unnecessary details. Every word ('Get', 'invoice', 'PDF') contributes directly to the tool's core function, though it lacks depth. This brevity is efficient, but it borders on under-specification rather than optimal clarity.

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?

Given the tool's complexity (a single-parameter retrieval operation), no annotations, and no output schema, the description is incomplete. It does not explain what the tool returns (e.g., a PDF file, error messages), behavioral aspects, or how it fits among siblings. For a tool that likely involves data retrieval and formatting, more context is needed to guide effective use, making this description insufficient.

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 documented as 'Invoice ID'. The description does not add any semantic details beyond this, such as ID format examples or validation rules. Since the schema already provides adequate parameter information, the baseline score of 3 is appropriate, as the description neither compensates for gaps nor enhances understanding.

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

Purpose2/5

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

The description 'Get invoice PDF' is a tautology that restates the tool name 'siigo_get_invoice_pdf' without adding meaningful specificity. It identifies the resource (invoice PDF) but lacks details about what 'get' entails (e.g., download, retrieve, generate) or how it differs from sibling tools like 'siigo_get_invoice' or 'siigo_get_invoices', which may handle non-PDF data. This minimal phrasing fails to clarify the tool's distinct purpose beyond its name.

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

Usage Guidelines1/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 does not mention prerequisites (e.g., needing an existing invoice ID), exclusions, or comparisons to siblings like 'siigo_get_invoice' (which might return structured data) or 'siigo_send_invoice_email' (which involves email delivery). Without any usage context, an agent cannot make informed decisions about tool selection.

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