Skip to main content
Glama
jdlar1

Siigo MCP Server

by jdlar1

siigo_get_credit_note

Retrieve a specific credit note from Siigo accounting software using its unique ID to access transaction details and documentation.

Instructions

Get a specific credit note by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesCredit note ID

Implementation Reference

  • The primary MCP tool handler function. It extracts the credit note ID from input arguments, calls the SiigoClient's getCreditNote method, and formats the result as a JSON text response.
    private async handleGetCreditNote(args: any) {
      const result = await this.siigoClient.getCreditNote(args.id);
      return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
    }
  • Input schema for the tool, specifying that a string 'id' parameter is required.
    inputSchema: {
      type: 'object',
      properties: {
        id: { type: 'string', description: 'Credit note ID' },
      },
      required: ['id'],
    },
  • src/index.ts:457-467 (registration)
    Tool registration in the getTools() method's return array, defining name, description, and input schema.
    {
      name: 'siigo_get_credit_note',
      description: 'Get a specific credit note by ID',
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'string', description: 'Credit note ID' },
        },
        required: ['id'],
      },
    },
  • SiigoClient helper method that performs the authenticated GET API request to fetch the credit note by ID from Siigo's /v1/credit-notes/{id} endpoint.
    async getCreditNote(id: string): Promise<SiigoApiResponse<any>> {
      return this.makeRequest<any>('GET', `/v1/credit-notes/${id}`);
    }
  • Core HTTP request helper in SiigoClient that handles authentication, makes Axios requests to Siigo API, and processes responses or errors.
    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 insight. It implies a read-only operation ('Get'), but doesn't disclose authentication requirements, rate limits, error responses, or data format (e.g., JSON structure). For a tool with zero annotation coverage, this is inadequate for safe and effective use.

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 zero wasted words. It front-loads the core purpose ('Get a specific credit note') and efficiently specifies the key constraint ('by ID'). Every word earns its place, making it easy to parse quickly.

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 tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what data is returned (e.g., credit note fields), error handling, or operational constraints. Given the complexity of financial data retrieval, more context is needed for reliable agent use.

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 single parameter 'id' documented as 'Credit note ID'. The description adds no additional meaning beyond this, such as ID format examples or validation rules. Given the high schema coverage, a baseline score of 3 is appropriate as the schema handles the heavy lifting.

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') and resource ('a specific credit note by ID'), making the purpose immediately understandable. It distinguishes from sibling tools like 'siigo_get_credit_notes' (plural) by specifying retrieval of a single entity. However, it doesn't explicitly contrast with other get operations (e.g., 'siigo_get_invoice'), leaving some ambiguity in sibling 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. The description doesn't mention prerequisites (e.g., needing a valid credit note ID), compare it to 'siigo_get_credit_notes' for listing multiple notes, or specify error conditions (e.g., handling invalid IDs). This leaves the agent without contextual usage instructions.

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