Skip to main content
Glama

introduce_parameter_object

Bundle a method's parameters into a new parameter-object class and rewrite the method and all callers to use it.

Instructions

Bundle a method's parameters into a new parameter-object class and rewrite the method and all callers to use it. The class is generated as a member of the declaring type.

USAGE: Position on the method name; optionally name the class and parameter. OUTPUT: editsByFile with all required edits; warnings from JDT's condition checking. Edits are returned as text - apply them yourself.

IMPORTANT: Uses ZERO-BASED coordinates.

Requires load_project to be called first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesPath to source file containing the method
lineYesZero-based line number of the method declaration
columnYesZero-based column number (on the method name)
classNameNoName for the parameter-object class (default: <MethodName>Parameters)
parameterNameNoName for the new parameter (default: parameterObject)
Behavior3/5

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

No annotations provided, so description must disclose behavior. It mentions zero-based coordinates, return format (editsByFile), and JDT warnings. However, it does not explicitly state that the tool modifies files (though it returns edits for manual application) or clarify destructive nature. Adequate but missing important safety context.

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?

Description is concise with separate sections for usage, output, and important notes. No filler sentences, but the structure is slightly fragmented. Still earns its space.

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?

For a complex refactoring tool with no output schema, the description covers key aspects: what it does, how to invoke (position), output format, important coordinate system, and prerequisite. Reasonably complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for each parameter. The description adds value by clarifying that line/column are zero-based, column is on method name, and providing default names for className and parameterName. This goes beyond schema alone.

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?

Clearly states the tool bundles method parameters into a new class and rewrites method and callers. The verb 'bundle' and resource 'parameter-object class' are specific, and the description distinguishes it from sibling refactoring tools like extract_method or change_method_signature.

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?

Provides explicit usage instructions: position on method name, optionally name class/parameter, and requires load_project first. Lacks explicit when-not-to-use or alternative tool references, but context from sibling list helps.

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