Skip to main content
Glama
mcp-toolkit

mcp-toolkit

by Dongnb66

sqlite_query

Execute read-only SQLite queries (SELECT, WITH, PRAGMA) on a database file for data inspection; the connection rejects writes and supports positional parameters.

Instructions

对 SQLite 数据库执行只读查询(SELECT / WITH / PRAGMA)。基于 Node 内置 node:sqlite,以只读模式打开,拒绝任何写操作。

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

Input Schema

NameRequiredDescriptionDefault
sqlYes只读 SQL 语句(? 占位符可用 params 传参)
dbPathYesSQLite 数据库文件路径
paramsNo位置参数,按 ? 顺序传入

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations supplied, the description must carry the full behavioral burden, and it does cover the critical safety property: opened read-only via node:sqlite and write statements are refused. It stays silent on operational behavior such as row limits, execution timeout, whether a missing dbPath errors or creates a file, and how failures are surfaced.

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?

Two tight sentences with the allowed statement types listed inline; nothing redundant. Minor weakness is that the read-only guarantee is repeated in both sentences ('只读查询' and '以只读模式打开,拒绝任何写操作'), a small redundancy.

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 three-parameter tool with no output schema, the definition should say roughly what comes back (rows, columns, error shape), and it does not. The safety and accepted-statement coverage is complete, but return-value expectations are left entirely to inference.

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%, so dbPath, sql and params are already documented, including the '?' positional binding rule. The description adds no extra meaning about parameter handling, which is acceptable at baseline but not more.

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?

States a concrete verb (执行) and resource (SQLite 数据库) plus the exact statement classes accepted (SELECT / WITH / PRAGMA), so an agent knows immediately what the tool does and what it will not do. No sibling in the catalog touches SQL, so no disambiguation is needed.

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

Usage Guidelines4/5

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

Gives usable selection context: only read queries, writes are rejected, so the agent knows this is not the tool for mutations. It does not point anywhere for write needs, but no plausible alternative exists among the siblings, so the only gap is the missing escalation path.

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