Skip to main content
Glama

get_di_registrations

Scan Java projects to identify dependency injection registrations including Spring components, configurations, beans, and injection points for comprehensive DI analysis.

Instructions

Find all dependency injection registrations in the project.

USAGE: get_di_registrations() OUTPUT: Components, configurations, beans, and injection points

Scans for:

  • Spring components: @Component, @Service, @Repository, @Controller, @RestController

  • Configuration: @Configuration

  • Bean definitions: @Bean

  • Injection points: @Autowired, @Inject (javax and jakarta)

Returns empty categories for non-Spring projects (does not error).

Requires load_project to be called first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxResultsNoMaximum results per annotation type (default 200)
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by disclosing key behavioral traits: it scans for specific annotation types, returns empty categories for non-Spring projects without erroring, and has a prerequisite (load_project). It doesn't mention rate limits, performance characteristics, or detailed output format, but covers the essential operational context.

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 well-structured with clear sections (purpose, usage, output, scanning targets, behavior, prerequisites). Every sentence earns its place by providing essential information without redundancy. The information is front-loaded with the core purpose stated first.

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 moderate complexity (scanning project for DI registrations), no annotations, and no output schema, the description provides good contextual completeness. It explains what the tool does, what it scans for, its behavior with non-Spring projects, and prerequisites. The main gap is lack of detailed output format description, but it does list the categories returned.

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% (maxResults parameter is fully documented in schema), so the baseline is 3. The description doesn't add any parameter-specific information beyond what's in the schema, but doesn't need to since the schema already provides complete documentation for the single optional parameter.

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: 'Find all dependency injection registrations in the project' with specific resources (components, configurations, beans, injection points) and scanning targets (Spring annotations). It distinguishes from siblings like 'get_project_structure' or 'find_annotation_usages' by focusing specifically on DI registrations.

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?

The description explicitly states when to use this tool: 'Requires load_project to be called first' and provides clear context about its behavior with non-Spring projects. It also distinguishes from potential alternatives by specifying what it scans for, though it doesn't name specific sibling alternatives.

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