Skip to main content
Glama

start_contam_bridge_session

Launch ContamX in bridge mode to maintain an interactive socket session for airflow and contaminant transport modeling across multiple MCP calls.

Instructions

Use this when you want to launch ContamX in bridge mode and keep an interactive socket session open across multiple MCP calls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYes
workingDirectoryNo
windFromBridgeNo
volumeFlowBridgeNo
timeoutSecondsNo

Implementation Reference

  • Implementation of the 'start_contam_bridge_session' tool, which launches a ContamX bridge session and returns a session ID.
      "start_contam_bridge_session",
      "Use this when you want to launch ContamX in bridge mode and keep an interactive socket session open across multiple MCP calls.",
      {
        projectPath: z.string(),
        workingDirectory: z.string().optional(),
        windFromBridge: z.boolean().optional(),
        volumeFlowBridge: z.boolean().optional(),
        timeoutSeconds: z.number().int().min(1).max(300).optional()
      },
      async ({ projectPath, workingDirectory, windFromBridge, volumeFlowBridge, timeoutSeconds }) => {
        const executablePath = await resolveExecutable("contamx");
        const resolvedProjectPath = asAbsolutePath(projectPath);
        if (!(await fileExists(resolvedProjectPath))) {
          throw new Error(`Project file not found: ${resolvedProjectPath}`);
        }
    
        const session = new ContamBridgeSession({
          executablePath,
          projectPath: resolvedProjectPath,
          workingDirectory: asAbsolutePath(workingDirectory ?? path.dirname(resolvedProjectPath)),
          windFromBridge: windFromBridge ?? false,
          volumeFlowBridge: volumeFlowBridge ?? false,
          host: BRIDGE_HOST,
          port: 0
        });
    
        try {
          const handshake = await session.start(timeoutSeconds ?? 30);
          bridgeSessions.set(session.id, session);
    
          return toolResponse("Started a ContamX bridge session.", {
            sessionId: session.id,
            readyTimeSeconds: session.readyTimeSeconds,
            initialMessageTypes: handshake.messages.map((message) => message.type),
            summary: session.getSummary()
          });
        } catch (error) {
          await session.close().catch(() => {});
          throw error;
        }
      }
    );
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It successfully conveys the session persistence aspect ('keep an interactive socket session open across multiple MCP calls'), but omits critical lifecycle information such as the need to close the session, what happens when timeoutSeconds is reached, or what the tool returns (likely a session identifier).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no redundant words. It efficiently combines purpose and behavioral context, though the 'Use this when you want to...' construction is slightly verbose compared to direct imperative descriptions.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of session management (sockets, persistence, timeouts) and the lack of both output schema and annotations, the description is insufficient. It omits what the tool returns (session handle?), cleanup obligations (sibling 'close_contam_bridge_session'), and parameter details necessary for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, requiring the description to compensate for all 5 parameters. While 'bridge mode' provides context for 'windFromBridge' and 'volumeFlowBridge', the description fails to explain 'workingDirectory', 'timeoutSeconds', or the format/expectations for 'projectPath', leaving most parameters undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool launches 'ContamX in bridge mode' and establishes the core resource being managed (an interactive socket session). The mention of 'bridge mode' and 'start' effectively distinguishes it from siblings like 'get_contam_bridge_session' or 'run_contam_simulation', though it assumes domain knowledge of what ContamX is.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes an explicit 'Use this when you want to...' clause that signals the intent (persistent multi-call session). However, it lacks explicit alternatives (e.g., when to use 'run_contam_simulation' instead) or prerequisites (e.g., requiring ContamX installation), which are important given the sibling tools available.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/summer521521/contam_MCP'

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