Skip to main content
Glama

playwright_get

Send an HTTP GET request to a specified URL, enabling interaction with web pages or fetching data through the Playwright MCP Server for browser automation tasks.

Instructions

Perform an HTTP GET request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to perform GET operation

Implementation Reference

  • Handler implementation for 'playwright_get' tool: performs HTTP GET request using Playwright's APIRequestContext.get(), returns response JSON and status code, or error message.
    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 definition for 'playwright_get' tool, specifying required 'url' 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"],
      },
    },
  • Helper array listing API request tools including 'playwright_get', used to conditionally initialize APIRequestContext in the handler.
    export const API_TOOLS = [
      "playwright_get",
      "playwright_post",
      "playwright_put",
      "playwright_delete",
      "playwright_patch"
    ];
  • Registers the MCP list_tools request handler, which returns the tool definitions array including 'playwright_get'.
    // List tools handler
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: tools,
    }));
  • src/index.ts:22-26 (registration)
    Initializes the tools array from createToolDefinitions() and sets up request handlers passing the tools for registration.
    // Create tool definitions
    const TOOLS = createToolDefinitions();
    
    // Setup request handlers
    setupRequestHandlers(server, TOOLS);
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 of behavioral disclosure. It states the action ('Perform an HTTP GET request') but doesn't describe traits like error handling, response format, timeouts, or authentication needs. For a tool with no annotations, this is a significant gap in behavioral context.

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: 'Perform an HTTP GET request.' It's front-loaded and appropriately sized for its purpose, making it easy to parse quickly without unnecessary elaboration.

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 lack of annotations and output schema, the description is incomplete for a tool performing HTTP operations. It doesn't explain what the tool returns (e.g., response body, status code) or address potential complexities like handling redirects or errors. For a tool with no structured data support, the description should provide more context to be fully helpful.

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 schema description coverage is 100%, with the 'url' parameter fully documented in the schema. The description doesn't add any meaning beyond what the schema provides, such as URL format examples or constraints. Given the high schema coverage, a baseline score of 3 is appropriate as the schema handles parameter documentation adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Perform an HTTP GET request' clearly states the action (perform) and resource (HTTP GET request), making the purpose understandable. However, it doesn't distinguish this tool from its siblings like playwright_post or playwright_put, which also perform HTTP operations but with different methods. The purpose is clear but lacks sibling differentiation.

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 when to choose GET over POST, PUT, or other HTTP methods available in sibling tools, nor does it specify prerequisites or contexts for usage. This leaves the agent without explicit or implied usage instructions.

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/lebrodus/mcp-playwright'

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