Safe, audited SQL for AI agents via MCP with guardrails, audit logging, and cost controls
SQLSense has clear, well-structured tool definitions with proper schemas and descriptions. All 4 tools have non-empty descriptions (avg ~120 chars, within baseline 34-392 range) and complete input schemas with typed properties. However, parameter descriptions are sparse or missing context. The sql_query tool lacks guidance on what 'params' should contain or how to structure them. Output schemas are not documented, LLMs cannot predict what fields to expect from query results. Error handling descriptions are generic ('Blocked queries return an error with the reason') without actionable recovery guidance. No tool annotations (readOnlyHint, destructiveHint) despite clear risk profiles (sql_query is WRITE, others READ_ONLY). Parameter constraints (e.g., limit range for get_audit_log) are absent. Overall solid foundation but missing LLM-optimization details.
Validate and explain what a SQL query will do before executing it.
Retrieve recent query audit log entries.
Retrieve the database schema (tables and columns). Call this before writing complex queries.
Execute a SQL query against the connected database. All queries are validated by SQLSense guardrails before execution. Blocked queries return an error with the reason. LIMIT is automatically added to SELECT queries without one.
Output schemas not documented. LLMs cannot predict result structure (fields, types, pagination). sql_query results are opaque; get_schema and get_audit_log lack field documentation.
Tool annotations missing. sql_query is destructive (WRITE risk) but lacks destructiveHint. get_schema, explain_query, get_audit_log are read-only but lack readOnlyHint. Agents cannot infer safety profile.
Parameter 'params' in sql_query lacks description of structure, type, and usage. Is it key-value pairs? How are they bound in the SQL? LLMs cannot infer correct usage.
Error handling descriptions are generic. 'Blocked queries return an error with the reason' does not guide LLM recovery. No actionable next steps (e.g., 'Try explain_query() first to validate').
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 59 | 2026-07-28+ | v2 |
Parameter constraints missing. get_audit_log 'limit' has default=20 but no min/max bounds. sql_query 'sql' has no length limit or format guidance. Unbounded inputs risk timeouts or resource exhaustion.