Skip to main content
Glama

rename_function_parameter

Destructive

Rename a Blueprint function parameter and register a redirect so call-site pins update, preventing orphaned old pins that silent compiles can miss.

Instructions

Rename a PARAMETER of a Blueprint function graph -- the parameter counterpart of rename_bp_variable, and the only headless way to do it: add_function_parameter only ADDS, there is no remove_function_parameter, so "delete and re-add" is not even available. It renames the pin on the Entry node and on EVERY Result node of the graph, and registers a CoreRedirect so that call sites re-map themselves. That redirect is not a nicety: it is what stops this from being a PHANTOM PIN FACTORY. With the redirect, the call site's pin takes the new name AND KEEPS ITS LITERAL VALUE; renamed WITHOUT one, the old pin stays alive and ORPHANED on the caller. WARNING: that orphan is silent: it survives compiles that report num_errors:0 -- so compile_blueprint is NOT the oracle here. The oracle is get_graph_nodes(compact=false) on the callers, checking that NO pin still carries the old name. The redirect matches on Class.Function.Param, so it reaches callers that merely CALL the function (K2Node_Message included) without implementing its interface, and dependents that are not even loaded -- both of which rename_bp_variable cannot reach. It does NOT rename anything that names the parameter as TEXT (a DataTable cell, a saved game, Python). Run compile_blueprint afterwards and save_asset on this Blueprint AND on every caller. AND THE COMPILE IS NOT THE END OF IT: what reaches the .uasset is UserDefinedPins, not the EdGraphPins you read back -- a rename checked only on the latter can report renamed:true, compile at num_errors:0, be saved and COMMITTED, and still come back as the OLD name the next time the editor starts. So it also reports entry_user_pins_after/result_user_pins_after (the serialized side, legitimately EMPTY on an interface-override graph) and refuses to claim success while any UserDefinedPin still carries the old name. The end-to-end oracle is still disk: save_asset -> reload_asset_package -> get_function_pins.

Returns: { blueprint_name, function_name, old_name, new_name, renamed: bool, terminals_renamed: [string], entry_pins_after: [string], result_pins_after: [string], entry_user_pins_after: [string], result_user_pins_after: [string], redirect_registered: string, redirect_persisted_to: string|null, referencers_loaded: [string], must_compile_and_save: [string], warning: string } -- the *_user_pins_after pair is the SERIALIZED side (UserDefinedPins): empty on an interface-override graph is normal, but the old name appearing there is the rename that will revert on restart.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNoOptional. This command is REFUSED while a Play-in-Editor session is running: it either compiles a Blueprint (the reinstancer can retain a world, and CheckForWorldGCLeaks is Fatal -- it KILLS the editor) or writes to disk (Editor.AllowSavingAssetsDuringPIE=0 makes the engine refuse the write, so it would report success without writing a byte). Stop PIE and retry instead; force=true runs it anyway, at your own risk.
new_nameYesNew parameter name. Must be free on the terminal nodes; a collision is refused up front via the engine's own dry-run, before anything is touched.
old_nameYesCurrent parameter name, matched on the Entry node and on every Result node. A name present on only one of them is fine.
function_nameYesName of the function graph (an interface's own function graph and an interface-override graph both work).
blueprint_nameNoBlueprint asset name or path owning the function graph.
blueprint_pathNoAlias of `blueprint_name` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `blueprint_name`.
write_redirectNoOptional bool (default true). Also PERSIST the redirect as a +PropertyRedirects line in Config/DefaultEngine.ini, so it survives a restart and reaches the other machine. With false the redirect is registered in memory only and the rename EVAPORATES for anyone who opens the project later.
load_referencersNoOptional bool (default true). Load the Blueprints the Asset Registry lists as referencers BEFORE renaming, so their nodes reconstruct in this session instead of the next one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations (destructive=true, idempotent=false) only flag the safety profile; the description adds substantial hidden behavior: CoreRedirect registration and its match key, the silent orphan-pin failure that survives num_errors:0 compiles, the UserDefinedPins vs EdGraphPins serialization trap that reverts on restart, and why compile_blueprint is not the oracle. This is far beyond what structured fields convey.

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?

Content is high-value and front-loaded (purpose, then alternatives, behavior, warning, returns), and each block carries real information rather than filler. However the all-caps shouting and dramatic metaphor ('PHANTOM PIN FACTORY') inflate the length beyond what the density requires.

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?

Despite no output schema, the description enumerates the full return shape and explains the meaning of the *_user_pins_after fields (serialized side, empty on interface overrides is normal). Combined with the behavioral warnings and required follow-up steps, an agent has everything needed to call it safely.

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% and each parameter (force, write_redirect, load_referencers, blueprint_path alias) is already richly documented in the schema itself. The description adds little per-parameter meaning beyond reinforcing the redirect-persistence caveat, so the baseline 3 is appropriate.

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?

Opens with a precise verb+resource ('Rename a PARAMETER of a Blueprint function graph') and immediately positions it against siblings: rename_bp_variable's counterpart, and distinct from add_function_parameter which only adds. An agent can distinguish it from every neighbor without opening a schema.

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?

States when to use it (no remove_function_parameter exists, so delete-and-re-add is unavailable), names the related sibling rename_bp_variable and the reach difference, and gives explicit when-not boundaries (does not touch TEXT-referenced names like DataTable cells, saved games, Python). Prerequisites (stop PIE) are also covered.

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