Skip to main content
Glama

list_reports

Retrieve available reports from the Frappe Framework system, with optional filtering by module and limit settings to focus on specific reporting needs.

Instructions

Get a list of all available reports in the system. Args: module: Filter reports by module (optional) limit: Maximum number of reports to return (default: 50)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
moduleNo

Implementation Reference

  • The main handler function for the 'list_reports' tool. It fetches a list of Frappe reports using the API, optionally filtered by module and limited in count. Formats and returns the results as JSON.
    @mcp.tool() async def list_reports( module: Optional[str] = None, limit: Optional[int] = 50 ) -> str: """ Get a list of all available reports in the system. Args: module: Filter reports by module (optional) limit: Maximum number of reports to return (default: 50) """ try: client = get_client() # Build parameters params = { "fields": json.dumps(["name", "report_type", "module", "is_standard", "ref_doctype"]), "limit": str(limit), "order_by": "name" } if module: params["filters"] = json.dumps({"module": module}) # Get reports list response = await client.get("api/resource/Report", params=params) if "data" in response: reports = response["data"] count = len(reports) filter_text = f" in module '{module}'" if module else "" return f"Found {count} reports{filter_text}:\n\n" + json.dumps(reports, indent=2) else: return json.dumps(response, indent=2) except Exception as error: return _format_error_response(error, "list_reports")
  • src/server.py:42-42 (registration)
    Registers the reports module (containing list_reports tool) with the MCP server instance.
    reports.register_tools(mcp)

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/appliedrelevance/frappe-mcp-server'

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