operation-undo

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...

Server Jj jj-mcp-server
Category Execute
Risk class High
Parameters 00 required

What operation-undo does on Jj

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.

Why operation-undo needs a policy

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

Questions about operation-undo

What does the operation-undo tool do? +

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.

How do I enforce a policy on operation-undo? +

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.

What risk level is operation-undo? +

operation-undo is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.

Can I rate-limit operation-undo? +

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.

How do I block operation-undo completely? +

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.

What MCP server provides operation-undo? +

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.

// LOOK UP ANOTHER 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 →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.