Skip to main content
Glama

close_contam_bridge_session

End an active CONTAM bridge session to release the spawned process and socket resources.

Instructions

Use this when you want to end an active ContamX bridge-mode session and release the spawned process and socket.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYes

Implementation Reference

  • The handler for the 'close_contam_bridge_session' tool, which retrieves a bridge session by ID, fetches its final summary, removes it from the 'bridgeSessions' map, and calls the session's 'close' method to clean up the process and socket.
      "close_contam_bridge_session",
      "Use this when you want to end an active ContamX bridge-mode session and release the spawned process and socket.",
      {
        sessionId: z.string()
      },
      async ({ sessionId }) => {
        const session = bridgeSessions.get(sessionId);
        if (!session) {
          throw new Error(`Bridge session not found: ${sessionId}`);
        }
    
        const summary = session.getSummary();
        bridgeSessions.delete(sessionId);
        await session.close();
    
        return toolResponse("Closed the ContamX bridge session.", summary);
      }
    );
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. It successfully discloses resource cleanup (releasing spawned process and socket) but fails to mention critical behavioral traits: whether the operation is irreversible/destructive, idempotent (safe to call twice), error conditions if session doesn't exist, or whether data is persisted before closure.

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 sentence with no wasted words. However, the 'Use this when you want to...' framing is slightly meta and indirect; a more direct 'Ends an active session...' would front-load the action more effectively while being more concise.

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

Completeness3/5

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

Given this is a resource-terminating operation with no output schema, the description adequately covers the basic action but leaves gaps regarding safety implications and cleanup verification. The lack of parameter documentation and absence of destructive/safety annotations (which don't exist here) leaves the agent under-informed about operational risks.

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 input schema has 0% description coverage for the sessionId parameter, and the description text adds no information about what constitutes a valid sessionId, its format, or how to obtain it. While the parameter name is somewhat self-explanatory, the description does not compensate for the lack of schema documentation.

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

Purpose5/5

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

The description explicitly states the tool 'end[s] an active ContamX bridge-mode session and release[s] the spawned process and socket.' This provides a specific verb (end/release), clear resource targets (session, process, socket), and distinguishes itself from siblings like start_contam_bridge_session and get_contam_bridge_session through its focus on termination and cleanup.

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

Usage Guidelines4/5

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

The phrase 'Use this when you want to end...' provides explicit guidance on when to invoke the tool. However, it lacks explicit guidance on when NOT to use it (e.g., during active operations) or mention of alternatives like get_contam_bridge_session for merely checking status without closing.

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