Skip to main content
Glama

sqlite_execute

Execute a single write SQL statement against a SQLite database in the sandbox, creating the file if needed; supports parameter binding and requires write access enabled.

Instructions

执行单条写操作 SQL(需开启 sqlite.allow_write)。

Args: database: 数据库文件名或沙箱内的路径;不存在时会创建。 sql: 单条 INSERT / UPDATE / DELETE / CREATE 等语句。 params: 绑定参数列表,使用 ? 占位符。

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

Input Schema

NameRequiredDescriptionDefault
sqlYes
paramsNo
databaseYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations, so the description carries the burden. It does disclose the write-permission gate and that a missing database file will be created, which is genuinely valuable. It stops short of stating irreversibility, transaction/rollback behavior, or what happens to existing data, which matter for a mutating tool.

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?

Front-loads the action and the permission gate in one line, then documents each parameter compactly. No filler, though the Args block largely restates names and could be tighter.

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?

An output schema exists, so return values need no explanation, and creation-on-absence plus the permission flag are covered. For a write tool with zero annotations, however, missing mutation-safety details (irreversibility, multi-statement handling, transactional semantics) leave a real gap.

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 0%, so the description must carry all param meaning — and it does: database is a filename or sandbox path created if absent, sql is a single INSERT/UPDATE/DELETE/CREATE, params are bind values using '?' placeholders. This is a material improvement over the bare schema titles.

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: '执行单条写操作 SQL' with the write-only scope made explicit. The contrast with sqlite_query is implied by '写操作' and '单条', so an agent can distinguish the write path from the read path, though the sibling is never named.

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

Usage Guidelines3/5

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

Gives a real prerequisite ('需开启 sqlite.allow_write') and a constraint ('单条' = single statement), which usefully steers usage. However it never says when to prefer sqlite_query for reads or what to do with multi-statement input, so routing guidance is implied rather than stated.

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