Skip to main content
Glama

ohmyho.st

Execute one bounded database write in Dev or Prod

database_write
DestructiveIdempotent

Execute one INSERT, UPDATE or DELETE/upsert in the chosen Dev or Prod database. Requires Owner project permission, confirmed: true and an idempotency key. At most 1000 directly affected rows and five seconds. Returns a durable receipt, not rows. If outcome is unknown, never automatically repeat with another key: inspect the data with a read-only query and retain the operation ID. Same-key retries only observe the existing attempt. Schema changes use GitHub migrations; compute wakes and is metered normally. Application RLS policies also apply to writes. If the selected environment has no database, follow database_not_set_up.

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": {
      "project_id": "<project_id>",
      "idempotency_key": "<idempotency_key>",
      "environment": "<environment>",
      "statement": "<statement>",
      "parameters": "<parameters>",
      "confirmed": "<confirmed>"
    },
    "name": "database_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmedYes
statementYesOne direct INSERT, UPDATE or DELETE, max 64 KiB UTF-8; entire JSON request is limited to 65,600 bytes.
parametersYesJSON values, at most 8 levels and 10000 nodes, max 64 KiB encoded.
project_idYesProject identifier.
environmentYes
idempotency_keyYesIdentifies one mutation and its canonical request payload.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructiveHint and idempotentHint, yet the description adds concrete limits (1000 affected rows, five seconds), the return shape ('a durable receipt, not rows'), the unknown-outcome protocol (do not retry with a new key; inspect with a read-only query and retain the operation ID), same-key retry semantics, RLS interaction, and compute metering. These are material behaviors not derivable from the annotations.

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?

It is dense and front-loaded: the operation, its constraints, then the failure protocol. Every sentence conveys operative information, but the run-on density (limits, retries, migrations, metering, RLS, fallback all in one block) makes it slightly harder to scan than an ideally structured description.

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 six-parameter write with no output schema, the description covers preconditions, limits, return type, failure handling, and environmental prerequisites. An agent can call this correctly and know what to do when the outcome is ambiguous.

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 67%, and the description reinforces the required `confirmed: true` flag and explains idempotency-key semantics ('same-key retries only observe the existing attempt'), which the schema only hints at. The environment parameter's dev/prod effect is covered, though statement-shape nuances remain mostly in the schema.

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 description opens with a specific verb and resource ('Execute one INSERT, UPDATE or DELETE/upsert') and names the scope ('chosen Dev or Prod database'). It implicitly separates itself from read paths and explicitly routes schema changes to GitHub migrations, so an agent can distinguish it from siblings like database_query or database_migrate.

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?

It states preconditions (Owner project permission, `confirmed: true`, an idempotency key), the alternative for schema changes (GitHub migrations), and the fallback when no database exists (database_not_set_up). The when-to-use vs when-not-to-use boundaries are explicit rather than inferred.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.