patch_class_include
Edits a class's separate include (local types, macros, test classes) outside source/main by replacing exact oldString with newString; run list_class_includes first for includeType.
Instructions
Modify PART of a class's SEPARATE include - local types (CCIMP / 'Local Types' tab), macros, or test classes - none of which live in /source/main (patch_class/update_class cannot reach these). Run list_class_includes FIRST to get the exact includeType string. Reads the include's current source, replaces oldString with newString (must match EXACTLY ONCE), locks the class, PUTs to the discovered include source, unlocks, and optionally activates the class. Refuses to run on production profiles.
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": {
"className": "<className>",
"includeType": "<includeType>",
"oldString": "<oldString>",
"newString": "<newString>"
},
"name": "patch_class_include"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| activate | No | Activate the class after writing. Default false. | |
| className | Yes | Class name, e.g. ZCL_ABL_PLANT_EMAIL | |
| newString | Yes | Replacement text | |
| oldString | Yes | Exact existing text to replace. Must occur exactly once - include enough context to be unique. | |
| transport | No | Transport request. Omit only for local/$TMP objects. | |
| includeType | Yes | Exact includeType reported by list_class_includes for the include you want to edit |