Skip to main content
Glama

execute_raw_sql

Run read-only SQL diagnostic queries on the Lemon SQLite database to inspect device data and troubleshoot issues.

Instructions

Executes a raw SQL diagnostic query on the Lemon SQLite database (Read-Only queries advised).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesStandard SQLite SQL string to execute on the database

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It discloses only a soft advisory about read-only queries; it omits whether the enforcement is real or advisory, what SQL dialect features are supported, transaction/rollback behavior, row/time limits, and the shape of results.

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?

A single tight sentence with the action and target front-loaded. The trailing parenthetical is slightly awkward but does not waste much space.

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

Completeness2/5

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

For a tool that accepts arbitrary SQL with no annotations, no output schema, and no result-shape documentation, the definition is too thin. An agent cannot tell how results are returned, whether queries are capped, or what errors to expect – key gaps for an unconstrained SQL executor.

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

Parameters3/5

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

Schema description coverage is 100% – the single 'query' parameter is already documented as a standard SQLite SQL string. The description adds only the target database context, so the baseline 3 for a fully-covered schema is appropriate.

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

Purpose4/5

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

States a specific verb+resource: executes a raw SQL query against the Lemon SQLite database. Clearly distinct from all siblings, which deal with modules, rewrite rules, scheduled tasks, and traffic rather than direct DB access. Only sip is the vague qualifier 'diagnostic'.

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 explicit when-to-use or when-not-to-use guidance, and no pointer to alternatives. The parenthetical '(Read-Only queries advised)' hints at intent but does not tell the agent when raw SQL is preferable to the many purpose-built sibling tools like list_rewrite_rules or search_traffic_previews.

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