Skip to main content
Glama

playwright_delete

Execute an HTTP DELETE request on a specified URL using the Playwright MCP Server, enabling browser automation for web interactions and content removal.

Instructions

Perform an HTTP DELETE request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to perform DELETE operation

Implementation Reference

  • DeleteRequestTool class: executes the playwright_delete tool by sending a DELETE HTTP request using Playwright's APIRequestContext, retrieves response status and body (truncated), and returns formatted success response.
    export class DeleteRequestTool extends ApiToolBase { /** * Execute the DELETE request tool */ async execute(args: any, context: ToolContext): Promise<ToolResponse> { return this.safeExecute(context, async (apiContext) => { const response = await apiContext.delete(args.url); let responseText; try { responseText = await response.text(); } catch (error) { responseText = "Unable to get response text"; } return createSuccessResponse([ `DELETE request to ${args.url}`, `Status: ${response.status()} ${response.statusText()}`, `Response: ${responseText.substring(0, 1000)}${responseText.length > 1000 ? '...' : ''}` ]); }); } }
  • Tool definition with input schema for 'playwright_delete': requires 'url' parameter.
    { name: "playwright_delete", description: "Perform an HTTP DELETE request", inputSchema: { type: "object", properties: { url: { type: "string", description: "URL to perform DELETE operation" } }, required: ["url"], }, },
  • Dispatch/registration in toolHandler switch statement: routes 'playwright_delete' calls to DeleteRequestTool.execute()
    case "playwright_delete": return await deleteRequestTool.execute(args, context);
  • Instantiation of DeleteRequestTool instance during tool initialization.
    if (!deleteRequestTool) deleteRequestTool = new DeleteRequestTool(server);
  • Included in API_TOOLS array for conditional API context setup.
    "playwright_delete",

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/BhanuTJ93/MCP'

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