Create or update Codex part
save_partCreate or update a complete Codex part with terminals, ratings, and block data; pass part_id to revise an existing part and replace its terminal list.
Instructions
Create a Codex part, or update one you own (pass part_id). A part must be complete: name, manufacturer, part number, category, description and at least one terminal (accessory parts, block.kind accessory, need none). Terminal blocks (category terminal) carry block data and per-terminal level/side; terminals can carry load_a / rated_a current data, and protective parts (fuse, breaker) list their allowed trip_ratings. Passive parts (category resistor, capacitor, inductor or diode) with exactly two terminals and no connectors draw on the schematic as inline glyphs, not blocks. Ask the user for datasheet values rather than guessing. On update the terminal list REPLACES the existing one, so include every terminal (use add_part_terminals to just add some). Free users' parts are always public; Pro parts default to private. Pass team (name or id) to create it in that team's Codex (team-only; any editor in the team can edit it later). A part using one of your own signal types in a team needs that signal type in the team too.
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": {
"name": "<name>",
"manufacturer": "<manufacturer>",
"part_number": "<part_number>",
"category": "<category>",
"description": "<description>"
},
"name": "save_part"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| team | No | New parts: team or class whose Codex it goes in. Ignored on update (a part stays where it is). | |
| block | No | ||
| public | No | ||
| part_id | No | ||
| category | Yes | One of: device, plc, psu, battery, relay, terminal, estop, io, hmi, breaker, motor, sensor, resistor, capacitor, inductor, diode | |
| terminals | No | ||
| connectors | No | Gender / keying per connector named by the terminals. Omit to keep what's stored. | |
| slot_count | No | PLCs: number of I/O module slots | |
| description | Yes | ||
| part_number | Yes | ||
| manufacturer | Yes | Manufacturer name, short code or id (see list_manufacturers) | |
| trip_ratings | No | Protective parts (fuse, breaker): trip ratings in A it can be set to, e.g. [1, 2, 4, 6, 10]. null or [] clears it; omit to keep what's stored. |