Skip to main content
Glama

playwright_patch

Execute browser automation HTTP PATCH requests via the Playwright framework, enabling data updates on web pages using Chrome DevTools Protocol.

Instructions

Perform an HTTP PATCH request

Input Schema

NameRequiredDescriptionDefault
urlYesURL to perform PUT operation
valueYesData to PATCH in the body

Input Schema (JSON Schema)

{ "properties": { "url": { "description": "URL to perform PUT operation", "type": "string" }, "value": { "description": "Data to PATCH in the body", "type": "string" } }, "required": [ "url", "value" ], "type": "object" }

Implementation Reference

  • The handler function for the 'playwright_patch' tool. It sends a PATCH request to the specified URL with the provided JSON data using Playwright's APIRequestContext and returns the response details.
    case "playwright_patch": try { var data = { data: args.value, headers: { 'Content-Type': 'application/json' } }; var response = await apiContext!.patch(args.url, data); return { content: [{ type: "text", text: `Performed PATCH Operation ${args.url} with data ${JSON.stringify(args.value, null, 2)}`, }, { 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 PATCH operation on ${args.url}: ${(error as Error).message}`, }], isError: true, }; }

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

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