interoperability_production_create
Set up an Interoperability Production to streamline data exchange and system integration within the InterSystems IRIS MCP Server environment.
Instructions
Create an Interoperability Production
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Implementation Reference
- The async handler function that implements the tool logic: validates production name format, checks if class exists, creates new Ens.Config.Production, saves to class, saves object, and compiles with checks.async def interoperability_production_create(name: str, ctx: Context) -> bool: if "." not in name: raise ValueError( "Production name must in format packagenamespace.productionname, where packagenamespace can have multiple parts separated by dots" ) iris = ctx.iris with transaction(iris): prod = iris.classMethodObject( "%Dictionary.ClassDefinition", "%OpenId", name ) if prod: raise ValueError(f"Class {name} already exists") logger.info(f"Creating Interoperability Production: {name}") prod = iris.classMethodObject("Ens.Config.Production", "%New", name) raise_on_error(iris, prod.invokeString("SaveToClass")) raise_on_error(iris, prod.invokeString("%Save")) raise_on_error( iris, iris.classMethodString("%SYSTEM.OBJ", "Compile", name, "ck-d") ) return True
- src/mcp_server_iris/server.py:56-56 (registration)Registers the tool by calling the init function imported from interoperability.py, which applies @server.tool decorators to define and register the tool on the MCP server instance.interoperability(server, logger)