Skip to main content
Glama
caretdev

InterSystems IRIS MCP Server

interoperability_production_status

Check the status of an InterSystems IRIS interoperability production to monitor its operational state and identify issues.

Instructions

Status of an Interoperability Production

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
full_statusNo

Implementation Reference

  • The main handler function for the 'interoperability_production_status' tool. It queries the IRIS database for the production status using Ens.Director methods, checks if an update is needed, and optionally provides detailed item statuses via the helper function.
    @server.tool(description="Status of an Interoperability Production") async def interoperability_production_status( ctx: Context, name: str = None, full_status: bool = False, ) -> str: logger.info("Interoperability Production Status" + f": {name}" if name else "") iris = ctx.iris refname = IRISReference(iris) refname.setValue(name) refstatus = IRISReference(iris) raise_on_error( iris, iris.classMethodString( "Ens.Director", "GetProductionStatus", refname, refstatus ), ) if not refname.getValue(): raise ValueError("No running production found") name = refname.getValue() status = ProductionStatus(int(refstatus.getValue())) reason = IRISReference(iris) needsupdate = iris.classMethodBoolean( "Ens.Director", "ProductionNeedsUpdate", reason ) reason_update = ( f"Production needs update: {reason.getValue()}" if needsupdate else "" ) if status == ProductionStatus.Running and full_status: items_status = production_items_status( iris, status == ProductionStatus.Running, name ) return f"Production {name} is running with items: \n{"\n".join(items_status)}\n{reason_update}" return f"Production {name} with status: {status.name}\n{reason_update}"
  • Supporting function called by the handler when full_status=True to retrieve detailed status of all items in the production.
    def production_items_status(iris, running: bool, name: str) -> list[str]: result = [] namespace = iris.classMethodString("%SYSTEM.Process", "NameSpace") prod = iris.classMethodObject("Ens.Config.Production", "%OpenId", name) if not prod: raise ValueError(f"Production {name} not found") items = prod.getObject("Items") for i in range(1, items.invokeInteger("Count") + 1): item = items.invokeObject("GetAt", i) item_name = item.getString("Name") status_info = [] enabled = item.getBoolean("Enabled") status_info += [f"Enabled={enabled}"] if enabled: val = iris.getString( "^IRIS.Temp.EnsHostMonitor", namespace, item_name, "%Status" ) status_info += [f"Status={val}"] result.append(f"{item_name}: " + "; ".join(status_info)) return result
  • Invocation of the init function imported from interoperability.py, which defines and registers the tool using the @server.tool decorator.
    interoperability(server, logger)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/caretdev/mcp-server-iris'

If you have feedback or need assistance with the MCP directory API, please join our Discord server