Tools API keeps input and output ids across a rename
PATCH /v2/tools/{tool_id} can rename an output or a code input when the request sends the row id from GET. Redactions and other references stay attached. A rename that omits id still returns 422. API inputs stay name-keyed.
GET always returns id on each input and output. The value is null for API inputs. See Tools API.