Skip to main content
Glama

abap_journal

Destructive

View write history and undo changes made to SAP ABAP objects. List journal entries, inspect before-images, revert bad writes, and reconcile pending entries.

Instructions

History and undo for writes abapsmith made. Parameters: mode (list|show|undo|reconcile, default list), entry, object, detail, limit, session, force, activate, outcome, reason. Common calls: mode=list (recent writes with entry ids, each row's undoable column and truncated undo_blocker say up front whether an undo is expected to work); mode=show entry= (one entry with its before-image, and the full undo_blocker reason if any; detail=full for the complete images); mode=undo entry= activate=true (revert it — refuses on drift or a delete-gate; see abapsmith-recover-a-bad-write); mode=reconcile entry= outcome=<succeeded|failed> reason= (close a stranded pending entry — journal bookkeeping only, nothing is sent to SAP).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNolist (default): recent writes. show: one entry incl. its before-image. undo: revert one entry. reconcile: close a stranded pending entry with an outcome you establish and a stated reason.
entryNoJournal entry id from mode=list. Required for show and undo unless `object` is given.
forceNomode=undo: proceed even though the object changed on the server after abapsmith wrote it. This OVERWRITES whatever that other change was. Read the object first.
limitNomode=list: entries to return. Default 20.
detailNoshow only. "summary" (default): header plus a unified diff of before-image → after-image, capped at about 2,000 characters. "full": the complete before-image (and after-image when one was recorded), as before.
objectNoFilter by object name; for undo, targets that object's most recent undoable entry.
reasonNomode=reconcile: how you established that outcome. Required, recorded verbatim on the entry, and the only evidence it will ever carry for the asserted outcome.
outcomeNomode=reconcile: the outcome you are asserting for a `pending` entry. Required. `pending` is the state being left, so it is not offered.
sessionNomode=list: filter to one session's entries. "current" resolves to this running server's own session id (see the echoed `session` in the response header).
activateNomode=undo: re-activate after restoring. Default true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.25
    • addedInput schema / properties / detail
      Added value: +{
      +  "description": "show only. \"summary\" (default): header plus a unified diff of before-image → after-image, capped at about 2,000 characters. \"full\": the complete before-image (and after-image when one was recorded), as before.",
      +  "enum": [
      +    "summary",
      +    "full"
      +  ],
      +  "type": "string"
      +}
  2. Changed4 schema fields changedv0.5.6
    • changedInput schema / properties / mode / description
      Previous value: -"list (default): recent writes. show: one entry incl. its before-image. undo: revert one entry."New value: +"list (default): recent writes. show: one entry incl. its before-image. undo: revert one entry. reconcile: close a stranded pending entry with an outcome you establish and a stated reason."
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "list",
      -  "show",
      -  "undo"
      -]New value: +[
      +  "list",
      +  "show",
      +  "undo",
      +  "reconcile"
      +]
    • addedInput schema / properties / outcome
      Added value: +{
      +  "description": "mode=reconcile: the outcome you are asserting for a `pending` entry. Required. `pending` is the state being left, so it is not offered.",
      +  "enum": [
      +    "succeeded",
      +    "failed"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / reason
      Added value: +{
      +  "description": "mode=reconcile: how you established that outcome. Required, recorded verbatim on the entry, and the only evidence it will ever carry for the asserted outcome.",
      +  "type": "string"
      +}
  3. First observedv0.3.0

TDQS

A4.4/5.0
Behavior4/5

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

The description discloses several behavioral traits beyond annotations: undo refuses on drift or a delete-gate, reconcile is 'journal bookkeeping only, nothing is sent to SAP,' force overwrites server changes, and activate defaults to true. Annotations already flag destructive intent, but the description adds critical specifics that an agent must know to avoid unintended consequences. It does not contradict 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?

The description is long (about 200 words) but dense with information, structured with a purpose line, parameter list, and a 'Common calls' section. It front-loads the core purpose and then organizes usage patterns. While it could be split into bullet points for easier scanning, every sentence carries meaningful content, and the length is justified by the tool's complexity (4 modes, 10 parameters).

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 tool with 4 modes, 10 parameters, no output schema, and destructive potential, this description is remarkably complete. It covers all modes, special conditions (drift, delete-gate, reconcile bookkeeping), parameter interactions, and even references a recovery guide. It implicitly describes expected outputs (e.g., 'undoable' column and 'undo_blocker' in list) despite lacking an output schema. Nothing essential for correct invocation appears missing.

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%, so each parameter already has a description. The tool description adds value by grouping parameters into modes and giving example call patterns (e.g., 'mode=undo entry=<id> activate=true'), clarifying how parameters interact and which are relevant for each mode. It also explains the 'object' parameter's behavior for undo, which is not obvious from the schema alone.

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 'History and undo for writes abapsmith made,' which precisely states the tool's verb (history/undo) and resource (writes). This clearly distinguishes it from sibling tools like abap_write (which creates writes) and abap_activate (which activates changes). No ambiguity remains about its core function.

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?

The description provides concrete 'Common calls' for each mode (list, show, undo, reconcile), making it clear when to use each. However, it does not explicitly contrast this tool with siblings (e.g., 'use abap_write to make a write, abap_journal to undo one'), though the purpose statement implies the distinction. It references an external recovery guide, adding context. The guidance is solid but could be more explicit about alternatives.

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