Skip to main content
Glama

get_report

Retrieve financial reports including profit/loss statements, tax summaries, and payment collections from FreshBooks for specified date ranges.

Instructions

Get a financial report. Types: profitloss_entity, taxsummary, payments_collected. Dates as YYYY-MM-DD.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
report_typeYes
start_dateNo
end_dateNo

Implementation Reference

  • The implementation of the get_report tool logic which calls the FreshBooks API.
    async def get_report(report_type: str, params: dict | None = None) -> dict:
        """Fetch an accounting report."""
        account_id, _ = await get_ids()
        url = f"{ACCOUNTING_BASE}/{account_id}/reports/accounting/{report_type}"
        headers = await _get_headers()
        async with httpx.AsyncClient() as client:
            resp = await client.get(url, headers=headers, params=params or {})
            resp.raise_for_status()
            return resp.json()["response"]["result"]
  • The MCP tool registration and handler entry point for 'get_report'.
    @mcp.tool()
    @_handle_errors
    async def get_report(
        report_type: str,
        start_date: str | None = None,
        end_date: str | None = None,
    ) -> str:
        """Get a financial report. Types: profitloss_entity, taxsummary, payments_collected. Dates as YYYY-MM-DD."""
        params = {}
        if start_date:
            params["start_date"] = start_date
        if end_date:
            params["end_date"] = end_date
        result = await client.get_report(report_type, params)
        return _fmt(result)

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/AlexlaGuardia/MCP-Freshbooks'

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