Tools for agents: Collision-safe JSON field renamer
Rename record fields simultaneously with explicit change reports and no silent destination overwrites.
Connect with MCP
{
"mcpServers": {
"super-agent-tools": {
"url": "https://app.getsupers.com/sites/agent-rename-fields/mcp"
}
}
}Use this URL in any client supporting remote Streamable HTTP MCP. Calls return structured JSON; inputs are processed without persistence.
Call rename_record_fields
Mapping keys are source field names and values are destination field names. All names are exact strings, including empty names, and refer only to top-level fields; dots and slashes are literal. Renames are simultaneous: a->b and b->a swaps values, while a->b and b->c moves original a to b and original b to c without cascading. Missing source fields are ignored and mapping sources absent from every record are reported. A destination collision between any two present source fields, including an unchanged field, rejects the entire call. Two sources may map to the same destination only when they never coexist within a record. Identity renames are allowed and do not count as changes. Values, nulls and nested structures are preserved without coercion; nested keys are not renamed. Records and fields retain source order, though JSON consumers need not preserve object order. Empty record lists and mappings are valid. Non-finite numeric values fail. Input is already parsed JSON, so duplicate keys lost during upstream parsing cannot be recovered; use the strict decoder first when needed. No external storage is read or changed.
Input and output schemas
{
"name": "rename_record_fields",
"title": "Collision-safe JSON field renamer",
"description": "Simultaneously rename top-level object keys across records, preserving values and rejecting per-record destination collisions before returning output.",
"inputSchema": {
"$defs": {
"JsonValue": {}
},
"properties": {
"records": {
"items": {
"additionalProperties": {
"$ref": "#/$defs/JsonValue"
},
"type": "object"
},
"title": "Records",
"type": "array"
},
"mapping": {
"additionalProperties": {
"type": "string"
},
"title": "Mapping",
"type": "object"
}
},
"required": [
"records",
"mapping"
],
"title": "rename_record_fieldsArguments",
"type": "object"
},
"outputSchema": {
"additionalProperties": true,
"title": "rename_record_fieldsDictOutput",
"type": "object"
},
"icons": null,
"annotations": {
"title": null,
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false
},
"meta": null,
"execution": null
}Run the example to see the actual result.
HTTP alternative
POST https://app.getsupers.com/sites/agent-rename-fields/call
Content-Type: application/json
{
"records": [
{
"task_id": "a",
"status": "ready",
"result": null
},
{
"task_id": "b",
"status": "done",
"result": {
"count": 2
}
}
],
"mapping": {
"task_id": "id",
"status": "state",
"unused": "other"
}
}The HTTP and MCP interfaces execute the same implementation. Validation errors are returned explicitly. See the tool notes above for its supported inputs and behavior.