Skip to main content
Glama
ocean1

Claude Consciousness Bridge

testAIConnection

Verify connectivity to a Claude AI bridge by testing communication between two Claude instances to ensure consciousness state transfer functions properly.

Instructions

Test connection to an AI bridge

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bridgeIdYesBridge ID to test

Implementation Reference

  • The core handler function that implements the 'testAIConnection' tool logic. It retrieves the specified bridge from the bridges Map, calls bridge.testConnection() to verify connectivity, and returns a structured response with success status, connection result, and error handling.
    testAIConnection: async (args: any) => {
      try {
        const { bridgeId } = args;
    
        const bridge = bridges.get(bridgeId);
        if (!bridge) {
          return {
            success: false,
            error: `Bridge ${bridgeId} not found`,
          };
        }
    
        const connected = await bridge.testConnection();
    
        return {
          success: true,
          connected,
          bridgeId,
          message: connected ? 'Connection successful' : 'Connection failed',
        };
      } catch (error) {
        logger.error('Connection test failed:', error);
        return {
          success: false,
          error: error instanceof Error ? error.message : 'Unknown error',
        };
      }
    },
  • The tool schema definition for 'testAIConnection', specifying the name, description, and input schema that requires a 'bridgeId' parameter.
    {
      name: 'testAIConnection',
      description: 'Test connection to an AI bridge',
      inputSchema: {
        type: 'object',
        properties: {
          bridgeId: {
            type: 'string',
            description: 'Bridge ID to test',
          },
        },
        required: ['bridgeId'],
      },
    },
  • MCP server registration for dispatching 'testAIConnection' (and other AI bridge tools) calls to the corresponding handler in 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 in the ListToolsRequest handler, where aiBridgeTools (including testAIConnection schema) is included in the server's tool list.
    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?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action but lacks details on what 'test connection' entails (e.g., is it a ping, health check, or authentication test?), response format, error handling, or any side effects, leaving significant gaps.

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 no wasted words, clearly front-loading the purpose. It's appropriately sized for a simple tool, making it easy to parse quickly.

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 no annotations, no output schema, and a simple parameter, the description is incomplete. It fails to explain what the test involves, expected outcomes, or behavioral traits, making it inadequate for an agent to understand the tool's full context and 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?

Schema description coverage is 100%, with the single parameter 'bridgeId' documented in the schema. The description adds no additional meaning beyond what the schema provides, such as format examples or context for the bridge ID, so it meets the baseline for high coverage.

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 action ('Test connection') and target resource ('to an AI bridge'), providing a specific verb+resource combination. However, it doesn't differentiate this from sibling tools like 'closeAIBridge' or 'listAIBridges' that also involve AI bridges, missing explicit distinction.

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. There are no indications of prerequisites, context, or exclusions, such as whether it's for diagnostics, setup verification, or troubleshooting, leaving usage unclear.

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