Create a JS object
appsmith_create_js_objectCreate a new JS object in Appsmith by providing its full source code, application ID, page ID, and name so that exported functions become callable within the application.
Instructions
Creates a JS object from its source. The exported functions are parsed out of the body — Appsmith stores each one separately, and the source alone would produce an object with no callable functions.
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>",
"pageId": "<pageId>",
"name": "<name>",
"body": "<body>"
},
"name": "appsmith_create_js_object"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Full source, of the form "export default { ... }". | |
| name | Yes | JS object name, as referenced in bindings (e.g. JSObject1). | |
| pageId | Yes | Page the JS object belongs to. | |
| applicationId | Yes | Application id. |