Skip to main content
Glama

Undo Last Change

undo_last_change

Reverts the last cleaning or preprocessing change applied to a dataset, restoring its previous shape and reporting how many more undo steps remain.

Instructions

Undo the last change made to a dataset by a cleaning or preprocessing tool (the last 5 changes are remembered). Args: dataset_id (str): ID of the dataset. Returns: dict: the restored shape and how many further undo steps are available.

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": {
      "dataset_id": "<dataset_id>"
    },
    "name": "undo_last_change"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataset_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose two useful traits beyond the schema: the undo history is capped at the last 5 changes, and only changes originating from cleaning/preprocessing tools are eligible. It does not state whether undo is reversible, whether it errors when nothing is left to undo, or whether it operates on the same dataset handle.

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 purpose sentence carries all the important constraints; the Args/Returns block is concise and earns its place because no output schema exists. Slightly verbose formatting for a single-parameter tool, but no filler content.

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 one-parameter, no-annotation, no-output-schema tool, the description covers purpose, history limit, eligibility scope, and the return shape (restored shape plus remaining steps). The main omission is failure behavior when no undo steps remain.

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 description coverage is 0%, but the tool has a single trivially named required parameter. The description restates it as 'ID of the dataset', which adds no meaning beyond the name and type, and it does not clarify whether the ID must match the dataset that was modified.

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 (undo) and a precisely scoped resource (the last change made to a dataset by a cleaning or preprocessing tool), and adds the memory depth of 5 steps. An agent can immediately tell this is a rollback operation, not a dataset inspection or mutation tool.

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?

The scope constraint (only changes from cleaning/preprocessing tools, 5-deep history) implies when the tool applies, and the 'further undo steps available' return value implies iterative use. However, there is no explicit guidance on when to prefer undo over re-running a cleaning step, and no statement of what happens when the history is exhausted.

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

Deploy Server

Other Tools