@iris-mcp/dev
IRIS Development Tools MCP Server -- ObjectScript document CRUD, compilation, SQL execution, analysis, and performance advisories, globals management, code execution, unit testing with line coverage (a verdict against a target, and a Cobertura file for CI), package browsing, bulk export, lines-of-code analysis, and cross-profile environment diff & promotion via the Model Context Protocol.
Part of the IRIS MCP Server Suite.
Installation
npm install -g @iris-mcp/dev
Or run directly without installing:
npx -y @iris-mcp/dev@1
Configuration
All servers use the same environment variables:
| Variable | Default | Description |
|---|
IRIS_HOST | localhost | IRIS hostname or IP |
IRIS_PORT | 52773 | IRIS web server port |
IRIS_USERNAME | (required) | IRIS username. There is no default: a server that starts without it fails, naming the variable. |
IRIS_PASSWORD | (required) | IRIS password |
IRIS_NAMESPACE | USER | Default IRIS namespace |
IRIS_HTTPS | false | Use HTTPS instead of HTTP |
IRIS_ACCEPT_LANGUAGE | en-US,en;q=0.9 | Optional. Accept-Language header sent on every request, pinning %Status error text to a predictable language instead of whatever locale an unspecified header resolves to. IRIS also chooses the message language per request, by matching this header against the languages the instance has, so a localized prefix can still appear when the header names one — existing prefix-stripping is unaffected. Details: suite README. |
Multiple servers & the server parameter
Optionally, set IRIS_PROFILES (a JSON map of named IRIS instances) and IRIS_GOVERNANCE (a JSON tool-action policy) to target several instances from one server and restrict which actions are allowed. Every tool accepts an optional server parameter (a profile name from IRIS_PROFILES) that selects which instance the call targets; omit it to use the default profile. It composes with the existing per-call namespace override. Both variables are optional and additive — omit them and this server behaves exactly as a single-instance, fully-enabled install. Full model, escaping, and worked examples: Multiple Servers & Governance.
Optionally, set IRIS_GOVERNANCE_FILE to the path of a JSON file of the same shape as IRIS_GOVERNANCE to load policy from a file shared across several MCP clients instead of inline JSON. Optional and additive — unset (the default) means inert: no file is ever read and behavior is byte-for-byte unchanged. An IRIS_GOVERNANCE env value always wins over the file. Details: Governance file.
Read-only mode (IRIS_GOVERNANCE_PRESET)
Set IRIS_GOVERNANCE_PRESET=read-only to block every write-classified action on this server with one environment variable — no IRIS_GOVERNANCE JSON needed. IRIS_GOVERNANCE_PRESET is framework configuration, not a tool — it applies identically across all five servers in the suite (@iris-mcp/dev included), not something this package registers or exposes. An explicit IRIS_GOVERNANCE override still wins over the preset. Omit (or set "full") for today's behavior (opt-in, default off). Details: Read-only mode.
Tool Visibility (IRIS_TOOLS_PRESET)
Set IRIS_TOOLS_PRESET=core to trim this server's tools/list to a 15-tool runtime roster (14 package tools + iris_server_profiles; about 13 is a guideline, not a hard limit) — the authoring loop (get/edit/put/list/compile/load), the execution & debug loop (command/classmethod/tests, global get/set/kill), and the SQL tools iris_sql_execute and iris_sql_query. iris_doc_get and iris_doc_edit are a pair and stay co-visible in every preset, and so are iris_test_coverage and iris_test_status (both outside core). IRIS_TOOLS_PRESET=developer keeps all 33 runtime tools (32 + iris_server_profiles) visible — every tool on this server is already dev-relevant, so developer behaves like full here. Omit (or set "full") for today's behavior — every tool visible, byte-for-byte. IRIS_TOOLS_DISABLE/IRIS_TOOLS_ENABLE hide/force-show individual tools independent of the preset. This is orthogonal to IRIS_GOVERNANCE_PRESET above (visibility = does the agent know a tool exists; governance = is an already-visible call allowed). Full model, exact per-tool roster, and the payload-size measurements: Tool Visibility Presets.
Prompt-pack limitation. Two of this server's prompts call tools core hides: diagnose-slow-query calls iris_sql_analyze (hidden under core), and promote-environment-change calls iris_env_diff/iris_env_promote (both hidden together under core — they are always co-visible). Both prompts work unchanged under full or developer. Running under core, either switch to full/developer or set IRIS_TOOLS_ENABLE to re-show the specific tool(s) the prompt needs.
Audit Logging (IRIS_AUDIT_LOG)
For regulated deployments, set IRIS_AUDIT_LOG=/path/to/audit.jsonl to record every MCP tool call this server handles — success, error, or governance denial — as one secrets-free JSON line (session, sequence, tool, action, outcome, redacted parameter keys). It is off by default (unset ⇒ a mechanical no-op, zero filesystem writes) and framework-wide — the same interceptor covers every tool on this server. IRIS_AUDIT_LOG_MAX_MB (default 50) sets the single-generation rotation size; IRIS_AUDIT_LOG_PARAMS=true additionally records (redacted) parameter values. Because it is server-side configuration — not a governed tool action — an AI client cannot disable its own audit trail; only an operator with server-environment access can. Full record shape, redaction rules, and how it differs from IRIS's own iris_audit_* security-audit tools: Compliance & Auditability.
Server Manager connections (IRIS_SERVER_MANAGER)
Set IRIS_SERVER_MANAGER=auto to import IRIS connection definitions straight from the InterSystems Server Manager VS Code extension's intersystems.servers settings — one curated roster instead of re-typing host/port/username into every MCP client's config. IRIS_SERVER_MANAGER is framework configuration, not a tool — it applies identically across all five servers in the suite. Omit (or set "off", the default) for today's behavior: no settings file is ever read. A password-less imported definition is completed via an OS-keychain / IRIS_CREDENTIAL_HELPER credential chain (see the iris-mcp-credentials CLI — Server Manager passwords themselves are never readable outside VS Code, by design); iris_server_profiles reports where each profile's connection fields came from via source ("env"/"server-manager") and sourceFile. The companion variables are all optional, each with its own default: IRIS_SM_SERVERS (unset — import all), IRIS_SM_SETTINGS_PATHS (unset — normal discovery), IRIS_SM_WORKSPACE (unset — the process CWD) and IRIS_CREDENTIAL_HELPER (unset). Full model, discovery precedence, and the SecretStorage boundary explained plainly: Server Manager connections.
MCP Client Configuration
Claude Code (.mcp.json)
{
"mcpServers": {
"iris-dev-mcp": {
"command": "npx",
"args": ["-y", "@iris-mcp/dev@1"],
"env": {
"IRIS_HOST": "localhost",
"IRIS_PORT": "52773",
"IRIS_USERNAME": "_SYSTEM",
"IRIS_PASSWORD": "SYS",
"IRIS_NAMESPACE": "USER"
}
}
}
}
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"iris-dev-mcp": {
"command": "npx",
"args": ["-y", "@iris-mcp/dev@1"],
"env": {
"IRIS_HOST": "localhost",
"IRIS_PORT": "52773",
"IRIS_USERNAME": "_SYSTEM",
"IRIS_PASSWORD": "SYS",
"IRIS_NAMESPACE": "USER"
}
}
}
}
Cursor
Add to your Cursor MCP settings:
{
"iris-dev-mcp": {
"command": "npx",
"args": ["-y", "@iris-mcp/dev@1"],
"env": {
"IRIS_HOST": "localhost",
"IRIS_PORT": "52773",
"IRIS_USERNAME": "_SYSTEM",
"IRIS_PASSWORD": "SYS",
"IRIS_NAMESPACE": "USER"
}
}
}
Note: Replace "SYS" with your actual IRIS password. Avoid committing real credentials to version control.
Tool Reference
Framework Tools
Provided by the shared framework and available on every suite server (Epic 19).
| Tool | Description | Key Parameters | Annotations |
|---|
iris_server_profiles | Call this first. Reports the configured server-profile roster (non-secret connection metadata — password is never included) and the effective governance policy (which actions are enabled/disabled). | profile?, allProfiles? | readOnly, idempotent |
iris_server_profiles is a read tool, enabled by default. It reports in-memory config and does not connect to IRIS. Use it to choose the right server profile and avoid governance-disabled actions before invoking other tools.
Document Tools
| Tool | Description | Key Parameters | Annotations |
|---|
iris_doc_get | Retrieve a document by name (UDL or XML format), or a numbered line range of a UDL text document | name, namespace?, format?, metadataOnly?, startLine?, endLine? | readOnly, idempotent |
iris_doc_put | Debug/scratch — write a document directly to IRIS without creating a file on disk (use iris_doc_load for production code). An existing document is saved only if it has not changed since the tool read its current version; a put to an existing class that drops one of its Storage definitions is refused | name, content, namespace?, ignoreConflict? (default: false; skips the version check), allowStorageRegeneration? (default: false; lets a put that drops Storage definitions through) | destructive, idempotent |
iris_doc_edit | Surgical line edits of an existing class, routine or include file: insert, delete or replace lines addressed by the numbers of a ranged iris_doc_get, each guarded by its expected text; all edits apply or none, in one version-checked save, and the answer (a unified diff, an excerpt per edit, totalLines, ts) comes from a re-read. Does not compile. apply is a write that is enabled by default (Project Lead decision S-3: every edit is guarded by expected, the save is version-checked and never retried, and a class edit that would drop a Storage definition is refused); disable it with {"global": {"iris_doc_edit:apply": false}}, or by disabling iris_doc_put. regenerateStorage (the Storage-guard override) is disabled by default | action (apply | regenerateStorage), name, edits (each: op, afterLine?, startLine?, endLine?, text?, expected), namespace? | destructive |
iris_doc_delete | Delete one or more documents | name (string or array), namespace? | destructive, idempotent |
iris_doc_list | List documents with optional filters | category?, type?, filter?, generated?, namespace?, modifiedSince? (refused: IRIS cannot filter documents by modification time, so a call with a non-empty value is refused and lists nothing; compare the ts of the listed documents instead), cursor? | readOnly, idempotent |
iris_doc_load | Bulk upload files from disk into IRIS | path (glob), baseDir?, compile?, flags?, namespace?, ignoreConflict? (default: true: each file overwrites its server copy without a version check; false: a file whose document already exists is saved under a version check, and fails with DOCUMENT_CONFLICT if the document changes on the server while it is being saved, while the other files continue), allowStorageRegeneration? (default: false: a class file whose content drops one of the Storage definitions the existing class has is refused as a failures entry with STORAGE_DROPPED, nothing is stored for that file and the other files continue; true: the file is uploaded, IRIS generates new storage at the next compile, and the result's storageDrops names the dropped definitions) | destructive, idempotent |
iris_doc_export | Bulk-download documents to a local directory (inverse of iris_doc_load) | destinationDir, prefix?, category?, type?, generated?, system?, modifiedSince? (refused, as for iris_doc_list), namespace?, includeManifest?, ignoreErrors?, useShortPaths?, overwrite?, continueDownloadOnTimeout? | destructive, idempotent |
Package Browsing Tools
| Tool | Description | Key Parameters | Annotations |
|---|
iris_package_list | Roll up namespace documents into packages at a chosen depth | depth?, prefix?, category?, type?, generated?, system?, modifiedSince? (refused, as for iris_doc_list), namespace? | readOnly, idempotent |
Compilation Tools
| Tool | Description | Key Parameters | Annotations |
|---|
iris_doc_compile | Compile one or more documents | doc (string or array), flags?, async?, namespace? | idempotent |
Code Intelligence Tools
| Tool | Description | Key Parameters | Annotations |
|---|
iris_doc_index | Get class structure (methods, properties, superclasses) | name, namespace? | readOnly, idempotent |
iris_doc_search | Search across code with regex/wildcard options | query, regex?, word?, case?, wild?, files?, sys?, gen?, max?, namespace? | readOnly, idempotent |
iris_macro_info | Look up macro definitions and source locations | name, document?, includes?, namespace? | readOnly, idempotent |
iris_routine_intermediate | Fetch the compiled-intermediate routine (.1.int) for a class by its bare name — macro-expanded form IRIS executes at runtime | name, namespace?, format? | readOnly, idempotent |
Format and Export Tools
| Tool | Description | Key Parameters | Annotations |
|---|
iris_doc_convert | Convert document between UDL and XML | name, targetFormat, namespace? | readOnly, idempotent |
iris_doc_xml_export | Export, import, or list documents in XML format. Import loads definitions WITHOUT compiling by default (the response says so); pass compile: true to compile in the same call. An import that would drop a Storage definition an existing class has (its XML lacks it) is refused with STORAGE_DROPPED before anything is loaded | action, docs?, content?, compile?, flags?, namespace?, allowStorageRegeneration? (default: false: the import is refused if the XML of an existing class lacks one of the Storage definitions the class has; true: the import goes ahead, IRIS generates new storage at the next compile, and the result's storageDrops names the dropped definitions; import only) | destructive (import), not idempotent |
SQL Tools
| Tool | Description | Key Parameters | Annotations |
|---|
iris_sql_execute | Execute a SQL statement with parameterized values; optionally read-only (readOnly, default false), capped by rows affected (maxRowsAffected, default no cap; 0 is a dry count), or count-only (countOnly, default false) | query, parameters?, maxRows?, readOnly?, maxRowsAffected?, countOnly?, namespace? | destructive |
iris_sql_query | Run a SQL query (SELECT only) with parameterized values; read, enabled by default, available under the read-only preset | query, parameters?, maxRows?, countOnly?, namespace? | readOnly, idempotent |
iris_sql_analyze | Analyze SQL: show query plan (explain), parse maps/indexes from the plan (indexUsage), cached-statement stats (stats), currently-running statements (running), or get SQL Performance Advisor findings (advise) | action, query?, filter?, maxRows?, workload?, topN?, namespace? | readOnly, idempotent |
Governance defaults: all five iris_sql_analyze actions (explain/stats/indexUsage/running/advise) are classified read and are therefore enabled by default — none is gated behind IRIS_GOVERNANCE. (A read classification is still required for every new tool key, but reads resolve enabled under the default seed.)
advise — SQL Performance Advisor (Epic 28): given query (or workload: true to advise the top-topN recent statements instead, mutually exclusive with query), returns evidence-cited findings — full-scan, missing-index (with a suggested CREATE INDEX DDL), stale-stats, unused-index, plan-anomaly — each carrying a plan excerpt and a confidence level. Strictly advisory: recommendations are heuristic; verify with explain before applying any change — advise never applies anything itself (no write/applyIndex action ships in v1). topN (default 5, max 20) bounds real analysis work in workload mode, not just output size — each statement analyzed is a full endpoint round-trip (EXPLAIN + dictionary reads), so a larger topN is proportionally more work. If the recent-statement workload source is unavailable on your IRIS edition/version, workload mode returns a clear capability message rather than a raw SQL error.
Governance defaults (SQL): iris_sql_execute keeps its pre-governance classification (a write that is enabled by default, so it is blocked by the read-only preset). iris_sql_query (Story 38.5) is classified read and is therefore enabled by default, and it stays enabled under the read-only preset. Its parent key is iris_sql_execute: when an operator explicitly disables iris_sql_execute, iris_sql_query is disabled too (a GOVERNANCE_DISABLED refusal with inheritedFrom: "iris_sql_execute"), unless iris_sql_query is set explicitly, e.g. {"global":{"iris_sql_execute":false,"iris_sql_query":true}}. See Parent keys.
SQL write safety (optional, opt-in — Story 38.5): iris_sql_execute takes readOnly (default false: only queries run; any other statement is refused with SQL_READ_ONLY before it runs), maxRowsAffected (default: no cap; 0 is a dry count: an INSERT, UPDATE or DELETE that changes more rows is rolled back and refused with SQL_ROWS_AFFECTED_CAP; under a cap only SELECT, INSERT, UPDATE and DELETE run, and an INSERT, UPDATE or DELETE whose text contains the %NOJOURN token (a comment or a string counts) is refused before it runs, because it turns journaling off and the rollback could not undo it; the count is the statement's own row count, so rows that triggers, cascades or functions change are not counted and a SELECT is not bounded by it) and countOnly (default false: returns totalCount and no rows). An operator may set IRIS_SQL_READ_ONLY=true (every call read-only; unset by default) and IRIS_SQL_MAX_ROWS_AFFECTED (a non-negative integer ceiling; unset by default); a call can only tighten them, and the result carries readOnlyForced or maxRowsAffectedCapped when one applied. IRIS_SQL_READ_ONLY accepts true or false (case-insensitive) and IRIS_SQL_MAX_ROWS_AFFECTED a non-negative integer (0 is valid); an empty value counts as unset, and any other value fails startup, naming the variable. Both variables are global: every profile inherits them, and there is no per-profile key. An INSERT, UPDATE or DELETE result carries rowsAffected (-1 for TRUNCATE TABLE). Read-only is statement-level read-only, not side-effect-free: the statement runs inside a transaction that is always rolled back, which does not undo $INCREMENT/$SEQUENCE counters (row ID counters included), process-private or IRISTEMP globals, changes made with %NOJOURN by a function, procedure or trigger the statement runs, work that parallel query worker processes do (%PARALLEL), JOB or device output, other external effects, or a function, procedure or trigger that starts, commits or rolls back a transaction (reported as an error when the transaction level the tool opened has changed, which a commit followed by a new TSTART does not show; some changes may be saved). A capped statement that is rolled back leaves the same effects. A capped INSERT, UPDATE or DELETE on a table stored in IRISTEMP (not journaled) keeps its row changes even when the cap rolls it back. Both tools run through the ExecuteMCPv2 /dev/sql/execute endpoint, which the bootstrap deploys; iris_sql_query always runs read-only.
SQL resource caps (optional, opt-in): an operator may set IRIS_SQL_MAX_ROWS (a ceiling on the number of rows iris_sql_execute and iris_sql_query return — the response carries rowsCapped: true when it clamps the caller's request, distinct from the pre-existing truncated/totalAvailable; it bounds the returned row count post-fetch, not the server-side result set or transfer) and/or IRIS_SQL_TIMEOUT (a per-request timeout in seconds) as environment variables. Both are unset by default (no cap, today's behavior) and apply regardless of IRIS_GOVERNANCE_PRESET. Details: suite README.
iris_execute_tests and iris_test_coverage wait budget (optional, opt-in — Story 36.1; Story 40.1): an operator may set IRIS_TEST_TIMEOUT (the tools' DEFAULT wait budget, in seconds, before either returns a "running" result instead of blocking further) as an environment variable. Unset by default — each tool keeps its 120-second default. It applies to every server profile (named IRIS_PROFILES entries inherit it, like IRIS_SQL_TIMEOUT). A per-call timeout argument, when given, takes precedence over IRIS_TEST_TIMEOUT. See the iris_execute_tests detail section below for the full running-result contract.
Server Tools
| Tool | Description | Key Parameters | Annotations |
|---|
iris_server_info | Get IRIS version, platform, instance name | (none) | readOnly, idempotent |
iris_server_namespace | Get namespace details and features | namespace? | readOnly, idempotent |
Global Tools
| Tool | Description | Key Parameters | Annotations |
|---|
iris_global_get | Read a global node value | global, subscripts?, namespace? | readOnly, idempotent |
iris_global_set | Set a global node value (verified) | global, value, subscripts?, namespace? | destructive, idempotent |
iris_global_kill | Delete a global node or subtree | global, subscripts?, namespace? | destructive, idempotent |
iris_global_list | List globals with optional filter | filter?, caseSensitive?, cursor?, namespace? | readOnly, idempotent |
Execution Tools
| Tool | Description | Key Parameters | Annotations |
|---|
iris_execute_command | Execute an ObjectScript command | command, namespace? | destructive |
iris_execute_classmethod | Invoke a class method by name with up to 20 positional arguments (plain scalars or {byRef, value?} markers for ByRef/Output parameters). Captures any Write output from the target (no wrapper class needed for narrating methods, stock runners like %UnitTest.Manager.RunTest, or targets that switch namespace mid-call) and returns marked positions' post-call values | className, methodName, args?, namespace? | destructive |
iris_execute_tests | Run unit tests (package, class, or method level). A run that outlives its wait budget returns a non-error "running" result carrying jobId/runIndex handles instead of a timeout error — see detail below. Since Story 40.3 a run that includes %UnitTest.TestProduction tests is refused with PRODUCTION_BUSY while a different production runs in the namespace (the tool stays enabled; no new key). Classified write because it runs test code, and enabled by default (a key of the frozen baseline); since Story 40.4 its annotations say so (not read-only, not idempotent) | target, level, timeout?, namespace? | -- |
Code Metrics Tools
| Tool | Description | Key Parameters | Annotations |
|---|
iris_loc_count | Count lines of code in the namespace's ObjectScript documents (CLS/MAC/INT/INC): blank / source code / source comment / test code / test comment buckets, percentages, and the top-N largest documents. spec is REQUIRED (whole-namespace scans need an explicit * and risk the ~60s gateway timeout); compiler-generated documents are excluded by default | spec, namespace?, includeGenerated?, topN?, format? | readOnly, idempotent |
Governance defaults: iris_loc_count is classified read and is therefore enabled by default — it is not gated behind IRIS_GOVERNANCE. (A read classification is still required for every new tool key, but reads resolve enabled under the default seed.)
Environment Tools
| Tool | Description | Key Parameters | Annotations |
|---|
iris_env_diff | Compare two configured IRIS profiles (source vs target) across up to five domains — documents, mappings, defaultSettings, webapps, config — and report a structured drift report. Default domains (no spec needed): mappings, defaultSettings, webapps, config; documents is opt-in only and requires spec (a bare * is refused unless allowWide is set). Credential-ish System Default Settings values are redacted | source, target, domains?, spec?, allowWide?, namespace?, ignoreTimestamps? | readOnly, idempotent |
iris_env_promote | Turn a prior iris_env_diff result into an ordered promotion plan (action: "plan"), or execute an allowlisted subset of that plan against target (action: "execute") behind four refuse-before-any-write gates: confirm, a steps allowlist, plan-hash freshness (the same diff re-hashed), and the target profile's own governance. Halts on the first failed step; never deletes a target-only item. Before the confirmation dialog and any write, execute reads the source and target copy of each class it would promote, and a source copy that drops a Storage definition the target class has refuses the whole execute with STORAGE_DROPPED | action, source, target, diff?, plan?, steps?, confirm?, namespace?, allowStorageRegeneration? (default: false: execute is refused before any write if a source class lacks a Storage definition the target class has; true: the classes are promoted, IRIS generates new storage on the target at the next compile, and the dialog and the result's storageDrops name the dropped definitions; execute only) | destructive |
Governance defaults: iris_env_diff and iris_env_promote's plan action are classified read and are therefore enabled by default — neither is gated behind IRIS_GOVERNANCE. iris_env_promote's execute action is truthfully classified write and is DEFAULT-DISABLED (unlike iris_production_control:clean, it deliberately does not use the defaultEnabled mechanism — promotion is a real environment-mutating write, not a recovery action); enable it via IRIS_GOVERNANCE, e.g. {"global":{"iris_env_promote:execute":true}} — execute ALSO requires the target profile's own governance to allow the underlying write families it uses (a fourth gate on top of this one). Safety: nothing on the target is ever deleted — items that exist on the target only (onlyInTarget) are always informational warnings, never steps — and System Default Settings values that look like credentials are redacted in both diff and plan/execute output; their plaintext never appears in any tool result. Credentials/users/roles promotion is out of scope entirely.
Human confirmation (Story 43.3): iris_env_promote action execute (a write, default-disabled) also asks the person right before its first write, after the four gates pass, when the MCP client declares form elicitation; any other client keeps today's contract (confirm: true and the gates), and declining ends the call with CONFIRMATION_DECLINED and changes nothing. A Claude Code Elicitation hook can answer the dialog for the person, which is the user's choice and removes the person from the loop. See Human confirmation (elicitation).
Storage guard (Story 42.11): execute runs a read-only preflight after its four gates and the blank-namespace check, and before the confirmation dialog: for each allowlisted class step it reads the source copy and the target copy of the class. A source copy that lacks a Storage definition the target class has refuses the whole execute with STORAGE_DROPPED (structuredContent is {code, source, target, storageDrops}) and nothing is changed in any domain. allowStorageRegeneration: true (default false) lets it through; the dialog's scope then names the drops (; drops Storage definitions: ...) and the result gains storageDrops. Each class is written with the source text the preflight read, so the text checked is the text written. A preflight read that fails fails that step when its turn comes, as today's source-read failure does; a declined dialog leaves reads only.
Test Status Tools
| Tool | Description | Key Parameters | Annotations |
|---|
iris_test_status | Companion to iris_execute_tests (Story 36.2): re-attach to a test run by jobId and/or read it by runIndex (action: "poll"), or stop a running one (action: "cancel") — see detail below. Since Story 40.1 it is also the companion of iris_test_coverage: pass coverageRunId alone to poll or cancel a coverage run. Since Story 40.2 action: "export" writes a completed coverage run's Cobertura XML file to an absolute outputPath. Defaults: poll is a read, enabled by default; cancel and export are writes, DEFAULT-DISABLED (enable them through IRIS_GOVERNANCE) | action, jobId?, runIndex?, coverageRunId?, namespace?, outputPath?, sourceRoot? | destructive |
Governance defaults: iris_test_status:poll is classified read and is therefore enabled by default. iris_test_status:cancel is truthfully classified write and is DEFAULT-DISABLED (it deliberately does not use the defaultEnabled mechanism — stopping a run is not a recovery-of-last-resort action like iris_production_control:clean); enable it via IRIS_GOVERNANCE, e.g. {"global":{"iris_test_status:cancel":true}}. The optional coverageRunId (Story 40.1) added no action and changed neither key. iris_test_status:export (Story 40.2) is a third key: it is truthfully classified write (it writes a local file) and is DEFAULT-DISABLED; enable it via IRIS_GOVERNANCE, e.g. {"global":{"iris_test_status:export":true}}. It is outside the frozen governance baseline and carries no defaultEnabled marker; the tool's annotations (destructiveHint: true) already cover overwriting a file, and iris_test_coverage itself never writes a file.
Test Coverage Tools
| Tool | Description | Key Parameters | Annotations |
|---|
iris_test_coverage | Run unit tests and measure which lines of the listed classes they execute (Stories 40.1 and 40.2): per class and per method over the class's own source lines with the uncovered ranges, per-routine INT lines, an optional minCoverage verdict, plus the classes that could not be measured; since Story 40.3 it asks the same TestProduction guard as iris_execute_tests and refuses a run with PRODUCTION_BUSY. A write, DEFAULT-DISABLED (it starts an instance-wide Line-by-Line session and runs test code; enable it with IRIS_GOVERNANCE={"global":{"iris_test_coverage":true}}); minCoverage omitted means no verdict — see detail below | target, level, classes, timeout?, namespace?, minCoverage? | destructive |
Governance defaults: iris_test_coverage is truthfully classified write (it starts an instance-wide monitor session, runs test code and prunes its own older run records) and is DEFAULT-DISABLED; enable it via IRIS_GOVERNANCE, e.g. {"global":{"iris_test_coverage":true}}. It is outside the frozen governance baseline, uses no defaultEnabled marker, and is hidden under IRIS_TOOLS_PRESET=core (shown under developer); it and iris_test_status are a declared pair and stay co-visible.
Prompts
Workflow-shaped MCP prompts (Epic 25) served via prompts/list/prompts/get. Prompts are a separate protocol capability from tools — they carry no governance key and do not change this server's tool count.
| Prompt | Description |
|---|
diagnose-slow-query | Runs iris_sql_analyze (explain → indexUsage → stats) and recommends a fix — never auto-applies one. |
deploy-and-test-class | Deploys an ObjectScript class or package (iris_doc_load, glob-path form), resolves compile errors, then runs its unit tests (iris_execute_tests) with a total-count check. It tells the model what a PRODUCTION_BUSY refusal means (a production other than the tests' own is running, or the production state could not be read), and, only when the user asks for coverage, adds an optional last step that runs iris_test_coverage and copes with a hidden tool (outside core), a GOVERNANCE_DISABLED or MONITOR_BUSY refusal and a running result (Story 40.4). |
promote-environment-change | Reviews and promotes configuration/code drift from a source IRIS environment to a target using the review-before-write iris_env_diff → iris_env_promote workflow — scoped diff, review with the user, plan, an explicit user-selected step allowlist, confirmed execute, then re-diff to verify. Never acts on onlyInTarget warnings; states the no-deletions guarantee and that execute is default-disabled. |
edit-and-test-class | Changes a few lines of a class in place: a ranged iris_doc_get, a guarded iris_doc_edit (apply, enabled by default; expected built from the read, with a STALE_CONTENT retry using mismatches[].current), iris_doc_compile, then iris_execute_tests with a check of total against the number of Test* methods. Takes className, change and an optional testClass; every tool on its main path is in the core preset. It tells the model what a PRODUCTION_BUSY refusal means (a production other than the tests' own is running, or the production state could not be read) and not to stop a production without the user's confirmation. |
objectscript-review was retired in Story 41.2: its checklist is now the always-on rule in the skills pack, which iris-mcp-clients skills install puts where each client loads it (.claude/rules/ for Claude Code, .cursor/rules/ for Cursor, a marked block in GEMINI.md for Gemini CLI and in AGENTS.md for every other client).
Also installable as Agent Skills.
Tool Examples
iris_doc_get -- Retrieve a document
Input:
{
"name": "MyApp.Service.cls",
"namespace": "USER"
}
Output:
{
"name": "MyApp.Service.cls",
"content": ["Class MyApp.Service {", "", "ClassMethod Hello() As %String", "{", " Quit \"Hello World\"", "}", "", "}", ""],
"ts": "2026-04-07 10:30:00.000"
}
iris_doc_get with a line range -- Read part of a UDL text document
Pass startLine and/or endLine (1-based, inclusive) to read part of a class, routine or include file instead of
the whole document. Use a range for large classes, and to read the exact lines before changing them with
iris_doc_edit, which uses the same line numbers. A ranged read is still one request for the whole document; the
lines are cut from it afterwards, so it saves the agent's context, not IRIS's work.
Input:
{
"name": "MyApp.Service.cls",
"startLine": 3,
"endLine": 5
}
Output (text): a header line, then the lines in the cat -n layout: the line number right-aligned in 6 columns, a
tab, then the line exactly as IRIS holds it (leading tabs, trailing spaces and empty lines included).
Document 'MyApp.Service.cls' in namespace 'USER': lines 3-5 of 9 (ts 2026-04-07 10:30:00.000)
3 ClassMethod Hello() As %String
4 {
5 Quit "Hello World"
Output (structuredContent):
{
"name": "MyApp.Service.cls",
"ts": "2026-04-07 10:30:00.000",
"startLine": 3,
"endLine": 5,
"totalLines": 9,
"lines": ["ClassMethod Hello() As %String", "{", " Quit \"Hello World\""]
}
- Numbering. Line N is element N-1 of the line array that IRIS returns, after one leading byte-order mark is removed.
A class ends with an empty last line, and it counts:
totalLines is 9 for the 9-element content array of the
full-read example above, whose last element is that empty line. iris_loc_count reports the same totalLines for a
class. A routine's or include file's line 1 is its ROUTINE header: ROUTINE <name> for a .mac routine (IRIS
drops the type), ROUTINE <name> [Type=INC] for an include file.
- Defaults and clamp.
startLine alone reads to the last line; endLine alone reads from line 1. An endLine
past the end is clamped to the last line, and the response shows the effective startLine and endLine.
ts. The document's version timestamp, the same string metadataOnly returns as etag. iris_doc_edit sends it
back to IRIS so that an edit cannot overwrite a change it did not see.
- Without the parameters the request and the result are unchanged: the whole document, as before.
- Errors (
isError: true, nothing is read into the result):
startLine or endLine is not a whole number of at least 1: the argument check refuses it before the tool runs (an Invalid arguments error that names the parameter).
startLine is after endLine, or past the last line (the message states the document's totalLines).
- A range with
metadataOnly, or with format: "xml": ranges apply only to UDL text.
- A binary document (the message names it), or a document IRIS cannot read (the message names it and carries IRIS's reason).
iris_doc_put -- Debug/scratch: write a document directly to IRIS
Debug/scratch tool — for production code, use iris_doc_load to ensure source
control and review. This tool writes content directly to IRIS without creating a
file on disk, and is intended for one-off inspection, quick reproductions, or
throwaway test classes only. A leading byte-order mark is stripped from the content
before it is sent, and a write IRIS refuses (a non-empty result.status inside an
HTTP 200 response) is returned as an error carrying IRIS's text; nothing is stored then.