Rename components by pattern
bulk_renameRename multiple components in a library using regex pattern matching. Supports capture groups for flexible renaming, like transforming 'RESC(.*)' to 'RES_$1'. Use dry-run to preview changes.
Instructions
Rename multiple components in a library using regex pattern matching. Supports capture groups for flexible renaming (e.g., 'RESC(.*)' -> 'RES_$1').
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filepath": "<filepath>",
"pattern": "<pattern>",
"replacement": "<replacement>"
},
"name": "bulk_rename"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | If true, show what would be renamed without making changes (default: false) | |
| pattern | Yes | Regex pattern to match component names (e.g., '^RESC(.*)$') | |
| filepath | Yes | Path to the library file (.PcbLib or .SchLib) | |
| replacement | Yes | Replacement string with optional capture groups (e.g., 'RES_$1') |