Skip to main content
Glama

playwright_get

Execute HTTP GET requests in a browser environment using the MCP Playwright server, allowing LLMs to retrieve web page content and interact with URLs programmatically.

Instructions

Perform an HTTP GET request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to perform GET operation

Implementation Reference

  • Implements the core handler logic for the 'playwright_get' tool. Performs an HTTP GET request using Playwright's APIRequestContext and returns status and truncated response body.
    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 ? '...' : ''}`
          ]);
        });
      }
    }
  • Defines the tool schema including name, description, and input validation schema requiring a '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"],
      },
    },
  • Registers the tool handler dispatch in the main switch statement of handleToolCall function.
    case "playwright_get":
      return await getRequestTool.execute(args, context);
  • Lazily instantiates the GetRequestTool (and other API tools) in the initializeTools function called before handling tool calls.
    // API tools
    if (!getRequestTool) getRequestTool = new GetRequestTool(server);
    if (!postRequestTool) postRequestTool = new PostRequestTool(server);
    if (!putRequestTool) putRequestTool = new PutRequestTool(server);
    if (!patchRequestTool) patchRequestTool = new PatchRequestTool(server);
    if (!deleteRequestTool) deleteRequestTool = new DeleteRequestTool(server);
Behavior1/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. The description only states what the tool does at a high level ('Perform an HTTP GET request') without revealing any behavioral traits such as error handling, timeout behavior, authentication requirements, rate limits, or what happens with redirects. This is inadequate for a tool that performs network operations.

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 with just three words ('Perform an HTTP GET request'), which is appropriately sized for a simple tool. It's front-loaded with the core action and wastes no words, though this conciseness comes at the cost of completeness.

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 that this is an HTTP request tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns (HTML content, response headers, status codes), error conditions, or how it integrates with the Playwright context. The description should provide more context about the tool's behavior and results.

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 single parameter 'url' clearly documented as 'URL to perform GET operation'. The description doesn't add any additional meaning beyond what the schema provides, such as URL format requirements or examples. With high schema coverage, the baseline score of 3 is appropriate.

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') and specifies the resource type (HTTP request). However, it doesn't distinguish this tool from its sibling HTTP methods like playwright_post, playwright_put, playwright_patch, or playwright_delete, which all perform HTTP requests but with different methods.

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 that this is for HTTP GET requests specifically, nor does it differentiate from other HTTP methods in the sibling tools list or from other navigation tools like playwright_navigate.

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

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