Update a JS object
appsmith_update_js_objectUpdate a JS object's full source in Appsmith. Diff new functions against current ones so added, changed, and removed functions are all applied, preventing stale functions from persisting.
Instructions
Replaces a JS object's source. Functions are parsed from the new body and diffed against the current ones, so added, changed and removed functions are all applied — a plain body write would leave deleted functions behind.
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": {
"applicationId": "<applicationId>",
"collectionId": "<collectionId>",
"body": "<body>"
},
"name": "appsmith_update_js_object"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Full new source, of the form "export default { ... }". | |
| collectionId | Yes | JS object id, from appsmith_list_js_objects. | |
| applicationId | Yes | Application id the JS object lives in. |