Skip to main content
Glama

siigo_get_credit_note

Retrieve a specific credit note by its unique ID from the Siigo accounting system to access transaction details and documentation.

Instructions

Get a specific credit note by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesCredit note ID

Implementation Reference

  • MCP server handler function for the 'siigo_get_credit_note' tool. It extracts the ID from arguments, calls SiigoClient.getCreditNote, and formats the result as MCP content response.
    private async handleGetCreditNote(args: any) { const result = await this.siigoClient.getCreditNote(args.id); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
  • Core tool execution logic in SiigoClient: sends authenticated GET request to Siigo API endpoint `/v1/credit-notes/${id}` via makeRequest helper.
    async getCreditNote(id: string): Promise<SiigoApiResponse<any>> { return this.makeRequest<any>('GET', `/v1/credit-notes/${id}`); }
  • src/index.ts:457-467 (registration)
    Tool registration in the getTools() method, including name, description, and input schema definition.
    { 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'], }, },
  • Input schema definition for the tool, specifying required 'id' parameter as string.
    inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Credit note ID' }, }, required: ['id'], },
  • Helper method used by all API calls, including getCreditNote: handles authentication, makes Axios request, and processes responses/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