Skip to main content
Glama

playwright_delete

Execute HTTP DELETE requests to remove resources from web servers using the MCP Playwright server, enabling browser automation and web interaction.

Instructions

Perform an HTTP DELETE request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to perform DELETE operation

Implementation Reference

  • DeleteRequestTool class with execute method that performs HTTP DELETE request via Playwright API context, retrieves response, and formats 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 ? '...' : ''}`
          ]);
        });
      }
    } 
  • Input schema definition for the playwright_delete tool, specifying required '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 in handleToolCall switch statement registering and routing 'playwright_delete' calls to the DeleteRequestTool's execute method.
    case "playwright_delete":
      return await deleteRequestTool.execute(args, context);
  • Instantiation of DeleteRequestTool instance in initializeTools function.
    if (!deleteRequestTool) deleteRequestTool = new DeleteRequestTool(server);
  • Global variable declaration for DeleteRequestTool instance.
    let deleteRequestTool: DeleteRequestTool;
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the action without disclosing behavioral traits. It doesn't mention authentication needs, rate limits, error handling, or what happens upon deletion (e.g., resource removal, side effects). 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, efficient sentence with no wasted words. It's front-loaded and appropriately sized for a simple tool, earning full marks for conciseness.

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 the tool's complexity (a mutation operation with no annotations and no output schema), the description is incomplete. It lacks details on return values, error cases, or behavioral context, making it insufficient for safe and effective use by an AI agent.

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?

Schema description coverage is 100%, with the parameter 'url' well-documented in the schema. The description doesn't add any meaning beyond the schema, such as URL format constraints or examples, so it meets the baseline of 3 where 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' clearly states the action (DELETE) and resource type (HTTP request), but it's generic and doesn't distinguish from sibling tools like playwright_patch, playwright_post, and playwright_put, which are also HTTP methods. It lacks specificity about what gets deleted or the context.

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. It doesn't mention scenarios for DELETE requests, prerequisites, or comparisons to other HTTP methods in the sibling list, leaving the agent to infer usage based on general HTTP knowledge.

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

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

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