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...
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.
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.
Attacks that exploit this kind of access
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.
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.
redefine_classes 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 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.
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.
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.
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 →