Skip to main content
Glama

get_expense_report

Retrieve specific expense report details by ID from Autotask PSA to track costs, review expenses, and manage financial records.

Instructions

Get a specific expense report by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reportIdYesThe expense report ID to retrieve

Implementation Reference

  • Tool registration including name, description, and input schema definition in listTools() method
    { name: 'get_expense_report', description: 'Get a specific expense report by ID', inputSchema: { type: 'object', properties: { reportId: { type: 'number', description: 'The expense report ID to retrieve' } }, required: ['reportId'] } },
  • Handler logic in callTool() switch statement that delegates to autotaskService.getExpenseReport()
    case 'get_expense_report': result = await this.autotaskService.getExpenseReport(args.reportId); message = `Expense report retrieved successfully`; break;
  • Core service method that performs the actual API call to retrieve the expense report using the autotask-node client
    async getExpenseReport(id: number): Promise<AutotaskExpenseReport | null> { const client = await this.ensureClient(); try { this.logger.debug(`Getting expense report with ID: ${id}`); const result = await client.expenses.get(id); return result.data as unknown as AutotaskExpenseReport || null; } catch (error) { this.logger.error(`Failed to get expense report ${id}:`, error); throw error; } }

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/asachs01/autotask-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server