Skip to main content
Glama
theSharque
by theSharque

start_profiling

Initiate JFR profiling on a Java process to capture performance data. Specify PID, duration, and optional preset or custom settings file.

Instructions

Starts JFR on the target PID. Rotates recordings (old_profile.jfr ← new_profile.jfr). Default preset is profile. Optional preset or settingsFile (.jfc, cwd-relative or absolute)—mutually exclusive. Builtin presets may omit socket/I/O/native/locks; use a custom .jfc for jdk.SocketRead/Write, FileRead/Write, JavaMonitorBlocked, jdk.ThreadPark, NativeMethodSample. Then list_jfr_recordings and stop_profiling.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidYesProcess ID of the Java application. Use list_java_processes.
durationYesRecording duration in seconds. Typical: 10–60 quick, 300+ under load.
memorysizeNoJFR buffer size, e.g. 20M. Default JVM buffer applies if omitted.
stackdepthNoStack depth for JFR events. Default 128.
presetNoBuiltin settings name (e.g. profile, default). Effective default when omitted is profile. Mutually exclusive with settingsFile.
settingsFileNoPath to .jfc file (cwd-relative or absolute). Mutually exclusive with preset.
Behavior4/5

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

Describes rotation behavior and mutual exclusivity. With no annotations, it carries behavioral disclosure well but could mention side effects like overwriting old recordings more explicitly.

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?

Concise single paragraph packed with essential information. Every sentence adds value: core action, rotation, presets, customization, follow-up.

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?

Covers key aspects but lacks description of return value or output. For a complex tool with no output schema, describing the result (e.g., recording ID or success status) would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Adds significant value beyond 100% schema coverage: default preset, mutual exclusivity, and event limitations of builtin presets. This helps agents choose between preset and settingsFile.

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?

Clearly states it starts JFR on a target PID and rotates recordings. Differentiates from sibling tools like list_java_processes, stop_profiling, and other profiling variants.

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 guidance on using preset vs settingsFile, their mutual exclusivity, and limitations of builtin presets. Suggests follow-up steps (list_jfr_recordings, stop_profiling). Lacks explicit when-not-to-use compared to sibling profiling tools.

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