Skip to main content
Glama

playwright_get

Execute HTTP GET requests to retrieve data from specified URLs using a real browser environment, enabling interactions with web pages for testing, scraping, or content extraction.

Instructions

Perform an HTTP GET request

Input Schema

NameRequiredDescriptionDefault
urlYesURL to perform GET operation

Input Schema (JSON Schema)

{ "properties": { "url": { "description": "URL to perform GET operation", "type": "string" } }, "required": [ "url" ], "type": "object" }

Implementation Reference

  • The execute method of GetRequestTool performs the HTTP GET request using the API context, retrieves the response text and status, and formats a success 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 ? '...' : ''}` ]); }); } }
  • The input schema definition for the 'playwright_get' tool, specifying the 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"], }, },
  • Registration in the main tool handler switch statement that routes calls to 'playwright_get' to the GetRequestTool instance.
    case "playwright_get": return await getRequestTool.execute(args, context);
  • Instantiation of the GetRequestTool class instance used for handling 'playwright_get' calls.
    if (!getRequestTool) getRequestTool = new GetRequestTool(server);
  • Inclusion of 'playwright_get' in the API_TOOLS array for conditional browser/API context initialization.
    "playwright_get",

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

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