Skip to main content
Glama
jdlar1

Siigo MCP Server

by jdlar1

siigo_send_invoice_email

Send invoice emails from Siigo accounting software to recipients and CC contacts using invoice ID and email addresses.

Instructions

Send invoice by email

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesInvoice ID
mail_toYesRecipient email
copy_toNoCC emails (semicolon separated)

Implementation Reference

  • Core implementation of the tool: sends POST request to Siigo API endpoint /v1/invoices/{id}/mail with email data.
    async sendInvoiceByEmail(id: string, emailData: { mail_to: string; copy_to?: string }): Promise<SiigoApiResponse<any>> {
      return this.makeRequest<any>('POST', `/v1/invoices/${id}/mail`, emailData);
    }
  • MCP server handler method that parses tool arguments and calls SiigoClient.sendInvoiceByEmail, returning JSON response.
    private async handleSendInvoiceEmail(args: any) {
      const { id, mail_to, copy_to } = args;
      const result = await this.siigoClient.sendInvoiceByEmail(id, { mail_to, copy_to });
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • src/index.ts:431-443 (registration)
    Tool registration in ListTools response, including name, description, and input schema.
    {
      name: 'siigo_send_invoice_email',
      description: 'Send invoice by email',
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'string', description: 'Invoice ID' },
          mail_to: { type: 'string', description: 'Recipient email' },
          copy_to: { type: 'string', description: 'CC emails (semicolon separated)' },
        },
        required: ['id', 'mail_to'],
      },
    },
  • Dispatch case in CallToolRequest handler switch statement that routes to the specific tool handler.
    case 'siigo_send_invoice_email':
      return await this.handleSendInvoiceEmail(args);
  • Helper method used by all API calls, including sendInvoiceByEmail, to handle authentication and make HTTP requests.
    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 full burden. 'Send invoice by email' implies a write operation that transmits data externally, but it doesn't disclose behavioral traits like whether this action is reversible, what permissions are required, how email delivery is confirmed, or potential side effects (e.g., updating invoice status). This leaves significant gaps for an agent to understand the tool's behavior.

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 three words, front-loaded with the core action, and contains no wasted words. Every element ('Send', 'invoice', 'by email') contributes directly to understanding the tool's 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?

Given the complexity of an email-sending operation with no annotations and no output schema, the description is incomplete. It doesn't address what happens after sending (e.g., success/failure indicators, return values, or side effects), which is critical for an agent to use this tool effectively in a workflow.

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 documents all three parameters (id, mail_to, copy_to) with clear descriptions. The description adds no additional meaning beyond what's in the schema, such as explaining the relationship between parameters or usage examples. This meets the baseline of 3 when schema coverage is high.

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

Purpose3/5

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

The description 'Send invoice by email' clearly states the action (send) and resource (invoice) with the delivery method (by email), which is specific enough to understand the basic function. However, it doesn't differentiate this tool from potential alternatives like 'siigo_get_invoice_pdf' or explain what 'send' entails beyond the obvious email transmission.

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. With siblings like 'siigo_get_invoice_pdf' (which might retrieve an invoice for manual sending) and 'siigo_update_invoice' (which might modify invoice status), there's no indication of prerequisites, timing, or distinctions between these operations.

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