Skip to main content
Glama

get_type_usage_summary

Aggregate all usage patterns of a type: instantiations, casts, instanceof checks, type arguments, and annotations. Understand type usage across the codebase.

Instructions

Get comprehensive usage summary for a type across the codebase.

Aggregates all usage patterns in a single call:

  • Instantiations (new Foo())

  • Casts ((Foo) x)

  • Instanceof checks (x instanceof Foo)

  • Type arguments (List)

  • Annotation usages (if annotation type)

Use this to understand how a type is used throughout the project.

Requires load_project to be called first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNameYesFully qualified or simple type name
maxPerCategoryNoMaximum results per category (default 10)
Behavior3/5

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

With no annotations, the description must convey all behavioral traits. It discloses the aggregation of multiple usage patterns and the prerequisite of load_project. However, it omits details about performance, error handling, or whether results are up-to-date. This is adequate but not exhaustive.

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 concise with three short paragraphs, front-loads the purpose, and uses bullet points to list usage patterns. No verbose or redundant sentences.

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 the tool's low complexity (2 params, no output schema), the description adequately covers the aggregation behavior, prerequisite, and pattern types. It does not explain the return structure, but the lack of output schema reduces expectation.

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?

Input schema has 100% description coverage for 'typeName' and 'maxPerCategory'. The description adds no additional meaning beyond the schema, so baseline score of 3 applies.

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: 'Get comprehensive usage summary for a type across the codebase'. It lists specific aggregated patterns (instantiations, casts, instanceof, type arguments, annotation usages), distinguishing it from sibling tools like 'find_type_instantiations' and 'find_casts'.

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 advises using this tool to 'understand how a type is used throughout the project' and mentions the prerequisite 'Requires load_project to be called first'. It implicitly contrasts with individual find tools by offering a single call aggregation, but does not explicitly state when not to use or provide alternative tool names.

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/pzalutski-pixel/javalens-mcp'

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