Skip to main content
Glama

siigo_get_journal

Retrieve a specific accounting journal by its ID from the Siigo accounting system to access detailed financial transaction records.

Instructions

Get a specific journal by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesJournal ID

Implementation Reference

  • Core tool implementation: performs authenticated GET request to Siigo API endpoint `/v1/journals/${id}` using the generic makeRequest helper.
    async getJournal(id: string): Promise<SiigoApiResponse<any>> { return this.makeRequest<any>('GET', `/v1/journals/${id}`); }
  • MCP server wrapper handler for siigo_get_journal: extracts id from args, calls SiigoClient.getJournal, and returns JSON-formatted response.
    private async handleGetJournal(args: any) { const result = await this.siigoClient.getJournal(args.id); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
  • src/index.ts:643-653 (registration)
    Tool registration in getTools(): defines name, description, and input schema (requiring 'id' parameter).
    { name: 'siigo_get_journal', description: 'Get a specific journal by ID', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Journal ID' }, }, required: ['id'], }, },
  • Input schema definition for the tool: object with required 'id' string property.
    inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Journal ID' }, }, required: ['id'], },
  • Generic helper for making authenticated HTTP requests to Siigo API, handling auth, errors, and response parsing.
    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