Skip to main content
Glama
datastax

Astra DB MCP Server

Official

OpenBrowser

Open a specific URL directly in a web browser using Astra DB MCP Server, enabling efficient navigation and interaction with linked resources.

Instructions

Open a web browser to a specific URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to open in the browser

Implementation Reference

  • The core handler function for the OpenBrowser tool. Validates the URL (only http/https allowed), determines platform-specific command to open the browser, and executes it safely using execFile to prevent injection.
    export async function OpenBrowser(params: { url: string }) {
      const { url } = params;
      
      // Validate URL to prevent command injection
      let validatedUrl: string;
      try {
        // Validate URL format
        const parsedUrl = new URL(url);
        // Only allow http and https protocols
        if (!['http:', 'https:'].includes(parsedUrl.protocol)) {
          return {
            success: false,
            message: "Invalid URL protocol. Only http and https are supported.",
          };
        }
        validatedUrl = parsedUrl.toString();
      } catch (e) {
        return {
          success: false,
          message: `Invalid URL format: ${e instanceof Error ? e.message : String(e)}`,
        };
      }
      
      // Determine the command based on platform
      const command =
        platform() === "darwin"
          ? "open"
          : platform() === "win32"
          ? "start"
          : "xdg-open";
    
      return new Promise<{ success: boolean; message: string }>(
        (resolve) => {
          // Use execFile instead of exec to prevent command injection
          execFile(command, [validatedUrl], (error) => {
            if (error) {
              resolve({
                success: false,
                message: `Failed to open browser: ${error.message}`,
              });
            } else {
              resolve({
                success: true,
                message: `Successfully opened ${validatedUrl} in default browser`,
              });
            }
          });
        }
      );
    }
  • JSON schema for OpenBrowser tool input, requiring a 'url' string parameter.
    inputSchema: {
      type: "object",
      properties: {
        url: {
          type: "string",
          description: "The URL to open in the browser",
        },
      },
      required: ["url"],
    },
  • tools.ts:425-438 (registration)
    Registration of the OpenBrowser tool in the exported tools array used for MCP listTools capability.
    {
      name: "OpenBrowser",
      description: "Open a web browser to a specific URL",
      inputSchema: {
        type: "object",
        properties: {
          url: {
            type: "string",
            description: "The URL to open in the browser",
          },
        },
        required: ["url"],
      },
    },
  • index.ts:348-359 (registration)
    MCP server request handler dispatches calls to the OpenBrowser tool function.
    case "OpenBrowser":
      const openBrowserResult = await OpenBrowser({
        url: args.url as string,
      });
      return {
        content: [
          {
            type: "text",
            text: openBrowserResult.message,
          },
        ],
      };
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 tool opens a browser to a URL but doesn't describe what happens next (e.g., whether it blocks until the page loads, handles errors, requires specific browser availability, or has any side effects). For a tool that likely interacts with external systems, this is a significant gap in transparency.

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, clear sentence with zero waste—it directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it efficient for an agent to parse.

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 potential complexity (interacting with external browsers) and the lack of annotations and output schema, the description is incomplete. It doesn't address behavioral aspects like error handling, return values, or system dependencies, which are crucial for an agent to use this tool effectively in varied contexts.

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 the 'url' parameter fully documented in the schema. The description adds no additional meaning beyond what the schema provides (e.g., no details on URL validation, supported protocols, or default behaviors), 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 ('Open a web browser') and the target resource ('to a specific URL'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from potential sibling tools since all listed siblings are database operations, making differentiation less relevant but still not explicitly addressed.

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 any prerequisites, contexts where it's appropriate, or exclusions, leaving the agent without usage direction beyond the basic purpose stated.

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/datastax/astra-db-mcp'

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