Skip to main content
Glama

redefine_classes

Hot-swap modified Java .class files into a running JVM during a debug session. Scans a classes directory for changes, matches them to loaded classes, and redefines them via JDI for incremental updates.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYes
classesDirYesAbsolute path to compiled classes directory (e.g. build/classes/java/main/)
sinceTimestampNoUnix timestamp (ms). Only redefine .class files modified after this time. 0 or omitted = all files.
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses the hot-swap mechanism, file scanning based on timestamps, matching against loaded classes, and the return format. It also describes the incremental update pattern. It does not mention limitations like redefinition failures or performance impacts, but the disclosure is solid.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the main purpose. Every sentence adds necessary information without redundancy. It is highly efficient.

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?

Given the tool has three parameters, no output schema, and no annotations, the description explains the process, return value, and usage pattern adequately. It mentions the scope (Java debug sessions) and how to use incrementally. It does not cover error conditions, but for an agent deciding whether to call this tool, it provides sufficient context.

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 coverage is 67% (two of three parameters have descriptions). The tool description adds the incremental update pattern for sinceTimestamp and gives an example for classesDir. However, it does not add substantial meaning for sessionId beyond what the schema implies. Baseline is 3 due to moderate schema coverage, and the description provides marginal extra value.

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?

The description clearly states the tool's purpose: hot-swap changed Java classes into a running JVM. It specifies the action (redefine), resource (Java classes), and mechanism (scan directories, match against loaded classes). This clearly distinguishes it from sibling tools which are debug session management and stepping operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states 'Only works with Java debug sessions,' providing clear context. It does not explicitly give when-not-to-use or name alternatives, but the sibling tools list makes the differentiation obvious. Some guidance on prerequisites could improve this score.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/debugmcp/mcp-debugger'

If you have feedback or need assistance with the MCP directory API, please join our Discord server