Skip to main content
Glama

connect_scenic

Test and establish a TCP connection to Scenic applications using the Scenic MCP server. Configure the port to validate connectivity and ensure seamless integration for AI-driven automation and testing.

Instructions

Test connection to a Scenic application via TCP server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNoTCP port (default: 9999)

Implementation Reference

  • The handler function that establishes connection to the Scenic TCP server: sets port, checks if server is running, sends 'hello' command if connected, or returns waiting message.
    async function handleConnectScenic(args: any) {
      try {
        const { port = 9999 } = args;
    
        conn.setCurrentPort(port);
        const isRunning = await conn.checkTCPServer(port);
    
        if (!isRunning) {
          return {
            content: [
              {
                type: 'text',
                text: `No Scenic TCP server found on port ${port}.\n\nStatus: Waiting for connection\n\nTo use Scenic MCP, your Scenic application needs to include the ScenicMcp.Server module and start it on the specified port. The MCP server will continue monitoring for the connection.`,
              },
            ],
            isError: false,
          };
        }
    
        const response = await conn.sendToElixir('hello');
        const data = JSON.parse(response);
    
        return {
          content: [
            {
              type: 'text',
              text: `Successfully connected to Scenic application!\n\nServer info:\n${JSON.stringify(data, null, 2)}`,
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error connecting to Scenic application: ${error instanceof Error ? error.message : 'Unknown error'}`,
            },
          ],
          isError: true,
        };
      }
    }
  • Tool schema definition: name, description, and inputSchema specifying optional 'port' parameter (default 9999).
    {
      name: 'connect_scenic',
      description: 'CONNECTION SETUP: Establish the connection to the ScenicMCP GenServer running inside our Scenic app. Use this first before other interaction tools.',
      inputSchema: {
        type: 'object',
        properties: {
          port: {
            type: 'number',
            description: 'TCP port (default: 9999)',
            default: 9999,
          },
        },
      },
    },
  • src/tools.ts:190-191 (registration)
    Handler registration in the tool router switch statement within handleToolCall function.
    case 'connect_scenic':
      return await handleConnectScenic(args);
Behavior2/5

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

With no annotations, the description carries full burden but only states the action without behavioral details. It doesn't disclose what 'Test connection' entails (e.g., timeout behavior, error responses, authentication needs, or what constitutes success/failure), leaving the agent to guess about implementation.

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 directly states the tool's purpose without unnecessary elaboration. It's appropriately sized and front-loaded, making it easy for an agent 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 the tool's purpose (testing connectivity), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what the test involves, expected outcomes, or error handling, which are critical for an agent to use this tool effectively in context with siblings.

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 parameter 'port' fully documented in the schema. The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline of 3 where the schema does the heavy lifting.

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 ('to a Scenic application via TCP server'), providing specific verb+resource. However, it doesn't explicitly differentiate from sibling tools like 'get_scenic_status' which might also involve connectivity checks, leaving room for potential confusion.

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?

No guidance is provided on when to use this tool versus alternatives like 'get_scenic_status' for status checks or other siblings for different interactions. The description implies it's for initial connectivity testing but doesn't specify prerequisites, failure scenarios, or when not to use it.

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

Related 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/scenic-contrib/scenic_mcp_experimental'

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