Skip to main content
Glama

test_hardcoded_filter

Verify Frappe API filtering functionality by testing a hardcoded filter that bypasses 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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function implementing the test_hardcoded_filter tool. It performs a hardcoded count query on Bank Transaction documents with status 'Unreconciled' using the Frappe API, bypassing filter parsing issues.
    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}"
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses that the tool 'bypasses all parameter validation issues', which is a useful behavioral trait indicating it might skip checks. However, it lacks details on permissions, side effects, rate limits, or what 'verify Frappe API filtering works' entails operationally.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with two sentences that are front-loaded and efficient. Each sentence adds value: the first states the purpose, and the second clarifies a key behavioral trait. There's no wasted text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (testing-focused with 1 parameter), no annotations, and an output schema exists (which reduces need to explain returns), the description is minimally adequate. It covers the testing purpose and validation bypass but lacks details on usage context or parameter meaning, leaving gaps for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It mentions 'hardcoded filter' but doesn't explain the 'doctype' parameter's meaning, how it relates to filtering, or what values are expected. The description adds minimal semantic value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'test[s] hardcoded filter to verify Frappe API filtering works' and 'bypasses all parameter validation issues', which gives a vague purpose focused on testing/verification rather than a specific operational function. It doesn't clearly distinguish from siblings like 'list_documents' or 'run_query_report' that might involve filtering.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description mentions it 'bypasses all parameter validation issues', which implies a specific testing context but doesn't explicitly state when or why to choose it over other filtering-related tools like 'list_documents'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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