Skip to main content
Glama

add_java_hooks

Destructive

Adds exact Java selectors to an active trace after search_java, using trace-local loader IDs while preserving original return and exception semantics.

Instructions

Add exact Java selectors to the same active trace after search_java. Explicit loader IDs are trace-local and must not be copied between traces. Shared observer dispatch preserves original return/exception semantics.

Input Schema

NameRequiredDescriptionDefault
trace_idYes
selectorsYes
analysis_project_idNoOptional investigation to retain this tool result in. Does not prove target identity or causal relationships.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.6/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=false, destructiveHint=true, openWorldHint=true, and idempotentHint=false, so the safety profile is partly covered. The description adds useful behavior beyond the annotations by stating that shared observer dispatch preserves original return/exception semantics and that loader IDs are trace-local. However, it does not explain what is destroyed or modified in the trace, or what permissions/error conditions apply.

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?

The description is three sentences, front-loaded with the main action, and each sentence carries relevant operational information. The final sentence about observer dispatch is dense but earns its place by clarifying runtime semantics. It could be slightly clearer, but it is appropriately concise.

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?

For a destructive active-trace instrumentation tool with three parameters, no output schema, and low schema description coverage, the description covers the prerequisite and the loader-ID caveat. It still omits what happens after hooks are added, error conditions, and how the nested selector fields are interpreted. It is adequate but not fully complete for correct invocation.

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 only 33%, so the description needs to compensate. It adds meaning for trace_id (same active trace) and loader_id (trace-local, not copied between traces), plus a high-level sense of selectors as 'exact Java selectors'. It does not explain class_name, method, or arg_types, leaving important selector semantics to the schema alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource: add exact Java selectors to the same active trace. It also anchors the action after search_java, which helps separate it from the sibling search/discovery tool. It is not quite a 5 because the relationship between 'Java selectors' and the tool name 'add_java_hooks' remains slightly implicit.

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?

It clearly states the prerequisite 'after search_java' and the constraint that selectors must go to the same active trace. It also warns that explicit loader IDs are trace-local and must not be copied between traces. It lacks explicit when-not-to-use or alternative guidance, so it falls short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools