UNPKG

xero-mcp

Version:

A Model Context Protocol server allows Clients to interact with Xero

21 lines (20 loc) 809 B
import { XeroClientSession } from "../../XeroApiClient.js"; export const GetBalanceSheetTool = { requestSchema: { name: "get_balance_sheet", description: "Returns a balance sheet for the end of the month of the specified date. It also returns the value at the end of the same month for the previous year.", inputSchema: { type: "object", properties: {} }, }, requestHandler: async () => { const response = await XeroClientSession.xeroClient.accountingApi.getReportBalanceSheet(XeroClientSession.activeTenantId()); const reports = response.body.reports || []; return { content: [ { type: "text", text: JSON.stringify(reports), }, ], }; }, };