Skip to main content
Glama
hrmeetsingh

MCP Browser Automation Server

by hrmeetsingh

playwright_get

Execute HTTP GET requests directly within a browser automation workflow using Playwright, enabling automated retrieval of web content from specified URLs via MCP Browser Automation Server.

Instructions

Perform an HTTP GET request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to perform GET operation

Implementation Reference

  • The execution handler for the 'playwright_get' tool. It uses the pre-initialized APIRequestContext to perform a GET request to the specified URL, returns response JSON and status code.
    case "playwright_get":
      try {
        var response = await apiContext!.get(args.url);
    
        return {
          toolResult: {
            content: [{
              type: "text",
              text: `Performed GET Operation ${args.url}`,
            },
            {
              type: "text",
              text: `Response: ${JSON.stringify(await response.json(), null, 2)}`,
            },
            {
              type: "text",
              text: `Response code ${response.status()}`
            }
            ],
            isError: false,
          },
        };
      } catch (error) {
        return {
          toolResult: {
            content: [{
              type: "text",
              text: `Failed to perform GET operation on ${args.url}: ${(error as Error).message}`,
            }],
            isError: true,
          },
        };
      }
  • Input schema and metadata definition for the 'playwright_get' tool, requiring a 'url' string parameter.
    {
      name: "playwright_get",
      description: "Perform an HTTP GET request",
      inputSchema: {
        type: "object",
        properties: {
          url: { type: "string", description: "URL to perform GET operation" }
        },
        required: ["url"],
      },
    },
  • API_TOOLS constant lists 'playwright_get' among API-only tools, used to conditionally initialize APIRequestContext without launching a browser.
    export const API_TOOLS = [
      "playwright_get",
      "playwright_post",
      "playwright_put",
      "playwright_delete",
      "playwright_patch"
    ];
  • Helper function to create a Playwright APIRequestContext with baseURL set to the tool's url argument, used for all API tools including playwright_get.
    async function ensureApiContext(url: string) {
      return await request.newContext({
        baseURL: url,
      });
    }
  • src/index.ts:23-26 (registration)
    Registration of all tools including 'playwright_get' by creating definitions from tools.ts and passing to setupRequestHandlers on the MCP server.
    const TOOLS = createToolDefinitions();
    
    // Setup request handlers
    setupRequestHandlers(server, TOOLS);
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 but only states the basic action without details on traits like error handling, response format, timeouts, or authentication needs. It mentions 'HTTP GET request' which implies a read operation, but lacks depth on what happens in practice (e.g., returns HTML, JSON, or errors).

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 extremely concise ('Perform an HTTP GET request') with zero wasted words, front-loading the core action. It efficiently communicates the essential purpose in a single, clear sentence, making it easy 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 complexity of HTTP requests and lack of annotations or output schema, the description is incomplete. It doesn't cover behavioral aspects like what the tool returns (e.g., response body, status codes), error conditions, or integration with sibling tools, leaving significant gaps for an agent to use it effectively.

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 'url' clearly documented in the schema as 'URL to perform GET operation'. The description does not add any meaning beyond this, such as URL format requirements or examples, so it meets the baseline for high schema coverage without extra value.

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 ('Perform an HTTP GET request') with a specific verb ('GET'), making the purpose immediately understandable. It distinguishes from siblings like playwright_post or playwright_put by specifying the HTTP method, though it doesn't explicitly contrast with all siblings like playwright_navigate or playwright_screenshot.

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. The description lacks context about scenarios where GET is appropriate (e.g., retrieving data) or when to choose other tools like playwright_post for sending data or playwright_navigate for page navigation, leaving usage decisions 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

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/hrmeetsingh/mcp-browser-automation'

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