Skip to content

MCP Status, Log, Cache and Audit Tools

These tools let a model learn about the engine and its own session, check how channels are running, and read their logs, caches and the MCP audit log. Each returns only what the signed-in user can see in the console.

Engine and session

Tool Returns
get_instance_info This engine's name, version and environment label, the user the model acts as and that user's permissions in each zone, the token's scope and expiry, whether message content is turned on, and the request limits that apply. Its description asks the model to call it first
identify_session Records in the MCP audit log the model and effort level the model reports and, in one sentence without patient details, the task the person asked for. QIE records the values as reported and checks none of them
get_mcp_settings The MCP settings as the Model Context Protocol (MCP) page shows them, read only; administrators only
get_management_api_settings Whether the Management API is on, its port, whether it asks for client certificates, whether it manages users, and its certificate references, read only; administrators only
send_report Sends a report about this session to Qvera support, after the person approves it; see Sending a report to Qvera

Sending a report to Qvera

send_report sends a report about the current session to Qvera support, so Qvera can see how the tools are used and what went wrong. The server instructions ask the model to offer it once when a tool refused or failed in a way it could not work around, or when the person says something did not work as expected, and to call it only when the person agrees.

The model writes the report: what the person asked for, what it tried, which tools refused or failed and how, and what it expected, with every patient detail and any message content replaced by a placeholder such as [patient name]. QIE records the text as the model wrote it and checks none of it. When the client can show a form, QIE shows the person the report and asks whether to send it, with an optional comment, name and reply email. When the client cannot show a form, the model asks the person itself and passes their comment, name and email with the call, but only while Require client confirmation is off; while it is on, which it is by default, such a client cannot send a report. The audit log records which of the two happened.

Besides the model's text and the person's answers, the report carries this engine's system name, version, build and product; the user, the client, the session id, and the model and effort level identify_session reported; and the session's MCP audit entries, exported as Exporting the log describes, with message content left out. When the protocol gives the session no id, the entries are the user's own for the same client from the last 24 hours. The entries are always the caller's own, so any signed-in user may send a report.

QIE sends the report to qvera.com at once and tells the model whether it was accepted; nothing is queued. Qvera receives it by email with the audit entries attached. A report is refused while Allow reports to Qvera is off on the Model Context Protocol (MCP) page, when the session holds more than 50,000 audit entries or its zipped entries weigh more than 20 MB, and when qvera.com cannot be reached. One sign-in can send 5 reports an hour; a report counts once the person approves it, even when qvera.com cannot be reached, and a report the person declines does not count. Each report sent writes a REPORT_SENT entry to the MCP audit log naming its kind and sizes, never its text.

Status

Tool Returns
get_channel_status One channel's status (running, paused, stopped, error, stopping, or disabled when the engine holds no status for it), when it started, its last activity, last message and last error, its message counts and queue counts, whether its error alerts are muted, and the progress of a stop that is under way
get_zone_status The same status for every channel in one zone, by channel name
get_channel_statistics One channel's statistics as the console shows them, per node, and the number of messages it has received

A channel or zone the user cannot view is answered as if it did not exist.

Logs

read_channel_log returns one channel's newest log entries, newest first, at most the Max Log Messages setting in System Configuration. Older entries cannot be read through the MCP. level limits the entries to one level and above. Without it, the tool reads from the channel's own log level up, as the console's Log tab does.

read_engine_log reads the engine's log files and is for administrators only. Called without a file name it lists the files; called with the name of one of them it reads that file. It never takes a path, only a name from the list.

Log text can quote message content, so both tools return it only while Return message content is on (see Message Content and the MCP).

Caches

read_channel_cache returns one channel's cache entries, and read_shared_cache the shared cache entries the user can see: global ones, and those of the zones and channels the user can access. Values are returned only while Return message content is on.

Audit

read_mcp_audit returns MCP audit log entries, newest first, filtered by user, session, client or event type. Administrators see every entry; anyone else sees only the entries that name them. Pass nextBefore back as before for older entries. The page size is at most the Max Page Size set on the Model Context Protocol (MCP) page. While Return message content is off, an entry leaves out what an export leaves out: a refused call's arguments, the task identify_session reported, and the text of a refusal. See MCP Audit Log for what each entry records.

Starting and stopping channels

These tools do what the console's buttons do on a channel, and need a token approved for Read and manage, no configuration changes or Full access: change configuration as you can in the console, and manage rights in the channel's zone. A channel the user cannot view is answered as if it did not exist; one the user can view but not manage is refused.

Tool Does
start_channel Starts a stopped channel with its saved configuration
stop_channel Stops a running or paused channel
pause_channel Pauses a running channel
resume_channel Resumes a paused channel
restart_channel Stops and starts a running channel, so it runs the configuration last saved
run_channel_now Runs the source of a running channel once, as Run Now does

Each returns the channel's status after the request. A channel saved while it runs keeps running what it ran before until it is restarted, which is what restart_channel is for.

For a channel set to manual execution, start_channel, resume_channel and restart_channel take runNow; true also starts one run, the answer the console asks for when such a channel starts.

When QIE refuses a request, for example because the channel is disabled, the call is refused with QIE's own reason.

While a developer license is installed, a start, resume or restart requested through the MCP is not carried out, as the Management API's start request is not. The channel is left as it was, the result says so, and the channel log records the ignored request. Stop, pause and run now work as usual.

Every call is recorded in the MCP audit log before it runs.