Skip to main content
Glama

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}`); } }

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