Skip to main content
Glama
caretdev

InterSystems IRIS MCP Server

interoperability_production_status

Monitor and retrieve the status of Interoperability Productions on InterSystems IRIS MCP Server, enabling targeted insights with optional detailed status requests.

Instructions

Status of an Interoperability Production

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
full_statusNo
nameNo

Implementation Reference

  • The main handler function that fetches and returns the status of the Interoperability Production using IRIS API calls, with optional detailed item status.
    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}"
  • Registers the 'interoperability_production_status' tool on the MCP server within the init function.
    @server.tool(description="Status of an Interoperability Production")
  • Enum defining the possible production status values used by the tool.
    class ProductionStatus(Enum): Unknown = 0 Running = 1 Stopped = 2 Suspended = 3 Troubled = 4 NetworkStopped = 5 ShardWorkerProhibited = 6
  • Helper function to retrieve detailed status of production items, invoked when full_status is True.
    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

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