Skip to main content
Glama
LiteDB desktop

LiteDB desktop

Write in one call

write
Destructive

Run allowed SQL INSERT, UPDATE, or DELETE statements in one call, with row-limit checks before and during execution; other changes return a preview and approval token.

Instructions

Run a write in one call, where the person has allowed that for this connection in LiteDB (Settings → Agents): an INSERT of listed rows, or an UPDATE or DELETE with a WHERE clause, that changes no more rows than the limit they set. The limit is checked before it runs and enforced while it runs. Anything else, or any write when it is not allowed, comes back as a preview with a token for execute_approved, exactly as from query, with the reason it did not run.

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": "write"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesOne or more SQL statements, separated by semicolons.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior3/5

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

Goes well beyond the annotations: it discloses the Settings → Agents permission gate, that the row limit is checked before execution and enforced during execution, and that a refused write returns a preview plus execute_approved token with a stated reason. What it leaves out is the safety profile of the bound — e.g. whether an allowed write is transactional across multiple semicolon-separated statements, whether the returned preview contains the full statement and estimated row count, and any token lifetime. With destructiveHint=true already declared, this is good added context but not complete.

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?

Two sentences, front-loaded with the core action and privilege condition, then the limit and the fallback behavior. Dense but every clause carries decision-relevant information; nothing is repeated from the schema or annotations.

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

Completeness4/5

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

For a single-parameter, destructive, gated write tool with no output schema, the definition covers the permission model, the enforcement mechanism, and the failure path completely enough to call correctly. The remaining gap is multi-statement/transaction semantics and what exactly the preview payload contains, which matter but are secondary.

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% and there is a single parameter, so the schema already carries the baseline. The description nonetheless adds real meaning by constraining which SQL shapes are accepted (INSERT of listed rows; UPDATE/DELETE only with a WHERE clause), which is not encoded anywhere in the schema's generic 'one or more SQL statements'.

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 specific verb and resource ('Run a write in one call' against LiteDB) and enumerates the accepted operation classes: INSERT of listed rows, or UPDATE/DELETE with a WHERE clause. It also implicitly separates itself from query and execute_approved by naming them as the alternative path.

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?

Gives explicit when-to-use conditions (the person has allowed writes for this connection in Settings → Agents, rows affected under their limit) and explicit when-not (anything else, or any write when not allowed, returns a preview with a token for execute_approved). The routing rule to the sibling tool is unambiguous.

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