Skip to main content
Glama
theSharque
by theSharque

trace_method

Build a call tree for any Java method from a JFR recording. Shows who calls the method and the call paths, helping diagnose performance bottlenecks.

Instructions

Builds a call tree for a specific method from a .jfr file. Filters ExecutionSample events to find stack traces containing the given class and method, then aggregates call paths. Use when you want to see who calls a particular method and from where. Limitation: JFR sampling (~10 ms) may miss very fast methods.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filepathNoPath to .jfr file. Shortcuts: 'new_profile' (current, default) or 'old_profile' (previous). Or full path e.g. recordings/new_profile.jfr.new_profile
classNameYesFully qualified class name (e.g. com.example.MyService) or a substring to match. Used to filter stack frames.
methodNameYesMethod name to search for (e.g. processRequest). Matches the method in the stack trace.
eventsNoOptional list of JFR event types to parse. Default: jdk.ExecutionSample. Advanced users can specify other event types.
topNNoMaximum number of call paths (branches) to return in the call tree. Default: 10.
Behavior4/5

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

Describes read-only analysis of a .jfr file, filtering ExecutionSample events, and aggregating call paths. Includes a known limitation about JFR sampling frequency. Without annotations, it relies on description, which is transparent but could explicitly state no modifications are made.

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?

Three sentences succinctly cover purpose, process, use case, and limitation. Every sentence is informative and necessary. No redundant or vague phrasing.

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 no output schema, the description explains the tool's function and limitation. However, it does not describe the output format or type of the call tree (e.g., list of paths, percentages). Missing details on error handling or output structure slightly reduces completeness.

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?

All 5 parameters are documented in the schema (100% coverage), so baseline is 3. The description adds context about the 'events' parameter default and advanced usage, but adds little beyond the schema's own detailed descriptions. No new parameter insights beyond what schema provides.

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?

Description clearly states the tool builds a call tree for a specific method from a .jfr file, using ExecutionSample events. It specifies the verb 'traces' and resource 'method call paths', distinguishing it from sibling profiling tools that analyze threads, memory, or JFR summaries.

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?

Explicitly says 'Use when you want to see who calls a particular method and from where', providing clear usage context. It mentions a limitation (fast methods may be missed) but does not name alternative tools or give when-not-to-use guidance, though siblings offer no direct alternative for method tracing.

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/theSharque/mcp-jperf'

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