Skip to main content
Glama

prepare_profiling

Generate JVM parameters to start profiling Java applications for CPU, memory, database, and HTTP performance analysis with stack trace recording.

Instructions

Prepare a profiling session by retrieving a JVM parameter to be added to a Java process call to record performance data with stack traces for the following subsystems: cpu, jdbc, jpa, http_server, http_client, mongo_db. The result is a JSON object containing a 'jvmParameter' to be added (quoted) to the Java process at startup. Call check_status to check the availability of data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
delayNoAn optional recording delay in seconds measured from the jvm start.
maximumDurationNoAn optional maximum recording duration in seconds. If not specified, data will be saved at JVM termination or when check_status is called with 'stopRecording: true'.
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behaviors: it generates a JVM parameter for startup, records specific subsystems, outputs JSON with a quoted parameter, and mentions dependencies on check_status for stopping. However, it doesn't cover potential side effects like performance overhead or system requirements.

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 efficiently structured in two sentences: the first explains the tool's purpose and output, the second provides usage guidance. Every sentence adds value without redundancy, and it's front-loaded with the core functionality.

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 annotations and no output schema, the description does well by explaining the tool's purpose, output format (JSON with jvmParameter), and relation to check_status. It covers the essential context for a preparation tool, though it could mention error cases or prerequisites like JVM compatibility.

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 description coverage is 100%, so the schema fully documents both parameters (delay and maximumDuration). The description adds no additional parameter semantics beyond what's in the schema, but it implies these parameters control recording timing, which aligns with schema descriptions. Baseline 3 is appropriate when schema does the heavy lifting.

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 specific action ('prepare a profiling session'), resource ('JVM parameter'), and scope ('subsystems: cpu, jdbc, jpa, http_server, http_client, mongo_db'). It distinguishes from siblings by focusing on session preparation rather than monitoring (check_status), analysis (expand_performance_hotspot), or data retrieval (get_performance_hotspots).

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool ('to record performance data with stack traces') and provides a clear alternative ('Call check_status to check the availability of data'), distinguishing it from the sibling tool check_status. It also implies usage at JVM startup rather than during runtime.

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/ej-technologies/jprofiler-mcp'

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