Skip to main content
Glama

test_hardcoded_filter

Verify Frappe API filtering functionality by testing hardcoded filters to bypass parameter validation issues.

Instructions

Test hardcoded filter to verify Frappe API filtering works. This bypasses all parameter validation issues.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doctypeYes

Implementation Reference

  • The core handler function for the 'test_hardcoded_filter' tool. It uses a hardcoded filter to count unreconciled Bank Transactions via the Frappe API, bypassing dynamic filter parsing issues.
    @mcp.tool() async def test_hardcoded_filter(doctype: str) -> str: """ Test hardcoded filter to verify Frappe API filtering works. This bypasses all parameter validation issues. """ try: client = get_client() # Hard-code filters for testing if doctype == "Bank Transaction": # Test unreconciled filter test_filters = {"status": "Unreconciled"} params = { "fields": json.dumps(["count(name) as count"]), "filters": json.dumps(test_filters) } response = await client.get(f"api/resource/{doctype}", params=params) if "data" in response and response["data"]: count = response["data"][0].get("count", 0) return f"HARDCODED TEST: Found {count} {doctype} with status='Unreconciled'" else: return f"HARDCODED TEST: No data returned for {doctype}" else: return f"HARDCODED TEST: Only supports 'Bank Transaction' doctype for now" except Exception as error: return f"HARDCODED TEST ERROR: {error}"
  • src/server.py:40-40 (registration)
    Top-level registration call in the MCP server setup that invokes documents.register_tools(mcp), which in turn registers the test_hardcoded_filter tool via its @mcp.tool() decorator.
    documents.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