redefine_classes

Hot-swap changed Java classes into a running JVM. Scans a classes directory for .class files modified after sinceTimestamp, matches them against loaded classes in the target JVM, and redefines them using JDI. Returns which classes were redefined and the newest file timestamp (pass as sinceTimesta...

Server Mcp Debugger @debugmcp/mcp-debugger
Category Execute
Risk class High
Parameters 00 required

What redefine_classes does on Mcp Debugger

AI agents invoke redefine_classes to trigger actions in Mcp Debugger. 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 redefine_classes needs a policy

This tool modifies the behavior of a live running JVM by replacing class definitions at runtime. This is an Execute-category action because it triggers external operations (class redefinition in a running process) whose effects depend on the arguments (which classes are loaded).

From the tool's definition Hot-swap changed Java classes into a running JVM... redefines them using JDI... Only works with Java debug sessions.

Questions about redefine_classes

What does the redefine_classes tool do? +

Hot-swap changed Java classes into a running JVM. Scans a classes directory for .class files modified after sinceTimestamp, matches them against loaded classes in the target JVM, and redefines them using JDI. Returns which classes were redefined and the newest file timestamp (pass as sinceTimestamp on next call for incremental updates). Only works with Java debug sessions. It is categorised as a Execute tool in the Mcp Debugger MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.

How do I enforce a policy on redefine_classes? +

Register the Mcp Debugger MCP server in PolicyLayer and add a rule for redefine_classes: 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 Mcp Debugger. Nothing to install.

What risk level is redefine_classes? +

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

Can I rate-limit redefine_classes? +

Yes. Add a rate_limit block to the redefine_classes 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 redefine_classes completely? +

Set action: deny in the PolicyLayer policy for redefine_classes. 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 redefine_classes? +

redefine_classes is provided by the Mcp Debugger MCP server (@debugmcp/mcp-debugger). 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.