Skip to main content
Glama
theSharque
by theSharque

profile_frequency

Analyze JFR recordings to identify hot methods by counting exclusive leaf stack samples. Pinpoint the most frequently executed code paths in your Java application.

Instructions

Call frequency profile from a .jfr file. Counts methods that appear at the leaf (top) of the stack in ExecutionSample events — i.e. methods that were actively executing when sampled. Returns the most frequently sampled methods (exclusive, not cumulative). Use when looking for hot spots or the most often executed code paths.

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
topNNoMaximum number of top methods by call frequency to return. Default: 10.
Behavior4/5

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

With no annotations, the description carries the full burden. It explains the tool counts leaf methods exclusively from ExecutionSample events and returns most frequently sampled methods. This is a good disclosure, though it could mention that a .jfr file must exist and does not specify permissions 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?

The description is concise: two sentences plus a usage hint. Every sentence provides essential information without redundancy. It is front-loaded and easy to scan.

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 that methods are returned as 'most frequently sampled methods (exclusive, not cumulative).' This is mostly complete, but it doesn't specify the exact format (e.g., list with counts) or handle error conditions. Still adequate for a simple two-parameter tool.

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% for both parameters (filepath, topN), and the description adds no new information beyond what the schema provides. The description mentions 'most frequently sampled methods' which relates to topN but does not elaborate further. Baseline 3 is appropriate.

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 explicitly states it produces a 'Call frequency profile from a .jfr file' and clarifies it counts leaf methods from ExecutionSample events exclusively. This clearly distinguishes it from sibling profiling tools like profile_jfr_file_io or profile_jfr_locks, which cover different aspects.

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 ends with 'Use when looking for hot spots or the most often executed code paths,' providing a clear use case. While it doesn't explicitly state when not to use it, the context from sibling tools implies alternatives for other profiling needs.

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