Skip to main content
Glama

Get model history

get_model_history
Read-onlyIdempotent

Return the change history of a script, of a database query or of the code of an HTML or JavaScript control as JSON, read-only — the saved versions, newest first, each with its history id, date, the user who saved it and the complete text as it was after that save. A script is returned as a text listing of its steps, a query as a text listing of its definition, the code of a control verbatim. Address the object by the ids returned by get_model: form together with event for the script of an edit form event, formcontrol for an edit form control, viewpagecontrol for a view page control, query for a database query (the id of a dataSource, valuesQuery or of any other query object — returned only without depth 'structure'). An HTML or JavaScript control returns the history of its code, any other control the history of its script (typically a Button). A version is recorded whenever the script, the query or the code is saved with a change, in the designer as well as by write_model; an empty value means that the script or the code was removed. Compare neighbouring versions to find out what a change did; total tells how many versions exist and more whether older ones follow.

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": "get_model_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
formNoEdit form id as returned by get_model. Together with event it addresses the script of an edit form event.
eventNoEvent of the edit form, required with form: onBeforeOpen, onAfterOpen, onBeforeSave, onAfterSave, onBeforeDelete or onAfterDelete — the keys of the scripts in get_model.
limitNoOptional maximum number of returned versions, 1 to 50. Defaults to 10.
queryNoId of a database query as returned by get_model.
beforeNoOptional history id: only versions older than it are returned. Pass the id of the oldest returned version to read further back.
formcontrolNoId of an edit form control as returned by get_model.
viewpagecontrolNoId of a view page control as returned by get_model.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and non-destructive, so the safety profile is covered. The description adds genuinely non-obvious behavior: what counts as a version (recorded only on save with a change, in the designer as well as by write_model), that an empty value means removal, ordering, and the total/more pagination fields. Return-format framing is a real bonus given there is no output schema.

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?

Purpose and output shape are front-loaded, and most clauses carry distinct information. It is a dense run-on that partly restates the form/event schema text, so trimming is possible, but little is pure waste.

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?

With no output schema, the description carries the burden of describing returned fields (history id, date, user, full text, total, more) and does so, plus the versioning and removal semantics an agent needs to interpret empty values. Nothing essential is missing for correct invocation.

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 the baseline is 3, but the description adds meaning beyond it: how form and event combine to address an event script, and that query accepts a dataSource, valuesQuery or any other query object and only returns results without depth 'structure'. That conditional behavior is not expressed in the schema.

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?

States a specific verb and resource ('return the change history of a script, of a database query or of the code of an HTML or JavaScript control') and immediately distinguishes the output shape (versions newest first with id, date, user, text). An agent can tell this apart from get_model (current state) without opening the schema.

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?

Explains how to address the target object via ids from get_model and how to page backwards with 'before', and notes that comparing neighbouring versions reveals what a change did. It stops short of an explicit 'use get_model for the current state, this for history' exclusion, but the context is clear enough to select correctly.

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