npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@iris-mcp/dev

v1.1.0

Published

IRIS Development Tools MCP Server

Downloads

592

Readme

@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

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

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).

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.

  • Existing documents. A document that does not exist yet is created by one request. For a document that exists, IRIS refuses an unversioned write with HTTP 409 and the document's current text and version; the tool uses that answer as its read, then saves once more with If-None-Match set to that version. A 409 on that save means the document changed meanwhile: the tool returns a DOCUMENT_CONFLICT refusal (nothing stored) and never retries. ignoreConflict (default false) skips the version check. No path sends an extra GET or HEAD.
  • Storage guard. A persistent class keeps its Storage definitions (the map from properties to the globals that hold its rows) in its source. A write to an existing class whose content drops one of those definitions is refused with STORAGE_DROPPED and nothing is stored, because IRIS would generate new storage at the next compile, which can change how existing rows are read. Names are compared exactly: a rename is a drop, and changing a definition's content is allowed. allowStorageRegeneration: true (default false) lets the write through, and then the next compile regenerates the storage. The guard applies to .cls documents only, in UDL or XML form, and a new class is never refused. It reads the class text the way IRIS does for the forms it is tested against; in a few hand-written forms (a brace hidden in embedded SQL or HTML, for example) it can miss a drop. The same guard covers every path that can replace an existing class, each with the same parameter:
    • iris_doc_put refuses the write, as above.
    • iris_doc_load reads each class file's class before its upload (one GET; with ignoreConflict: false the 409 of the first PUT is the read), and refuses a file that drops a definition as a failures entry with STORAGE_DROPPED while the other files continue. With allowStorageRegeneration: true the result's storageDrops names what was dropped.
    • The iris_doc_xml_export import reads each <Class> of the XML before its one POST, and refuses the whole import when a class lacks a definition the class has now. With the override the result's storageDrops names them.
    • iris_env_promote execute reads the source and target copy of each class before its confirmation dialog, and refuses the whole execute when a source copy lacks a definition the target class has. It writes the source text it read. With the override the dialog and the result's storageDrops name the dropped definitions. When the drops and the steps together are longer than the dialog shows (600 characters), fewer steps are listed, then fewer dropped classes, each list ending and N more, so that the drops stay visible.
    • Each call reads each class once, one GET after another, before it writes it. A change made to the class between that read and the write is not seen. On a promote the read comes before the confirmation dialog and before the mapping steps of the same plan; a client that answers the dialog in a second request runs the call again, so that request reads each class again and writes what it read, without comparing it with the drops the dialog named. A very large load, import or promote makes proportionally more requests.
  • Document-write paths. The guard covers iris_doc_put, iris_doc_edit (action apply), iris_doc_load, the iris_doc_xml_export import and the iris_env_promote execute sync; iris_doc_edit is overridden by its regenerateStorage action instead of the parameter. The bootstrap's own classes have no Storage definitions. iris_docdb_document and iris_global_set write DocDB records and global nodes, not documents. A test lists every document-writing path with its verdict.

Input:

{
  "name": "MyApp.Utils.cls",
  "content": "Class MyApp.Utils {\n\nClassMethod Add(a As %Integer, b As %Integer) As %Integer\n{\n  Quit a + b\n}\n\n}"
}

Output:

"Document 'MyApp.Utils.cls' saved successfully in namespace 'USER'."

Refusal (isError: true, nothing stored) when the class has Storage definitions Default and Second and the content keeps only Default:

Document 'MyApp.Orders.cls' was not saved in namespace 'USER': the content drops the Storage definition 'Second' that the class has now, and IRIS would generate new storage at the next compile, which can change how existing rows are read. Nothing was stored. Keep the Storage definitions in the content (read the class with iris_doc_get first), or pass allowStorageRegeneration: true to let IRIS regenerate the storage.
{
  "code": "STORAGE_DROPPED",
  "name": "MyApp.Orders.cls",
  "namespace": "USER",
  "droppedStorage": ["Second"]
}

Change a few lines of an existing class, routine or include file without resending the whole document. Read the exact lines first with a ranged iris_doc_get (the two tools use the same 1-based line numbers and are always visible together), then send the edits. Each edit is an insert (afterLine, text, expected; afterLine: 0 inserts before line 1), a delete (startLine, endLine, expected) or a replace (startLine, endLine, text, expected), addressed in the numbering of that read.

  • Default state. action: "apply" is a write that is enabled by default, the one exception to "a new write ships disabled" besides iris_production_control:clean (Project Lead decision S-3). Every edit is guarded by the expected text of the lines it changes, the save is version-checked, and a class edit that would drop a Storage definition is refused, so it does not overwrite a line whose text differs from what the agent expected. Disable it with {"global": {"iris_doc_edit:apply": false}}, or by disabling iris_doc_put (a disabled iris_doc_put makes both iris_doc_edit keys seed disabled, reported as configSource: "parent"; an explicit setting on iris_doc_edit:apply still wins). The read-only preset blocks it too. action: "regenerateStorage" (the Storage-guard override, below) is disabled by default. See Parent keys. Human confirmation (Story 43.3): action: "regenerateStorage" also asks the person right before the save, when the MCP client declares form elicitation; any other client keeps today's contract (governance is the only gate, there is no confirm parameter), 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).
  • expected. The current text of the addressed lines (of line afterLine, or line 1 when afterLine is 0, for an insert). text and expected are parsed alike: one leading byte-order mark is dropped, one trailing line break is dropped, and CRLF and LF both separate lines, so "a\nb\n" and "a\r\nb" are both the two lines a, b. An empty text is one empty line; to remove lines use delete. Make expected distinctive when a line such as } is not unique: if another writer shifted lines before this tool's read, a non-unique line can still match.
  • All or nothing. The tool reads the document once, checks every edit (shape, overlaps, line numbers, expected, Storage), applies them all bottom-up against the numbering of that read, and saves once with If-None-Match set to the version it read. Edits may come in any order. Two edits that address the same lines, or an insert inside a range another edit changes, are rejected before any request. Lines no edit touches are sent byte-identical.
  • Refusals (isError: true, nothing stored): STALE_CONTENT lists every edit whose expected text differs from the document now, with the current text; DOCUMENT_CONFLICT means the document changed after the tool read it (never retried, and no ignoreConflict exists); STORAGE_DROPPED is the Storage guard of iris_doc_put, with this remedy: keep the Storage definitions in the edited lines, or run the same edits with action: "regenerateStorage". Retrying a STALE_CONTENT refusal: each mismatch's current is the addressed lines joined with \n, plus one trailing \n, so passing it back unchanged as that edit's expected matches whenever the document still holds those lines, including a range that ends in an empty line. An expected built from a ranged iris_doc_get read ends every line, the last included, with a line break. The refusal's text block (the numbered lines) is unchanged. Argument and range errors carry no code. IRIS refusing the text (a non-empty result.status inside an HTTP 200 response) is returned as an error carrying IRIS's text.
  • The answer is a re-read. IRIS reformats class source when it saves (it puts a blank line between members, for example), so the tool reads the document back and answers from that: unifiedDiff (3 context lines, the read against the re-read), one excerpt per edit (the lines the edit produced, plus 3 context lines on each side, as in a ranged iris_doc_get of the same range), the new totalLines and ts. Never the whole document. An edit whose result equals the stored text saves nothing and reports changed: false. A class edit that IRIS stores back as it was (it restores a deleted blank line between members, for example) is saved, re-read and also reported as changed: false, with an empty unifiedDiff and a text saying so.
  • No compile. The tool does not compile: run iris_doc_compile next.

Input:

{
  "action": "apply",
  "name": "MyApp.Service.cls",
  "namespace": "USER",
  "edits": [
    { "op": "insert", "afterLine": 3, "text": "/// Says hello.", "expected": "" },
    {
      "op": "replace",
      "startLine": 6,
      "endLine": 6,
      "text": "  Set name = $Get(^Names, \"World\")\n  Quit \"Hello \" _ name",
      "expected": "  Quit \"Hello World\""
    }
  ]
}

Output (text): the sentence, the diff, then one numbered excerpt per edit:

Document 'MyApp.Service.cls' edited in namespace 'USER': 2 edits applied; it has 12 lines now (ts 2026-04-07 10:31:12.000). It is not compiled: run iris_doc_compile next.

--- MyApp.Service.cls	2026-04-07 10:30:00.000
+++ MyApp.Service.cls	2026-04-07 10:31:12.000
@@ -1,9 +1,11 @@
 Class MyApp.Service Extends %RegisteredObject
 {
 
+/// Says hello.
 ClassMethod Hello() As %String
 {
-  Quit "Hello World"
+  Set name = $Get(^Names, "World")
+  Quit "Hello " _ name
 }
 
 }

Edit 1 (insert after line 3), now lines 1-7:
     1	Class MyApp.Service Extends %RegisteredObject
     2	{
     3	
     4	/// Says hello.
     5	ClassMethod Hello() As %String
     6	{
     7	  Set name = $Get(^Names, "World")

Edit 2 (replace lines 6-6), now lines 4-11:
     4	/// Says hello.
     5	ClassMethod Hello() As %String
     6	{
     7	  Set name = $Get(^Names, "World")
     8	  Quit "Hello " _ name
     9	}
    10	
    11	}

Output (structuredContent):

{
  "name": "MyApp.Service.cls",
  "namespace": "USER",
  "ts": "2026-04-07 10:31:12.000",
  "totalLines": 12,
  "changed": true,
  "unifiedDiff": "--- MyApp.Service.cls\t2026-04-07 10:30:00.000\n+++ MyApp.Service.cls\t2026-04-07 10:31:12.000\n@@ -1,9 +1,11 @@\n Class MyApp.Service Extends %RegisteredObject\n {\n \n+/// Says hello.\n ClassMethod Hello() As %String\n {\n-  Quit \"Hello World\"\n+  Set name = $Get(^Names, \"World\")\n+  Quit \"Hello \" _ name\n }\n \n }",
  "excerpts": [
    { "edit": 1, "op": "insert", "startLine": 1, "endLine": 7, "lines": ["Class MyApp.Service Extends %RegisteredObject", "{", "", "/// Says hello.", "ClassMethod Hello() As %String", "{", "  Set name = $Get(^Names, \"World\")"] },
    { "edit": 2, "op": "replace", "startLine": 4, "endLine": 11, "lines": ["/// Says hello.", "ClassMethod Hello() As %String", "{", "  Set name = $Get(^Names, \"World\")", "  Quit \"Hello \" _ name", "}", "", "}"] }
  ]
}

Refusal (isError: true, nothing stored) when a replace of line 6 expected Quit "Hello" but the line reads Quit "Hello World":

Document 'MyApp.Service.cls' was not changed in namespace 'USER': the expected text of edit 1 does not match the document now. Nothing was stored. Retry with the current text below as expected, or read the lines again with iris_doc_get.

Edit 1 (replace lines 6-6), current text:
     6	  Quit "Hello World"
{
  "code": "STALE_CONTENT",
  "name": "MyApp.Service.cls",
  "namespace": "USER",
  "ts": "2026-04-07 10:30:00.000",
  "totalLines": 10,
  "mismatches": [
    { "edit": 1, "op": "replace", "startLine": 6, "endLine": 6, "current": "  Quit \"Hello World\"\n" }
  ]
}

Input:

{
  "name": ["MyApp.Temp1.cls", "MyApp.Temp2.cls"]
}

Output:

"2 document(s) deleted from namespace 'USER': MyApp.Temp1.cls, MyApp.Temp2.cls"

Input:

{
  "category": "CLS",
  "filter": "MyApp"
}

Output:

{
  "items": [
    { "name": "MyApp.Service.cls", "ts": "2026-04-07T10:30:00Z" },
    { "name": "MyApp.Utils.cls", "ts": "2026-04-07T10:25:00Z" }
  ]
}

Input:

{
  "path": "c:/projects/myapp/src/**/*.cls",
  "compile": true
}

Output:

{
  "total": 5,
  "uploaded": 5,
  "failed": 0,
  "compilationResult": {
    "success": true,
    "documents": ["MyApp.Service.cls", "MyApp.Utils.cls", "MyApp.Model.cls", "MyApp.REST.cls", "MyApp.Tests.cls"]
  }
}

Glob shape matters (Story 35.9). The base for document-name mapping is the directory prefix before the first glob metacharacter, so the wildcard must come BEFORE the package directory. .../src/ClineTest/*.cls swallows the ClineTest package directory into the base and would map ClineTest/Wumpus.cls to the unqualified Wumpus.cls. The tool now REFUSES such uploads: for .cls/.mac/.int/.inc files whose own Class <Pkg.Name> / ROUTINE <Name> declaration disagrees with the path-derived name, the file lands in failures[] with both names named and is never uploaded or compiled (IRIS would otherwise store it under the content-declared name while the tool reported the wrong one). Headerless files (.inc fragments, CSP pages) have no declaration and keep pure path-derived naming.

BOM and server-reported per-file errors (Story 35.9 rework). A leading UTF-8 BOM is stripped before upload (IRIS rejects a BOM'd first line as an illegal header). And a PUT that returns HTTP 200 can still fail per-document — Atelier reports it only as a string status field in the per-doc result (e.g. ERROR #16021: Illegal Header Line: ...) while storing nothing. The tool surfaces that string as an upload failure in failures[] instead of counting the file as uploaded.

Storage guard (Story 42.11). For a .cls file, the tool reads the class that exists now before it uploads (one GET; with ignoreConflict: false the 409 of the unversioned PUT is that read). A file whose content drops one of the class's Storage definitions is not stored, and its failures[] entry carries code: "STORAGE_DROPPED" and the dropped names in droppedStorage; the other files continue, and a refused file is not compiled. allowStorageRegeneration: true (default false) uploads it anyway, and the result gains storageDrops, for example [{"name": "MyApp.Model.cls", "droppedStorage": ["Default"]}]. A new class, a non-class document and a file that keeps every definition upload exactly as before. A read that fails (other than a 404, which means a new class), or a class that cannot be read as text, fails that file with the read's error and nothing is stored for it; the other files continue.

Refused input (trap-shaped glob):

{
  "path": ".../src/ClineTest/*.cls",
  "compile": true
}

Refusal output:

{
  "total": 2,
  "uploaded": 0,
  "failed": 2,
  "failures": [
    {
      "file": ".../src/ClineTest/Wumpus.cls",
      "docName": "Wumpus.cls",
      "error": "Refusing to upload 'Wumpus.cls': the path-derived name does not match the file's declared identity 'ClineTest.Wumpus'. The glob pattern's base directory swallowed the package directory — use a wildcard before the package directory (e.g. '.../src/**/*.cls') or pass baseDir='.../src'."
    }
  ]
}

Two remedies, both work: move the wildcard before the package directory ("path": ".../src/**/*.cls"), or keep the narrow glob and state the package root deterministically with the optional baseDir parameter:

{
  "path": ".../src/ClineTest/*.cls",
  "baseDir": ".../src",
  "compile": true
}

Both upload ClineTest.Wumpus.cls / ClineTest.WumpusCave.cls and compile clean. baseDir does not bypass the content cross-check — it is defense-in-depth, not an override.

Input (happy path — export a namespace subtree):

{
  "destinationDir": "C:/dev/iris-export",
  "prefix": "MyApp",
  "category": "CLS",
  "namespace": "USER"
}

Output:

{
  "destinationDir": "C:/dev/iris-export",
  "namespace": "USER",
  "filtersApplied": {
    "prefix": "MyApp",
    "category": "CLS",
    "type": "*",
    "generated": "false",
    "system": "false"
  },
  "total": 5,
  "exported": 5,
  "skipped": 0,
  "skippedItems": [],
  "manifest": "C:/dev/iris-export/manifest.json",
  "durationMs": 412
}

Files are written to C:/dev/iris-export/MyApp/Service.cls, C:/dev/iris-export/MyApp/Utils.cls, etc. Dots in dotted class names become subdirectories; CSP paths keep their forward slashes.

Input (Windows long-path — needs useShortPaths):

{
  "destinationDir": "C:/dev/iris-export",
  "prefix": "EnsLib.HL7",
  "namespace": "USER"
}

Output with skippedItems:

{
  "destinationDir": "C:/dev/iris-export",
  "namespace": "USER",
  "filtersApplied": { "prefix": "EnsLib.HL7", "category": "*", "type": "*", "generated": "false", "system": "false" },
  "total": 42,
  "exported": 40,
  "skipped": 2,
  "skippedItems": [
    {
      "docName": "EnsLib.HL7.MessageRouter.VeryLongClassNameThatExceedsMaxPath.cls",
      "reason": "ENAMETOOLONG: local path exceeds 260 characters on Windows",
      "hint": "Rerun with useShortPaths: true, or enable Windows long-path support in the registry (LongPathsEnabled)."
    },
    {
      "docName": "EnsLib.HL7.MessageRouter.AnotherVeryLongClassName.cls",
      "reason": "ENAMETOOLONG: local path exceeds 260 characters on Windows",
      "hint": "Rerun with useShortPaths: true, or enable Windows long-path support in the registry (LongPathsEnabled)."
    }
  ],
  "manifest": "C:/dev/iris-export/manifest.json",
  "durationMs": 3821
}

Excerpt of manifest.json:

{
  "namespace": "USER",
  "exportedAt": "2026-04-20T15:30:00.000Z",
  "filtersApplied": { "prefix": "EnsLib.HL7", "category": "*", "type": "*", "generated": "false", "system": "false" },
  "files": [
    { "docName": "EnsLib.HL7.Adapter.TCPInboundAdapter.cls", "localPath": "EnsLib/HL7/Adapter/TCPInboundAdapter.cls", "bytes": 2847 },
    { "docName": "EnsLib.HL7.Service.Standard.cls", "localPath": "EnsLib/HL7/Service/Standard.cls", "bytes": 5219 }
  ],
  "skipped": [
    {
      "docName": "EnsLib.HL7.MessageRouter.VeryLongClassNameThatExceedsMaxPath.cls",
      "reason": "ENAMETOOLONG: local path exceeds 260 characters on Windows",
      "hint": "Rerun with useShortPaths: true, or enable Windows long-path support in the registry (LongPathsEnabled)."
    }
  ],
  "shortPathMap": null
}

Note on CSP static assets in system namespaces. The Atelier API lists static web files (CSS, JS, images under /csp/…/*.css, *.js, etc.) in docnames but returns HTTP 404 for those paths on GET /doc/{name} — they're served by the CSP Gateway, not stored in an Atelier-accessible store. A full export of a namespace like %SYS (or any namespace mapping IRIS system CSP routes) will therefore produce a large skippedItems list — on a stock IRIS 2025.1 %SYS namespace, ~2,174 of 6,131 docnames fall into this bucket. This is an IRIS-side asymmetry, not a tool defect. To avoid the noise when you only want code, pass category: "CLS" (classes) or category: "RTN" (routines + include files) — these restrict docnames to categories whose documents are reliably retrievable.

Input:

{
  "prefix": "MyApp",
  "depth": 2,
  "namespace": "USER"
}

Output:

{
  "packages": [
    { "name": "MyApp.Services", "docCount": 12, "depth": 2 },
    { "name": "MyApp.Utils", "docCount": 4, "depth": 2 },
    { "name": "MyApp.Tests", "docCount": 8, "depth": 2 }
  ],
  "count": 3,
  "namespace": "USER",
  "depth": 2,
  "totalDocs": 24
}

For a structural overview at package granularity, use iris_package_list. For individual document names, use iris_doc_list. To pull many documents at once, see iris_doc_export.

Note on CSP static assets in system namespaces. Because iris_package_list aggregates the same Atelier docnames feed that iris_doc_export walks, it inherits the same system-namespace asymmetry: static web files (CSS, JS, images under /csp/…/*.css, *.js, etc.) appear in docnames even though they are not stored in an Atelier-retrievable form. On a stock IRIS 2025.1 %SYS namespace the csp package row will look inflated (~2,174 of 6,131 docs) for this reason. This is an IRIS-side asymmetry, not a tool defect. To get a clean code-only rollup, pass category: "CLS" (classes) or category: "RTN" (routines + include files) — the same workaround documented for iris_doc_export.

Input:

{
  "doc": "MyApp.Service.cls"
}

Output:

{
  "success": true,
  "documents": ["MyApp.Service.cls"],
  "compilationTime": "245ms"
}

Input:

{
  "name": "MyApp.Service.cls"
}

Output:

{
  "content": [
    {
      "name": "MyApp.Service.cls",
      "content": [
        { "name": "Hello", "cat": "method", "type": "classmethod", "returnType": "%String" }
      ]
    }
  ]
}

Input:

{
  "query": "Quit \"Hello",
  "files": "*.cls"
}

When files is omitted, the tool sends the documented default pattern *.cls,*.mac,*.int,*.inc on every call — previously the param was silently dropped when the caller omitted it, which let the Atelier server's narrower default kick in and returned empty results for matches that lived in .cls files. Pass an explicit files value to narrow the search.

Output:

{
  "matches": [
    { "doc": "MyApp.Service.cls", "line": 5, "text": "  Quit \"Hello World\"" }
  ]
}

Input:

{
  "name": "OK",
  "document": "MyApp.Service.cls",
  "includes": ["%occStatus"]
}

Output:

{
  "name": "OK",
  "definition": { "value": "1" },
  "location": { "file": "%occStatus.inc", "line": 3 }
}

Returns the .1.int routine (or .int for .mac/.int sources) IRIS generates during compilation — the fully macro-expanded form IRIS actually executes at runtime. Useful when you need to see what $$$ macros expand to (e.g., what $$$OK or $$$ThrowOnError resolves to in a specific class's context), or to inspect compiled output without running code.

Pass the bare class/routine name (no .cls extension). The tool auto-resolves by trying candidate document paths in order: <name>.1.int, then <name>.int (the .mac source itself is intentionally NOT a candidate — the macro-expanded intermediate is what this tool returns). The first 2xx response wins; candidatesTried reports which paths were attempted. If all candidates return 404 the tool returns a compile-first hint.

Input:

{
  "name": "ExecuteMCPv2.REST.Command",
  "namespace": "HSCUSTOM"
}

Output:

{
  "name": "ExecuteMCPv2.REST.Command",
  "resolvedDoc": "ExecuteMCPv2.REST.Command.1.int",
  "namespace": "HSCUSTOM",
  "content": "ROUTINE ExecuteMCPv2.REST.Command.1 [Type=INT]\n%File ; ExecuteMCPv2.REST.Command.1 ;(CLS)\nzExecute() public {\n New %sc\n Set %sc=$$$OK\n ...\n}\nzRedirects() public {\n ...\n}",
  "candidatesTried": ["ExecuteMCPv2.REST.Command.1.int"]
}

The content string contains the routine body as IRIS compiled it (newline-joined), including the ROUTINE header, methodimpl declarations, and macro-expanded ObjectS