Skip to main content
Glama
jdlar1

Siigo MCP Server

by jdlar1

siigo_delete_invoice

Remove invoices from the Siigo accounting system by specifying the invoice ID. This tool helps maintain accurate financial records by deleting unwanted or incorrect invoice entries.

Instructions

Delete an invoice

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesInvoice ID

Implementation Reference

  • src/index.ts:409-419 (registration)
    Registration of the 'siigo_delete_invoice' tool in the MCP server's tool list, including description and input schema requiring an invoice ID.
    {
      name: 'siigo_delete_invoice',
      description: 'Delete an invoice',
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'string', description: 'Invoice ID' },
        },
        required: ['id'],
      },
    },
  • MCP server handler function for siigo_delete_invoice tool. Extracts the invoice ID from arguments and calls SiigoClient.deleteInvoice, then formats the result as MCP content response.
    private async handleDeleteInvoice(args: any) {
      const result = await this.siigoClient.deleteInvoice(args.id);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
  • Core handler in SiigoClient that performs the actual DELETE HTTP request to the Siigo API endpoint `/v1/invoices/${id}` using the generic makeRequest method.
    async deleteInvoice(id: string): Promise<SiigoApiResponse<any>> {
      return this.makeRequest<any>('DELETE', `/v1/invoices/${id}`);
    }
  • Generic helper method in SiigoClient for making authenticated HTTP requests to Siigo API, used by deleteInvoice and all other endpoints.
    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}`);
      }
    }
  • src/index.ts:91-92 (registration)
    Switch case in MCP CallToolRequest handler that dispatches 'siigo_delete_invoice' calls to the specific handleDeleteInvoice method.
    case 'siigo_delete_invoice':
      return await this.handleDeleteInvoice(args);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. 'Delete an invoice' implies a destructive mutation, but it doesn't specify consequences (e.g., irreversible action, impact on accounting records), permissions required, or error handling. This is a significant gap for a destructive 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 extremely concise with a single sentence, 'Delete an invoice', which is front-loaded and wastes no words. It efficiently communicates the core action without unnecessary elaboration.

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 destructive nature, no annotations, and no output schema, the description is incomplete. It lacks critical details like success/error responses, side effects, or usage constraints, making it inadequate for safe and effective use by an AI agent.

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 adds no additional meaning beyond this, such as format examples or validation rules. Baseline 3 is appropriate since the schema does the heavy lifting.

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 'Delete an invoice' clearly states the action (delete) and resource (invoice), providing a basic purpose. However, it doesn't distinguish this from sibling deletion tools like siigo_delete_payment_receipt or siigo_delete_product, which follow the same pattern, making it vague in differentiation.

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. For example, it doesn't mention prerequisites like needing an existing invoice ID or when deletion is allowed (e.g., before payment). This leaves the agent without context for appropriate invocation.

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