Skip to main content
Glama

Patch a database entry

patch_database_entry

Apply shallow field patches to one RPG Maker MZ database entry or System.json keys; nested objects and arrays must be passed complete to avoid dropping existing keys.

Instructions

Apply a shallow field patch to one entry of a database table (or to System.json's top-level keys). Nested objects and arrays must be passed complete, because MZ has no partial-update semantics on them — a nested object that arrives without a key the entry already had loses that key, and the reply names the keys it lost so the caller can read the entry first. System's switches and variables are the exception: pass either an array of names or an object keyed by id, and the array the engine needs is what gets written.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoEntry id; ignored for System
patchYes
tableYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses that nested objects/arrays have no partial-update semantics, that missing keys are lost, and that the reply names lost keys. It also documents the switches/variables exception. It omits auth/permission requirements and idempotency, hence not a 5.

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-loaded with the core action and scope; the remaining sentences each carry distinct behavioral information (loss semantics, reply behavior, exception). Slightly dense and long-winded in the nested-object sentence, but no filler.

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 mutation tool with no annotations and no output schema, the description covers the key risks (data loss on nested patches) and hints at the response (names lost keys). It could say more about failure modes or permissions, but the essentials for correct invocation are present.

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 only 33% (only 'id' documented), so the description must compensate, and it does: it explains patch semantics for nested structures, the complete-pass requirement, the switches/variables alternative input shapes, and that id is ignored for System. It adds substantial meaning beyond the schema's bare types.

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 ('apply a shallow field patch') and resource ('one entry of a database table') with scope qualifier ('or System.json's top-level keys'). This clearly distinguishes it from siblings like create_database_entry and read_database.

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?

It implies a workflow ('read the entry first' when keys are lost) but never states when to choose this tool over read_database or create_database_entry, nor any exclusions. Usage context is only inferable from the semantics of 'patch'.

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