Skip to main content
Glama

playwright_get

Execute HTTP GET requests to retrieve web content through browser automation, enabling data extraction and web interaction via the Chrome DevTools Protocol.

Instructions

Perform an HTTP GET request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to perform GET operation

Implementation Reference

  • The handler logic for the 'playwright_get' tool. It executes an HTTP GET request using Playwright's APIRequestContext on the provided URL, parses the JSON response, retrieves the status code, and formats the output as tool content blocks.
    case "playwright_get":
      try {
        var response = await apiContext!.get(args.url);
    
        return {
          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 {
          content: [{
            type: "text",
            text: `Failed to perform GET operation on ${args.url}: ${(error as Error).message}`,
          }],
          isError: true,
        };
      }
  • The input schema definition for the 'playwright_get' tool, specifying a required '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"],
      },
    },
  • src/tools.ts:166-173 (registration)
    Registration of 'playwright_get' as part of the API_TOOLS array, likely used for conditional browser or context launching.
    // API Request tools for conditional launch
    export const API_TOOLS = [
      "playwright_get",
      "playwright_post",
      "playwright_put",
      "playwright_delete",
      "playwright_patch"
    ];
  • src/tools.ts:36-152 (registration)
    The 'playwright_get' tool is included in the main TOOLS export array, which serves as the central registration point for all MCP tools.
      },
      {
        name: "playwright_click",
        description: "Click an element on the page",
        inputSchema: {
          type: "object",
          properties: {
            selector: { type: "string", description: "CSS selector for element to click" },
          },
          required: ["selector"],
        },
      },
      {
        name: "playwright_fill",
        description: "fill out an input field",
        inputSchema: {
          type: "object",
          properties: {
            selector: { type: "string", description: "CSS selector for input field" },
            value: { type: "string", description: "Value to fill" },
          },
          required: ["selector", "value"],
        },
      },
      {
        name: "playwright_select",
        description: "Select an element on the page with Select tag",
        inputSchema: {
          type: "object",
          properties: {
            selector: { type: "string", description: "CSS selector for element to select" },
            value: { type: "string", description: "Value to select" },
          },
          required: ["selector", "value"],
        },
      },
      {
        name: "playwright_hover",
        description: "Hover an element on the page",
        inputSchema: {
          type: "object",
          properties: {
            selector: { type: "string", description: "CSS selector for element to hover" },
          },
          required: ["selector"],
        },
      },
      {
        name: "playwright_evaluate",
        description: "Execute JavaScript in the browser console",
        inputSchema: {
          type: "object",
          properties: {
            script: { type: "string", description: "JavaScript code to execute" },
          },
          required: ["script"],
        },
      },
      {
        name: "playwright_get",
        description: "Perform an HTTP GET request",
        inputSchema: {
          type: "object",
          properties: {
            url: { type: "string", description: "URL to perform GET operation" }
          },
          required: ["url"],
        },
      },
      {
        name: "playwright_post",
        description: "Perform an HTTP POST request",
        inputSchema: {
          type: "object",
          properties: {
            url: { type: "string", description: "URL to perform POST operation" },
            value: { type: "string", description: "Data to post in the body" },
          },
          required: ["url", "value"],
        },
      },
      {
        name: "playwright_put",
        description: "Perform an HTTP PUT request",
        inputSchema: {
          type: "object",
          properties: {
            url: { type: "string", description: "URL to perform PUT operation" },
            value: { type: "string", description: "Data to PUT in the body" },
          },
          required: ["url", "value"],
        },
      },
      {
        name: "playwright_patch",
        description: "Perform an HTTP PATCH request",
        inputSchema: {
          type: "object",
          properties: {
            url: { type: "string", description: "URL to perform PUT operation" },
            value: { type: "string", description: "Data to PATCH in the body" },
          },
          required: ["url", "value"],
        },
      },
      {
        name: "playwright_delete",
        description: "Perform an HTTP DELETE request",
        inputSchema: {
          type: "object",
          properties: {
            url: { type: "string", description: "URL to perform DELETE operation" }
          },
          required: ["url"],
        },
      },
    ];
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 but lacks critical details: it doesn't mention authentication needs, rate limits, error handling, response format, or whether it follows redirects. For a network tool with zero annotation coverage, 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 extremely concise ('Perform an HTTP GET request')—a single, front-loaded sentence with zero waste. It efficiently communicates the core action without unnecessary words, 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 the complexity of HTTP requests and the lack of annotations and output schema, the description is incomplete. It doesn't cover behavioral aspects like authentication, error handling, or response structure, which are crucial for an agent to use this tool effectively. The description fails to compensate for the missing structured data.

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 examples or constraints on URL format). With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but doesn't detract either.

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') and resource ('HTTP request'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its siblings (like playwright_post or playwright_patch) beyond the HTTP method, 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. With siblings like playwright_post, playwright_put, and playwright_patch available, there's no indication of when GET is appropriate (e.g., for retrieving data) versus when other methods should be used, leaving usage context implied at best.

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/lars-hagen/mcp-playwright-cdp'

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