Skip to main content
Glama

change_signature

Change function or method signatures by adding, removing, or reordering parameters, updating call sites across the project. Dry run preview shows changes before applying.

Instructions

Change a function or method signature — add, remove, or reorder parameters — updating every certain call site across the project. Point at the function name (0-based LSP line/character, UTF-16 units) and pass operations, a list applied in order: {action:'add', name, index?, default?, value?} (default is the parameter's default expression; value is what existing call sites should pass), {action:'remove', name or index}, {action:'reorder', order:[names or indices covering every parameter]}. For methods, parameter lists include self (index 0). across_class_hierarchy applies the change to matching overrides. Defaults to a Dry Run preview; set apply=true to write. Uncertain call sites are reported as uncertain_occurrences, never silently edited. Locate the function with your LSP first; this tool only changes code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYes
lineYes
rootNo
applyNo
characterYes
operationsYes
expected_symbolNo
across_class_hierarchyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description carries full behavioral burden. It fully discloses the dry-run default, the apply=true switch, handling of uncertain call sites, and the across_class_hierarchy behavior. This is exceptional transparency, especially for a mutation tool.

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 dense but every sentence adds necessary information: purpose, operation syntax, LSP coordinates, self handling, hierarchy support, dry-run behavior, and LSP prerequisite. There is no filler, and the structure flows logically from main action to details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (multiple operations, optional parameters, LSP dependency), the description is remarkably complete. It covers all critical aspects for an agent to use it correctly, and the presence of an output schema means return-value details are not required in the description.

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 0%, and the description compensates thoroughly for the core parameters: line/character units, operations structure with add/remove/reorder semantics, and default vs. value. It omits root and expected_symbol, which are auxiliary optional params, but the critical ones are well described.

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 specific verb ('Change') and resource ('function or method signature'), and enumerates the operations (add, remove, reorder parameters). This distinguishes it from sibling tools like rename or move, which target different refactorings.

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 provides clear context on how to invoke the tool, including LSP coordinates and the apply flag, and notes the tool only changes code (implying a preceding LSP lookup). It does not explicitly name alternative tools for when not to use it, but the operations are specific enough to imply applicability.

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/andrewesweet/ropey'

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