Skip to main content
Glama
devskido

Playwright MCP Server

by devskido

playwright_delete

Delete web resources by sending HTTP DELETE requests through browser automation, enabling removal of data or content from web servers.

Instructions

Perform an HTTP DELETE request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to perform DELETE operation

Implementation Reference

  • The DeleteRequestTool class provides the execute method that performs the HTTP DELETE request to the specified URL using Playwright's API request context and returns the status and 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 ? '...' : ''}`
          ]);
        });
      }
    } 
  • Defines the input schema for the playwright_delete tool, requiring a '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"],
      },
    },
  • Registers the dispatching of 'playwright_delete' tool calls to the DeleteRequestTool's execute method in the main tool handler switch statement.
    case "playwright_delete":
      return await deleteRequestTool.execute(args, context);
  • Initializes the DeleteRequestTool instance used for handling playwright_delete calls.
    if (!deleteRequestTool) deleteRequestTool = new DeleteRequestTool(server);
  • Imports the DeleteRequestTool class from the requests module.
      GetRequestTool,
      PostRequestTool,
      PutRequestTool,
      PatchRequestTool,
      DeleteRequestTool
    } from './tools/api/requests.js';
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it performs an HTTP DELETE request, which implies a destructive operation, but doesn't clarify permissions needed, rate limits, error handling, or what happens upon success (e.g., deletion confirmation). This is inadequate for a mutation tool with zero annotation coverage.

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 a single, direct sentence with no wasted words, making it highly concise and front-loaded. It efficiently communicates the core action without unnecessary elaboration.

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 this is a destructive HTTP operation with no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., response status, body), error conditions, or side effects, leaving significant gaps for an agent to use it correctly.

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 'url' parameter clearly documented. The description doesn't add any meaning beyond the schema, such as URL format examples or constraints. Baseline score of 3 is appropriate since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Perform an HTTP DELETE request' states the action (HTTP DELETE) but is generic and doesn't specify what resource it operates on or differentiate it from other HTTP method tools like playwright_post or playwright_put. It's clear but lacks specificity about what gets deleted.

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?

No guidance is provided on when to use this tool versus alternatives like playwright_post or playwright_put for other HTTP methods, or versus non-HTTP tools in the sibling list. The description implies usage for DELETE requests but doesn't specify contexts or exclusions.

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

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/devskido/customed-playwright'

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