Skip to main content
Glama
sqlite-mcp-server

sqlite-mcp-server

by mismi

Execute Statement

sqlite_execute
Destructive

Run a single modifying or DDL SQL statement against a SQLite database, such as INSERT, UPDATE, DELETE, CREATE, ALTER, or DROP, with named parameters to apply updates, deletes, and schema changes.

Instructions

Run one modifying SQL statement: INSERT, UPDATE, DELETE, REPLACE, CREATE, ALTER or DROP.

Use this for updates, deletes and schema changes. For a single INSERT prefer sqlite_insert_row, which validates columns and returns the new row. For reads use sqlite_query.

One statement per call: a batch would be silently truncated by SQLite, so extra statements are rejected. Use named placeholders ($name) with params instead of interpolating values.

Example: {"sql": "UPDATE books SET stock = stock - $n WHERE id = $id", "params": {"n": 2, "id": 5}} -> {"changes": 1}. A result of 0 changes means the WHERE clause matched nothing; call sqlite_query first to confirm the rows exist.

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": {
      "sql": "<sql>"
    },
    "name": "sqlite_execute"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesOne modifying or DDL statement. Named placeholders look like $id.
paramsNoValues for named placeholders, keyed without the "$", e.g. {"id": 5}

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, and the description goes well beyond that by disclosing the single-statement constraint, that extra statements are rejected, that values should be bound as named placeholders, and how to interpret a zero-change result. It also tells the agent the response shape ({"changes": n}) even though no output schema exists.

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?

Front-loaded with the operation set, then alternatives, then the constraint, then a concrete example and failure interpretation. Every sentence carries distinct information – the example and the zero-changes note both earn their place as operational guidance.

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

Completeness5/5

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

For a destructive two-parameter tool with no output schema, the description covers the safety-relevant behavior, batching limits, binding conventions, request/response shape, and the main silent-failure mode (0 changes = WHERE matched nothing). Nothing an agent needs in order to invoke it correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already documents both fields; the description still reinforces the named-placeholder convention ($name with a matching params key) and supplies a worked example with multi-parameter binding. The added value is real but partly duplicative of the schema's own wording.

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

Purpose5/5

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

The first line states a specific verb and resource plus the full set of supported statement classes (INSERT, UPDATE, DELETE, REPLACE, CREATE, ALTER, DROP), which lets an agent distinguish it from sqlite_query (reads) and sqlite_insert_row (single inserts) without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit routing is given in both directions: reads go to sqlite_query, single inserts should prefer sqlite_insert_row, and this tool covers updates, deletes and schema changes. The named alternatives match real siblings, so the exclusions are actionable rather than decorative.

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