Skip to main content
Glama

attach

Attach to running Java applications to record performance data for CPU, JDBC, JPA, HTTP, and MongoDB subsystems. Connect to JVM processes or Docker containers for comprehensive profiling analysis.

Instructions

Attach to a running JVM by PID or to a JVM inside a Docker container. Records performance data for the following subsystems: cpu, jdbc, jpa, http_server, http_client, mongo_db until check_status is called with 'stopRecording: true'. You can use list_jvms to discover JVMs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidNoThe PID of a local JVM process, or the container PID (NSpid) of a JVM inside the specified container. If a container is specified and this is omitted, the topmost JVM in the container is used.
containerNameOrIdNoThe name or ID of a Docker container. When specified, profiling attaches to a JVM inside this container.
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes key behaviors: recording performance data for specific subsystems until check_status is called with 'stopRecording: true', and attachment options (PID or container). However, it lacks details on permissions, rate limits, or what happens on failure, leaving gaps for a mutation tool.

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 appropriately sized and front-loaded: the first sentence states the core purpose, followed by details on recording behavior and a usage tip. Every sentence adds value without redundancy, making it efficient and well-structured.

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

Completeness3/5

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

Given the tool's complexity (mutation with performance recording) and no annotations or output schema, the description is moderately complete. It covers purpose, usage, and key behavior but lacks details on return values, error handling, or prerequisites, leaving some contextual gaps for an agent to operate effectively.

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 already documents both parameters (pid and containerNameOrId) thoroughly. The description adds no additional parameter semantics beyond what the schema provides, such as usage examples or constraints, meeting the baseline for high schema coverage.

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 tool's purpose: 'Attach to a running JVM by PID or to a JVM inside a Docker container. Records performance data for the following subsystems...' It specifies the verb ('attach'), resource ('JVM'), and scope (local or containerized), distinguishing it from siblings like list_jvms (discovery) or check_status (control).

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 provides clear context for when to use this tool: to attach to JVMs for performance recording, with list_jvms suggested for discovery. It implies usage by mentioning subsystems and check_status for stopping, but does not explicitly state when not to use it or name alternatives like prepare_profiling, leaving some guidance implicit.

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