Skip to main content
Glama

execute_query

Runs a read-only SQL SELECT query against the SQLite database and returns the resulting rows, so you can inspect table data directly from Claude Desktop or Cursor.

Instructions

Executes a SQL SELECT query on the SQLite database and returns rows.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "execute_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesSQL query to execute

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does usefully disclose that only SELECT statements are executed and that rows are returned. It omits what happens on non-SELECT input, whether execution is strictly read-only, row/time limits, and error behavior.

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

Conciseness5/5

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

A single front-loaded sentence with no filler; the operation and return value come first.

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?

For a one-parameter tool with no output schema, stating that rows are returned is largely sufficient. However, with no annotations to declare read-only safety, the description should have covered statement restrictions and failure modes.

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 coverage is 100% for the single query parameter, so baseline is 3. The description adds the constraint that the query should be a SELECT against SQLite, but gives no syntax or dialect specifics beyond that.

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 (executes), resource (SQL SELECT query), and target (SQLite database), plus the return shape (rows). It is clearly distinct from describe_table and list_tables, though it does not name them.

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 when-to-use or when-not guidance beyond the implicit 'run a query'. It does not tell the agent to inspect schema with list_tables/describe_table first, nor what to do when a non-SELECT statement is needed.

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

Deploy Server

Other Tools