Skip to main content
Glama

siigo_create_credit_note

Generate credit notes in Siigo accounting software to document refunds, returns, or billing adjustments for Colombian businesses.

Instructions

Create a new credit note

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
creditNoteYesCredit note data

Implementation Reference

  • Core tool implementation: makes authenticated POST request to Siigo API /v1/credit-notes endpoint to create a credit note.
    async createCreditNote(creditNote: any): Promise<SiigoApiResponse<any>> { return this.makeRequest<any>('POST', '/v1/credit-notes', creditNote); }
  • MCP server handler wrapper: extracts args.creditNote, calls SiigoClient.createCreditNote, and returns JSON-formatted response.
    private async handleCreateCreditNote(args: any) { const result = await this.siigoClient.createCreditNote(args.creditNote); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
  • src/index.ts:468-478 (registration)
    Tool registration in getTools(): defines name, description, and input schema for MCP ListTools.
    { name: 'siigo_create_credit_note', description: 'Create a new credit note', inputSchema: { type: 'object', properties: { creditNote: { type: 'object', description: 'Credit note data' }, }, required: ['creditNote'], }, },
  • Input schema validation for the tool arguments.
    inputSchema: { type: 'object', properties: { creditNote: { type: 'object', description: 'Credit note data' }, }, required: ['creditNote'], },
  • Helper method used by all API calls: 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