Skip to main content
Glama

arthas_watch

Monitor method execution in a Java process by defining class and method patterns. Returns results inline or provides a job ID for async retrieval.

Instructions

Watch method execution. Runs in background; waits up to awaitMs for completion and returns results inline if done, otherwise returns a job ID. Use arthas_read_log to check output later, arthas_stop_job to stop.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of times to watch (default: 5)
depthNoObject traversal depth
beforeNoWatch before method execution
awaitMsNoWait up to this many ms for inline completion before returning a job ID (default: 5000; pass 0 for pure async)
expressNoOGNL expression (default: {params,returnObj,throwExp})
timeoutNoTimeout in ms
conditionNoConditional expression
exceptionNoWatch only on exception
classPatternYesClass name pattern
methodPatternYesMethod name pattern
Behavior4/5

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

Discloses background execution, awaitMs timeout, inline vs. job ID return, and references OGNL expressions. No annotations provided so description carries burden; lacks mention of read-only nature or side effects.

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?

Two concise, front-loaded sentences that waste no words, covering purpose, async behavior, and follow-up actions.

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 10 parameters and no output schema, the description covers core behavior but omits return format details and parameter explanations beyond what the schema provides.

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 100%, so baseline is 3. The description adds no extra meaning beyond the schema for the parameters, e.g., not explaining OGNL or condition expression semantics.

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 it watches method execution, distinguishes from siblings like arthas_read_log and arthas_stop_job, and explains the inline vs. async behavior.

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?

Provides explicit guidance on using arthas_read_log to check output and arthas_stop_job to stop, but does not differentiate from closely related tools like arthas_trace or arthas_monitor.

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/HeavenC/arthas-mcp'

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