Skip to main content
Glama
PaddleHQ
by PaddleHQ

get_report

Retrieve report details from Paddle Billing by ID to check status and obtain information for CSV download.

Instructions

This tool will retrieve a report entity from Paddle by its ID. It only contains information about the report, like the ID, status, and the date it was created.

Use this tool to check the status of a generated report, or to get the ID of a report, to then use with the get_report_csv tool to download the CSV.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reportIdYesPaddle ID of the report.

Implementation Reference

  • The main handler function that implements the core logic of the 'get_report' tool. It takes a Paddle instance and parameters, extracts the reportId, calls paddle.reports.get(reportId), and returns the report or error.
    export const getReport = async (paddle: Paddle, params: z.infer<typeof Parameters.getReportParameters>) => { try { const { reportId } = params; const report = await paddle.reports.get(reportId); return report; } catch (error) { return error; } };
  • The tool definition object which serves as the schema for the 'get_report' tool, including method name, human-readable name, description prompt reference, Zod parameters schema reference, and required permissions (read/get on reports).
    method: "get_report", name: "Get a report", description: prompts.getReportPrompt, parameters: params.getReportParameters, actions: { reports: { read: true, get: true, }, }, },
  • src/api.ts:87-87 (registration)
    Registration of the 'get_report' handler in the toolMap used by PaddleAPI to map tool methods to their handler functions.
    [TOOL_METHODS.GET_REPORT]: funcs.getReport,
  • src/toolkit.ts:69-86 (registration)
    Dynamic registration of all tools, including 'get_report', in the MCP server using the tool definitions from tools.ts, mapping to PaddleAPI.run which uses the api.ts toolMap.
    this.tool( tool.method, tool.description, tool.parameters.shape, annotations, async (arg: unknown, _extra: unknown) => { const result = await this._paddle.run(tool.method, arg); return { content: [ { type: "text" as const, text: String(result), }, ], }; }, );
  • Constant definition mapping GET_REPORT to the string 'get_report' used in toolMap keys and method names.
    GET_REPORT: "get_report",

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/PaddleHQ/paddle-mcp-server'

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