Skip to main content
Glama

Update a JS object

appsmith_update_js_object

Update 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesFull new source, of the form "export default { ... }".
collectionIdYesJS object id, from appsmith_list_js_objects.
applicationIdYesApplication id the JS object lives in.
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It usefully discloses the diffing-safety behavior (deleted functions are removed, not just added/updated), which is valuable behavioral context beyond the schema. However, it does not address permissions/auth requirements, error conditions, or side effects like appsmith_publish_application would, leaving some transparency gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single dense, front-loaded sentence that explains both action and the nuanced diff behavior with zero filler. Every clause earns its place, and it fits in roughly one breath of reading.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no output schema and only three parameters (all documented in schema), the description sufficiently covers the important semantic nuance of diff-based updates. The main gap is absence of note about desired behavior on error cases or auth, but for a reasonably straightforward mutation with 100% schema coverage, the completeness is strong.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters. The description adds the key semantic detail that 'body' must include the required 'export default { ... }' wrapper form, which complements the schema's 'Full new source' phrasing. This is baseline-plus but doesn't elaborate on all parameter interactions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Replaces') and resource ('a JS object's source'), making the tool's core purpose evident. It distinguishes from a naive body-write by explaining the function-diffing behavior, which sets it apart from sibling update tools like appsmith_update_query or a plain delete/create pair.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains the diffing mechanism and why it matters (would otherwise leave deleted functions behind), which implies when it's beneficial. However, it does not name explicit alternatives or when-not-to-use conditions, relying on the implied comparison to appsmith_create_js_object and appsmith_delete_js_object instead of stating exclusions directly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Davidgraciano/appsmith-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server