Skip to main content
Glama

delete_rows

Remove database rows by ID or matching criteria; multi-row matches are blocked unless explicitly allowed, and deleted rows go to recoverable trash.

Instructions

Delete rows by ID (file path) or matching criteria. Failsafe: a "where" that matches several rows is blocked unless allowMultiple is true — prefer ids for single-row deletes. Recoverable: deleted row files are moved to the workspace trash (.hillnote/trash//…, kept 30 days) and each deleted row reports its trashPath — restore_from_trash puts a row back.

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": {
      "workspace": "<workspace>",
      "databasePath": "<databasePath>"
    },
    "name": "delete_rows"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsNoRow IDs (file paths) to delete — the precise way to target rows. Preferred over "where".
whereNoCriteria to match rows for deletion (e.g., {"status": "Archived"}), keyed by column ID. Matching more than one row is blocked unless allowMultiple is true.
workspaceYesWorkspace path or name
databasePathYesPath to the database folder
allowMultipleNoExplicitly allow this command to delete MORE than one row at once (default false — multi-row matches are blocked with a list of what matched)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.19.0
    • addedInput schema / properties / allowMultiple
      Added value: +{
      +  "description": "Explicitly allow this command to delete MORE than one row at once (default false — multi-row matches are blocked with a list of what matched)",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / ids / description
      Previous value: -"Row IDs (file paths) to delete"New value: +"Row IDs (file paths) to delete — the precise way to target rows. Preferred over \"where\"."
    • changedInput schema / properties / where / description
      Previous value: -"Criteria to match rows for deletion (e.g., {\"status\": \"Archived\"})"New value: +"Criteria to match rows for deletion (e.g., {\"status\": \"Archived\"}), keyed by column ID. Matching more than one row is blocked unless allowMultiple is true."
  2. First observedv0.6.0

TDQS

A4.1/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so well: it discloses the failsafe that blocks ambiguous multi-row matches, explains that deletion is soft (rows move to .hillnote/trash/<timestamp>/, retained 30 days), and states that each deleted row returns a trashPath. That is exactly the mutation-risk and reversibility context an agent needs.

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?

Three tight sentences, front-loaded with the core action and targeting modes, then failsafe, then recoverability. Dense but no filler; the parenthetical trash path detail is load-bearing rather than decorative.

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, no-output-schema tool with a nested 'where' object, the description covers safety blocking, mutation scope, return content (trashPath), and the restore path. Nothing an agent needs in order to call it safely is missing.

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%, so the parameters are already documented in the schema; the description largely restates ids/where/allowMultiple semantics rather than adding new meaning. The 'prefer ids' preference is a mild addition over the schema wording.

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 and resource ('Delete rows') plus the two targeting modes — by ID (file path) or by matching criteria. It does not differentiate from similarly named siblings such as delete_sheet_rows, leaving the agent to infer which row-deleting tool applies to which surface.

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 concrete routing guidance: prefer ids for single-row deletes, and multi-row 'where' matches are blocked unless allowMultiple is true. It also names restore_from_trash as the recovery path, though it never states when this tool is the wrong choice relative to the other delete_* siblings.

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