Skip to main content
Glama

prepare_profiling

Generates a JVM parameter to add to a Java startup command for profiling CPU, JDBC, JPA, HTTP, and more. Recording saves automatically; use check_status to access data.

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. Add it verbatim and do not create or modify any files; the configuration is already set up for you. Run the Java process; the recording is saved automatically when the JVM terminates (or after the optional maximum duration). Then call check_status to access the data - do not load the saved snapshot file yourself.

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?

No annotations provided, so description carries full burden. It explains that the tool returns a 'jvmParameter' and mentions automatic recording saving. Does not mention destructive actions or auth, but overall transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Multiple sentences but each adds essential information. Front-loaded with purpose. Could be slightly tighter but still efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema, but description clearly states the return value (JSON with 'jvmParameter'). Covers prerequisite actions and subsequent steps. Complete for a tool with 2 optional parameters.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. Description adds value by explaining the optional delay and maximumDuration parameters with clear behavior (delay from JVM start, max duration vs termination/stopRecording).

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 prepares a profiling session by retrieving a JVM parameter for specific subsystems (cpu, jdbc, etc.). Distinguishes from sibling tools like create_heap_dump and list_jvms.

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?

Provides step-by-step instructions: retrieve parameter, add to Java process, run, then call check_status. Explicitly tells what not to do (do not create/modify files, do not load snapshot file).

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