Skip to main content
Glama
devskido

Playwright MCP Server

by devskido

playwright_get

Perform HTTP GET requests to retrieve web content using browser automation, enabling web scraping and data extraction from live pages.

Instructions

Perform an HTTP GET request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to perform GET operation

Implementation Reference

  • GetRequestTool class with execute method that performs HTTP GET request using Playwright API context, fetches response text, and returns formatted status and truncated response.
    export class GetRequestTool extends ApiToolBase {
      /**
       * Execute the GET request tool
       */
      async execute(args: any, context: ToolContext): Promise<ToolResponse> {
        return this.safeExecute(context, async (apiContext) => {
          const response = await apiContext.get(args.url);
          
          let responseText;
          try {
            responseText = await response.text();
          } catch (error) {
            responseText = "Unable to get response text";
          }
          
          return createSuccessResponse([
            `GET request to ${args.url}`,
            `Status: ${response.status()} ${response.statusText()}`,
            `Response: ${responseText.substring(0, 1000)}${responseText.length > 1000 ? '...' : ''}`
          ]);
        });
      }
    }
  • Tool schema definition including name, description, and input schema requiring '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"],
      },
    },
  • Dispatch in handleToolCall function routing 'playwright_get' tool calls to the GetRequestTool instance.
    case "playwright_get":
      return await getRequestTool.execute(args, context);
  • Initialization of the GetRequestTool instance used for handling the tool.
    if (!getRequestTool) getRequestTool = new GetRequestTool(server);
  • Setup of API request context for API tools including playwright_get before executing the handler.
      context.apiContext = await ensureApiContext(args.url);
    } catch (error) {
Behavior1/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. 'Perform an HTTP GET request' gives minimal information - it doesn't describe what happens (does it follow redirects? handle cookies? return headers?), error behavior, timeout settings, or any side effects. This is inadequate for a tool that makes network requests.

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 maximally concise - a single clear sentence that states exactly what the tool does. There's zero waste or 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?

For a network request tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the tool returns (response body, status code, headers), error conditions, or behavioral characteristics. Given the complexity of HTTP requests and lack of structured metadata, more context is needed.

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 'url' parameter well-documented in the schema. The description doesn't add any parameter information beyond what the schema provides (no format requirements, validation rules, or examples). Baseline 3 is appropriate when 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 ('Perform an HTTP GET request') which is a specific verb+resource combination. It distinguishes from siblings like playwright_post, playwright_put, playwright_delete by specifying the HTTP method, though it doesn't explicitly mention these alternatives in the description itself.

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 other HTTP methods available in sibling tools (post, put, delete, patch) or when to use playwright_navigate for navigation versus playwright_get for HTTP requests.

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/devskido/customed-playwright'

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