A LangGraph-based agent for root cause analysis (RCA) of OR2A (Order Ready to Assignment) SLA breaches in quick-commerce delivery operations. Integrates with DuckDB for SQL queries and uses MCP filesystem protocol to read documentation.
RCA Agent defines 4 tools with reasonable descriptions (avg 180 chars, within baseline 194). All tools have verb-noun naming (get_*, run_*). However, critical gaps: run_sql_query lacks input parameter descriptions beyond the bare 'sql' string; no output schemas documented for any tool; no error recovery guidance; no parameter constraints (e.g., SQL injection prevention hints). Tools are read-only and simple, but lack the rigor expected for production agent tooling. Descriptions are adequate but generic, they state WHAT but not WHEN or WHY to call each tool relative to others.
Read the OR2A metric definition via MCP. Returns what OR2A means, how it is calculated, and what the SLA thresholds are. Call this when the user asks about the OR2A metric or you need to understand breach definitions.
Read the RCA playbook via MCP. Returns the step-by-step root cause analysis logic including demand spike, pileup, booking gap, and utilization gap checks with thresholds. Call this when you need to diagnose WHY a store underperformed.
Read the database schema documentation via MCP. Returns column names, types, and descriptions for the 'orders' table. Call this to understand the table structure before writing SQL queries.
Execute a SQL query against the DuckDB database and return results as JSON. The table name is 'orders'. Use get_schema_doc first to understand the columns.
run_sql_query lacks output schema documentation. LLM cannot predict return structure (JSON array? object? error format?), forcing it to guess downstream field names.
No parameter descriptions for run_sql_query's 'sql' input. Missing format constraints (e.g., 'SELECT-only, no UPDATE/DELETE/INSERT'), expected result limits, or error cases.
Error handling returns generic strings ('Error reading schema doc: ...') without recovery guidance. LLM cannot determine if error is retryable, user-fixable, or fatal.
No tool annotations (readOnlyHint, idempotentHint). All 4 tools are read-only and safe to retry, but this is not declared in the schema.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 58 | 2026-07-28+ | v2 |
Tool descriptions lack WHEN/WHY guidance. E.g., get_schema_doc says 'Read schema' but not 'Call this BEFORE run_sql_query to understand columns' or 'Use when you need to write a new query'.