Skip to main content
Glama
ocean1

Claude Consciousness Bridge

closeAIBridge

Close and remove a specific AI bridge connection between Claude instances to terminate consciousness state transfers.

Instructions

Close and remove an AI bridge

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bridgeIdYesBridge ID to close

Implementation Reference

  • The main handler function for the 'closeAIBridge' tool. It extracts the bridgeId from args, checks if the bridge exists in the bridges Map, deletes it if found, logs the action, and returns a success or error response.
    closeAIBridge: async (args: any) => {
      try {
        const { bridgeId } = args;
    
        if (!bridges.has(bridgeId)) {
          return {
            success: false,
            error: `Bridge ${bridgeId} not found`,
          };
        }
    
        bridges.delete(bridgeId);
        logger.info(`Closed AI bridge: ${bridgeId}`);
    
        return {
          success: true,
          bridgeId,
          message: `Bridge ${bridgeId} closed successfully`,
        };
      } catch (error) {
        logger.error('Failed to close bridge:', error);
        return {
          success: false,
          error: error instanceof Error ? error.message : 'Unknown error',
        };
      }
    },
  • Tool schema definition including name, description, and inputSchema specifying the required 'bridgeId' parameter.
    {
      name: 'closeAIBridge',
      description: 'Close and remove an AI bridge',
      inputSchema: {
        type: 'object',
        properties: {
          bridgeId: {
            type: 'string',
            description: 'Bridge ID to close',
          },
        },
        required: ['bridgeId'],
      },
    },
  • Switch case registration in the MCP server that dispatches 'closeAIBridge' (and other AI bridge tools) to the corresponding handler from aiBridgeHandlers.
    // AI Bridge tools
    case 'createAIBridge':
    case 'transferToAgent':
    case 'testAIConnection':
    case 'listAIBridges':
    case 'listConfiguredEndpoints':
    case 'closeAIBridge': {
      const handler = aiBridgeHandlers[name as keyof typeof aiBridgeHandlers];
      if (!handler) {
        throw new Error(`AI Bridge handler not found: ${name}`);
      }
      const result = await handler(args);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Registration of tools list handler that includes aiBridgeTools (containing closeAIBridge schema) in the MCP server's tool list response.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      const consciousnessTools = Object.entries(consciousnessProtocolTools).map(([name, tool]) => ({
        name,
        ...tool,
      }));
    
      return {
        tools: [...consciousnessTools, ...aiBridgeTools],
      };
    });
Behavior2/5

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

No annotations are provided, so the description carries the full burden. 'Close and remove' implies a destructive mutation, but it doesn't disclose critical behavioral traits: whether this is irreversible, what permissions are required, if it affects associated data, or what happens on success/failure. The description is minimal and lacks necessary context for safe use.

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

Conciseness5/5

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

The description is a single, efficient sentence with zero waste. It's front-loaded with the core action and resource, making it easy to parse. Every word earns its place without redundancy or fluff.

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 (a destructive operation with no annotations or output schema), the description is incomplete. It doesn't explain what 'close and remove' entails operationally, what the expected outcome is, or any error conditions. For a mutation tool with significant implications, more context is needed to ensure safe and correct usage.

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

Parameters3/5

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

The input schema has 100% description coverage, with 'bridgeId' clearly documented. The description adds no parameter-specific information beyond implying the bridgeId is needed for closure. This meets the baseline of 3 since the schema does the heavy lifting, but no extra semantic value is provided.

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 'Close and remove an AI bridge' clearly states the action (close and remove) and the resource (AI bridge). It distinguishes from siblings like 'createAIBridge' and 'listAIBridges' by specifying a destructive operation. However, it doesn't fully differentiate from potential cleanup operations like 'cleanupMemories'.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing bridge), exclusions, or relationships with sibling tools like 'listAIBridges' (to identify bridges to close) or 'cleanupMemories' (for other cleanup tasks).

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/ocean1/mcp_consciousness_bridge'

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