MCP Read Tools¶
Three tools read QIE's configuration: list_objects lists the objects of one type, get_object returns one object whole, and get_script returns one script of a channel. Each runs as the signed-in user and returns only what that user can see in the console.
Object types¶
| Type | Object | Who can read it |
|---|---|---|
zone |
A zone | Users who can view the zone |
channel |
A channel, with its nodes | Users who can view the channel's zone |
published_mapping, published_function, dicom_connection, system_variable, ws_connection, db_connection, html_form, ssl_certificate, ssl_private_key, package |
The zone object of that kind | Users who can view the object's zone |
user, role |
A user or a role | Administrators |
system_config |
System Configuration, id live |
Administrators |
A user who can only manage errors in a zone can read its objects as in the console. An object in a zone the user cannot view is answered exactly as if it did not exist, so the model cannot learn that it exists.
list_objects¶
list_objects returns the ids and names of the objects of one type. Objects that belong to a zone need the zone's id in zoneId; zones, users and roles are listed without one, and the zones listed are the ones the user can view.
Results come a page at a time, ordered by name: 50 by default, and at most the Max Page Size set on the Model Context Protocol (MCP) page, 100 by default. When more remain, the result carries nextCursor; the model passes it back as cursor, with the same type and zone, for the next page. A cursor used with another type or zone is refused.
get_object¶
get_object returns one object with every field the console's own read returns, by its field name, plus:
$type, the object's type.$revision, a revision token the model sends back when it saves the object, so QIE can refuse a save made from an out-of-date read. QIE never shows the object's internal version number.- A node's pass and fail links name each linked node by its
idand its number,index, rather than repeating the node. - A mapping node's published mapping as
{"id", "name"}, a reference to it, rather than a copy of its functions;get_objecton the published mapping reads them. $kindon every mapping function and condition in a channel or published mapping, naming its kind, such asmapping_function.customorcondition.standard, because no field of theirs holds it.describe_typewith the kind gives its fields.
Passwords and other credentials are never returned. A secret field reads {"$secret": "set"} or {"$secret": "unset"}, and a private key is never returned at all.
A channel comes without its scripts and without anything that can hold message content. Each is replaced by a placeholder that says what was left out and how long it is:
The kinds are script, cacheValue (a channel cache value), sampleBody (a sample message) and scriptVariableValue (a script variable's value). Scripts are read one at a time with get_script. Cache values, sample messages and script variable values are returned only by the tools that read message content, and only while Return message content is on.
A zone carries the users and roles that hold permissions in it. Users and roles are for administrators, so for anyone else the zone's users and roles each read {"$omitted": "administratorOnly"}.
get_object is not limited by the Read Cap (bytes) setting, because an object read for editing must arrive whole. An object larger than the qie.largeMessageLimit Java option, 3 MB by default, is refused; edit it in the console.
find_usages¶
find_usages lists where one zone object is used: a channel, a published mapping or function, a system variable, a database, web service or DICOM connection, an HTML form, a certificate or a private key. It runs the console's own Find Usages search and returns each usage with its zone, its channel and its place, scripts with syntax errors that may use the object, and the channels among the usages, each with its status and restartRequired: true for a running or paused channel, which keeps the version of a published function or mapping it loaded until it is restarted.
Usages in zones the user cannot view are left out, and hiddenUsages says so. complete is false when the search did not finish. The user must be able to view the object's zone.
get_script¶
get_script returns one script of a channel. The model names it by the path of its placeholder in the get_object result, such as /scheduledScripts/0/scriptEncrypted. A path that does not point at a script placeholder is refused.
A long script comes in parts under the Read Cap (bytes) setting. The result says how many characters it returned and gives nextRange; the model passes it back as range to read on (see MCP Tool Results and Errors).
The order of a channel's nodes and other lists is the same on every read, so a path from one get_object result finds the same script in the next, as long as the channel has not changed.