Skip to main content
Glama

manage_transaction

Apply or undo raw database transactions, inspect transaction history, and bulk create or delete genealogy objects in one operation.

Instructions

Apply raw DB transactions, undo history, or bulk create/delete. Writes: all actions.

Low-level database operations that the object endpoints cannot express: apply -> POST /transactions/ replaying payload (a raw transaction dict of {add, update, delete} operations). undo -> POST /transactions/?undo=1 applying the inverse of payload; pass a recent transaction to revert it. history -> GET /transactions/history/ (list of past transactions). history_id -> GET /transactions/history/. undo_history -> POST /transactions/history//undo. create_objects -> POST /objects/ with payload = list of object dicts (validated and added together in one transaction). delete_objects -> POST /objects/delete/?namespaces= batches an async delete of whole object types (e.g. 'people,notes'). delete_by_handle -> POST /objects/delete-by-handle/ with namespace (e.g. 'people') and handles (list) to delete specific objects. params forwards query args for apply/undo: undo, message, force, background. Prefer the typed manage_* tools for single-record work; raw apply skips cross-reference maintenance and can corrupt a tree if malformed.

Args: action: "apply", "undo", "history", "history_id", "undo_history", "create_objects", "delete_objects" or "delete_by_handle". payload: Transaction dict (apply/undo) or list of objects (create_objects). params: Optional dict for apply/undo (undo, message, force, background). transaction_id: History transaction id; required for history_id, undo_history. namespace: Object plural namespace (e.g. 'people'); for delete_objects / delete_by_handle. handles: List of handles to delete; for delete_by_handle. instance: Gramps Web base URL from get_instances; default = first.

Returns: dict: {"status", "url", "data": transaction result or task reference}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes
paramsNo
handlesNo
payloadNo
instanceNo
namespaceNo
transaction_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and largely succeeds: it states 'Writes: all actions', warns about cross-reference maintenance and corruption risk, and discloses that delete_objects is async. The slight overbreadth of 'Writes: all actions' given read-only history/history_id GETs keeps this from 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but well organized: summary line, per-action endpoint map, safety warning, then Args. Every line carries operational value, and the risk warning is prominently placed near the top.

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 7-parameter multi-action tool with no output schema or annotations, this is unusually complete. Every action has an endpoint, required arguments, and return shape ('status', 'url', 'data'), and nothing essential for safe invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the Args section is essential and highly informative. It defines the allowed action values, the conditional transaction_id requirement, payload shape per action, namespace/handles for deletes, and params options. It goes well beyond what the bare schema provides.

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 leads with a concrete verb phrase: 'Apply raw DB transactions, undo history, or bulk create/delete' and enumerates every action. It differentiates from sibling manage_* tools by labeling these as low-level operations that object endpoints cannot express and advising typed tools for single-record work.

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 explicitly scopes this tool to 'Low-level database operations that the object endpoints cannot express' and says 'Prefer the typed manage_* tools for single-record work'. It also warns that malformed raw apply can corrupt a tree, giving clear routing and safety criteria.

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