Skip to main content
Glama

Write implementation model

write_model
Destructive

Write changes of the implementation model into this instance — create, change and delete application groups, applications, categories, edit forms, view pages, controls, database queries and scripts. Read the current model with get_model first. Every item of the three arrays is an object {id, key, changes}, where key names the kind of the entity and changes holds its changed properties — either as a plain object {"name": "…", "dbName": "…"}, which is the shorter form and the one to prefer, or as an array [{"key": "name", "value": "…"}, …]; both are accepted; a newly created entity carries a temporary negative id, which the other items reference and which is resolved while the changes are written. The arrays are applied in the order insert, update, delete and the call stops at the first item that fails — the error then reports how many items were already written and the temporary ids resolved so far (an error after all items were written carries no item key), so that the written ones are not sent again. An item of the delete array with key picker and the id of a control removes the picker of that control — its column assignments are deleted, the query and the picker settings of the control stay. In the text of a RichText control the image placeholders returned by get_model are replaced back with the images of the stored text, in the order they appear; when the text contains placeholders and their number does not match, the write is refused instead of losing the images; a text without placeholders is written as it is and removes the images. An item the server deliberately did not apply — an entity the token owner may not change, or a query sent on its own with its id in the delete array (a query is detached by "dataSource": null on its control) — is listed with its reason in the skipped array of the answer, while the other items are written. User groups and rights groups cannot be deleted here.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "write_model"
  }
}

Input Schema

NameRequiredDescriptionDefault
deleteNoArray of the entities to delete, identified by the id returned by get_model.
insertNoArray of the entities to create; a temporary negative id is assigned to each of them.
updateNoArray of the entities to change, identified by the id returned by get_model.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only say destructive and non-idempotent; the description goes much further by disclosing application order (insert, update, delete), stop-at-first-failure semantics, and exactly what the error reports (item count written, temporary ids resolved). It also explains partial-application behavior via the skipped array and the reasons an item may be skipped, plus the specific side effects of deleting a 'picker' item and of replacing RichText image placeholders.

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

Conciseness4/5

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

The most important facts (what it writes, read with get_model first, item shape, application order) come early, and every paragraph carries operational content. The single dense block and long semicolon-chained sentences about placeholders and skipped items make it harder to scan than it needs to be, but little is actually wasted.

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

Completeness5/5

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

For a destructive, non-idempotent batch mutation with no output schema, an agent needs to know failure and partial-write behavior, and the description supplies it: stop-at-first-failure, what the error reports, how to avoid resending written items, and how skipped items are returned. The edge cases specific to this tool (picker deletion, placeholder/image mismatch refusal) are covered as well.

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

Parameters5/5

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

Although schema coverage is 100% and the baseline would be 3, the description adds substantial meaning the schema does not: each array element is {id, key, changes}, 'changes' accepts either a plain object or a key/value array, the plain-object form is preferred, and new entities use temporary negative ids that are resolved during the write. That is real invocation guidance beyond 'Array of the entities to delete'.

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

Purpose5/5

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

The description opens with a specific verb and resource ('Write changes of the implementation model into this instance') and enumerates exactly what can be created, changed, or deleted: application groups, applications, categories, forms, pages, controls, queries, scripts. That inventory makes it distinguishable from sibling write tools such as write_data or write_user_settings without inspecting their schemas.

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

Usage Guidelines4/5

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

It gives an explicit prerequisite ('Read the current model with get_model first'), which is the key workflow constraint. It also states an exclusion ('User groups and rights groups cannot be deleted here') and explains that setting a query's 'dataSource' to null detaches it rather than deleting it. What's missing is a direct comparison with write_data, which an agent choosing between the two would need.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources