Skip to main content
Glama

playwright_put

Execute HTTP PUT requests to update data on specified URLs using Playwright within the MCP Browser Automation Server for streamlined browser task automation.

Instructions

Perform an HTTP PUT request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to perform PUT operation
valueYesData to PUT in the body

Implementation Reference

  • The handler function for 'playwright_put' that executes an HTTP PUT request using Playwright's APIRequestContext, sends JSON data, and returns response details or error.
    case "playwright_put": try { var data = { data: args.value, headers: { 'Content-Type': 'application/json' } }; var response = await apiContext!.put(args.url, data); return { toolResult: { content: [{ type: "text", text: `Performed PUT 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 { toolResult: { content: [{ type: "text", text: `Failed to perform PUT operation on ${args.url}: ${(error as Error).message}`, }], isError: true, }, }; }
  • Input schema definition for the 'playwright_put' tool, specifying required url and value parameters.
    { 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"], }, },
  • Array of API tools including 'playwright_put' used to determine if APIRequestContext should be initialized in the handler.
    export const API_TOOLS = [ "playwright_get", "playwright_post", "playwright_put", "playwright_delete", "playwright_patch" ];

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/hrmeetsingh/mcp-browser-automation'

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