Complete AI Chat Assistant for ERPNext/Growth System with MCP tool integration, RAG indexing, and multi-channel support (WhatsApp, web chat)
Server has 10 tools with mostly complete schemas and descriptions. Naming follows verb_noun convention (list_, get_, create_, update_, delete_, search_, run_). Descriptions are detailed (100-400 chars) with USE/DO NOT USE guidance and examples. However, several critical gaps: (1) parameter descriptions lack format constraints and validation rules; (2) output schemas are not formally documented; (3) error handling lacks recovery guidance; (4) no tool annotations (readOnlyHint, destructiveHint); (5) some descriptions include example values (e.g., 'LOAN-001') which LLMs may reuse literally. Per-tool average: 68/100.
Create a new document in the system. USE THIS WHEN: - User explicitly asks to create/add a new record - Creating Custom Fields, Property Setters, Scripts, etc. IMPORTANT: - Use get_doctype_info FIRST to discover required fields - All document fields go inside the 'data' parameter - The 'doctype' parameter is separate from 'data' - Example: create_document(doctype='Customer', data={'customer_name': 'ABC Corp', 'customer_type': 'Company'}) CONFIRMATION: Write operations may require user confirmation. If the tool returns a confirmation prompt, STOP and wait for user response.
DELETE a document permanently. ⚠️ DANGEROUS — cannot be undone! USE THIS ONLY WHEN: - User explicitly asks to delete a specific record - You have confirmed the exact document name ALWAYS requires user confirmation before execution. Never delete without the user's explicit request.
Get DocType metadata: field names, field types, required fields, linked DocTypes. USE THIS WHEN: - BEFORE calling list_documents, to discover correct field names for filters - BEFORE calling create_document, to know required fields - User asks about the structure of a DocType - You're unsure which fields exist on a DocType DO NOT USE FOR: - Known DocTypes where you already know the fields (Customer, Sales Invoice, etc.) IMPORTANT: Call this FIRST when you don't know field names. It prevents errors from using wrong field names in list_documents or create_document. Returns: Field list with names, types, options, required status, and descriptions.
Get a single document by its exact name/ID. USE THIS WHEN: - You know the exact document name (e.g., 'SAL-INV-0042', 'LOAN-0001') - You need ALL fields of a specific document - User asks about a specific record by name/ID DO NOT USE WHEN: - You need to search/filter multiple documents → use list_documents - You don't know the document name → use list_documents with filters first Returns: All fields of the document including child tables.
Output schemas not formally documented. Tools return results but no schema definition visible for what fields/structure agents should expect. Agents cannot plan downstream calls or extract data reliably.
Parameter descriptions lack format constraints and validation rules. E.g., 'limit' has no min/max bounds (should be 1-1000); 'order_by' has no pattern; 'filters' object structure not formally specified. LLMs cannot validate inputs before calling.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). Agents cannot distinguish safe reads from destructive writes without parsing descriptions. delete_document and submit_document should be marked destructive.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 58 | 2026-07-28+ | v2 |
Search and list Frappe/Growth System documents with filtering, sorting, and pagination. USE THIS WHEN: - User wants to find records matching criteria (e.g., 'show all overdue loans') - User wants a list of documents (e.g., 'list all customers in Mumbai') - User wants to browse/explore data DO NOT USE WHEN: - You know the exact document name → use get_document instead - You need complex JOINs, GROUP BY, SUM, AVG → use run_database_query instead - You need full-text search across all fields → use search_documents instead - You don't know the DocType name → use search_doctype first - You don't know field names → use get_doctype_info first FILTER SYNTAX: - Exact match: {"status": "Active"} - Operators: {"creation": [">", "2024-01-01"]} - Like: {"customer_name": ["like", "%Mahaveer%"]} - In list: {"status": ["in", ["Active", "Open"]]} - Between: {"creation": ["between", ["2024-01-01", "2024-12-31"]]} - Operators: =, !=, >, <, >=, <=, like, in, not in, between, is COMMON DOCTYPES: Customer, Supplier, Item, Sales Invoice, Purchase Invoice, Sales Order, Purchase Order, Journal Entry, Payment Entry, Employee, Sales Invoice, Purchase Order, Customer TIP: Always include 'name' in fields. Default limit is 20.
Execute SELECT SQL queries for aggregations, joins, and complex analytics. USE THIS WHEN: - You need SUM, COUNT, AVG, GROUP BY, JOINs - Complex aggregations across multiple tables - Analytics and reporting queries DO NOT USE WHEN: - Simple document listing → use list_documents - You don't know the table/field names → use get_doctype_info first IMPORTANT: - SELECT queries ONLY (no INSERT, UPDATE, DELETE) - Table names are backtick-quoted: `tabDocTypeName` - Field names: use backticks for reserved words - Always LIMIT results to prevent huge datasets EXAMPLES: - Count: SELECT COUNT(*) FROM `tabLoan` - Sum: SELECT SUM(loan_amount) FROM `tabLoan` WHERE status='Disbursed' - Group: SELECT status, COUNT(*) FROM `tabLoan` GROUP BY status
Search for DocType NAMES (not documents). Finds which DocTypes exist in the system. USE THIS WHEN: - You don't know the exact DocType name - User mentions a concept and you need to find the matching DocType - Example: User says 'invoices' → search to find 'Sales Invoice' vs 'Purchase Invoice' DO NOT USE WHEN: - You already know the DocType name → go directly to list_documents/get_document Returns: List of matching DocType names.
Full-text search across multiple fields of a DocType. USE THIS WHEN: - User wants to search by partial text across many fields - You don't know which field contains the search term - Quick fuzzy search (e.g., 'find anything related to Mahaveer') DO NOT USE WHEN: - You know the exact field to filter → use list_documents with filters instead - You need structured filtering with operators → use list_documents NOTE: This does broad text search. For precise filtered queries, use list_documents.
Submit a draft document (changes docstatus from 0 to 1). USE THIS WHEN: - User asks to submit/finalize a document - Document is in Draft status (docstatus=0) ⚠️ Submitted documents cannot be easily modified — they require amendment. Always requires user confirmation.
Update an existing document's fields. USE THIS WHEN: - User asks to change/update/modify a specific record - You know both the DocType and document name PARAMETERS: - doctype: The DocType name (e.g., 'Customer') - name: The exact document name/ID - data: Dict of fields to update (only changed fields needed) Example: update_document(doctype='Customer', name='CUST-0001', data={'status': 'Active'})
Error handling lacks recovery guidance. Descriptions mention 'confirmation prompt' and 'STOP and wait' but no structured error response format or actionable next steps defined. Agents cannot self-correct on failures.
Example values in descriptions (e.g., 'LOAN-001', 'CUST-0001', 'SAL-INV-0042'). LLMs frequently reuse example values literally in real calls, causing failures. Replace with format constraints or remove examples.