Skip to main content
Glama

search_java

Read-onlyIdempotent

Search loaded Java classes and declared methods in an active trace, report trace-local classloader identities and truncation, and inventory classes with an empty query.

Instructions

Search loaded Java classes and optionally declared methods in an active trace; reports trace-local classloader identities and explicit truncation. An empty query inventories loaded classes. Discovery does not itself install hooks.

Input Schema

NameRequiredDescriptionDefault
limitNo
queryYes
offsetNo
trace_idYes
loader_idNo
include_methodsNo
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.8/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), so the description's added value is real: it discloses that results carry trace-local classloader identities and that truncation is explicit. That is meaningful behavioral context an agent would not otherwise know. It still omits how query matching works and the shape of paginated results.

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?

Three short sentences, front-loaded with the core action, and each sentence conveys distinct information (scope, empty-query behavior, hook exclusion). The classloader-identity phrase is slightly dense but earns its place by flagging a return-value quirk.

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?

With no output schema and seven parameters, the description does well on purpose and discovery semantics, but it leaves pagination (offset/limit interaction) and parameter-level meaning for most arguments unaddressed. It is adequate to call the tool correctly in the common case but not complete.

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 coverage is only 14%, so the description must compensate, and it partly does: the empty-query semantics clarify `query`, "optionally declared methods" maps to `include_methods`, and "explicit truncation" signals `limit` behavior. However, `offset`, `trace_id`, and `loader_id` are never explained, leaving half the parameters documented by neither schema nor description.

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?

It names a specific verb and resource ("Search loaded Java classes and optionally declared methods") and scopes it to "an active trace", which separates it from static siblings such as search_android_classes. It stops short of naming the sibling it complements, so the differentiation is implied rather than explicit.

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?

"An empty query inventories loaded classes" gives a concrete usage pattern, and "Discovery does not itself install hooks" steers the agent away from treating this as add_java_hooks. There is no explicit statement of when to prefer a static-search sibling, but the runtime-trace framing and the hook exclusion cover most routing decisions.

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