Create a new operation that undoes an earlier operation in a Jujutsu (jj) repository. Applies the inverse of the specified operation. Parameters: operation (Operation to undo, defaults to latest), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run t...
AI agents invoke operation-undo to trigger actions in Jj. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call — builds kicked off, notifications sent, workflows started.
While undo operations are theoretically reversible (can be undone themselves), this tool executes version control commands that modify repository history and state. It falls under Execute rather than Write because: (1) it triggers external VCS operations whose effects depend on the operation parameter; (2) it manipulates repository history which has broader implications than simple data modification; (3) misuse…
From the tool's definition Tool description states it 'Create a new operation that undoes an earlier operation' and 'Applies the inverse of the specified operation.' These are active operations that modify repository state through version control commands.
Risk signalsAdmin/system-level operation
Attacks that exploit this kind of access
Create a new operation that undoes an earlier operation in a Jujutsu (jj) repository. Applies the inverse of the specified operation. Parameters: operation (Operation to undo, defaults to latest), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in). It is categorised as a Execute tool in the Jj MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
Register the Jj MCP server in PolicyLayer and add a rule for operation-undo: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Jj. Nothing to install.
operation-undo is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the operation-undo rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for operation-undo. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
operation-undo is provided by the Jj MCP server (jj-mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Every MCP server has a record like this.
Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.
Teams ship this data inside their own products. See what a licence covers →