Skip to main content
Glama

Write data

write_data
Destructive

Create or update a record. When updating a non-existent record (id > 0), the record is automatically created. Returns the record id. User groups (susergroups) and rights groups (srightsgroups) can be written as well; the susers table (users) cannot. The system column, which protects built-in records against deletion, cannot be written. Membership of users in user groups and of user groups in rights groups is stored in link tables that are not available through this server. File and Image columns store an attachment id — create the attachment first with create_attachment and write the returned id. Text columns that a new record does not receive are stored as an empty string, as the edit form does; default values of controls are not applied. Set history to true to record the change the same way the user interface does; see the history parameter.

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": {
      "table": "<table>",
      "values": "<values>"
    },
    "name": "write_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoRecord id: 0 = new record (auto-generated id), >0 = update or create if not exists.
tableYesTable name, e.g. ng_invoice.
valuesYesColumn names with values to write (ng_amount, ng_status, etc.). Can be provided as separate 'id' parameter or within 'values' object.
historyNoRecord the change in the change history and let it take part in synchronization, exactly as a change made in the user interface does. Default false — the record is written without any trace in the history. Use true for changes that have to stay auditable or that some part of the platform reacts to, and false for bulk writes such as demo data, where the history would only grow without telling anyone anything.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only state destructive/not-idempotent; the description adds the material behavior an agent cannot infer: id>0 on a missing record silently creates it, the record id is returned, link tables are unreachable, the system column is protected, text columns get empty strings rather than control defaults, and history tracing is opt-in. These are exactly the side effects that matter for a destructive write.

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?

Front-loads the core action and return value, and each subsequent sentence carries a distinct constraint. It is dense and somewhat run-on, with the history behavior repeated from the schema, but nothing is filler.

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?

For a destructive write tool with a nested values object and no output schema, the definition covers auto-creation, return value, protected tables/columns, attachment prerequisites, and history semantics. Remaining gaps are permission requirements and error/failure behavior on invalid tables or type mismatches.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3, but the description adds real meaning for values: File/Image columns must hold an attachment id obtained from create_attachment, and the history flag's semantic split (audit trail vs bulk writes) is explained in context. The history explanation largely restates the schema description, which keeps this below a 5.

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?

Opens with a specific verb+resource ("Create or update a record") and then bounds the scope precisely: user groups and rights groups are writable, the susers table and the system column are not. This tells an agent exactly what surface the tool covers, which is more than the name 'write_data' conveys.

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?

Gives concrete conditional routing: create the attachment with create_attachment first for File/Image columns, and use history=true for auditable changes versus false for bulk/demo writes. It does not address when to prefer this tool over write_model or delete_data, so it falls short of fully explicit alternative-selection guidance.

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