Skip to main content
Glama
hrmeetsingh

MCP Browser Automation Server

by hrmeetsingh

playwright_delete

Execute HTTP DELETE requests to specified URLs using Playwright automation. Streamline web data removal or API interactions within browser automation workflows.

Instructions

Perform an HTTP DELETE request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to perform DELETE operation

Implementation Reference

  • Executes the playwright_delete tool by performing an HTTP DELETE request to the provided URL using Playwright's APIRequestContext and returns the response status or error message.
    case "playwright_delete":
      try {
        var response = await apiContext!.delete(args.url);
    
        return {
          toolResult: {
            content: [{
              type: "text",
              text: `Performed delete Operation ${args.url}`,
            },
            {
              type: "text",
              text: `Response code ${response.status()}`
            }],
            isError: false,
          },
        };
      } catch (error) {
        return {
          toolResult: {
            content: [{
              type: "text",
              text: `Failed to perform delete operation on ${args.url}: ${(error as Error).message}`,
            }],
            isError: true,
          },
        };
      }
  • Defines the input schema for the playwright_delete tool, specifying the 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"],
      },
    },
  • src/index.ts:23-26 (registration)
    Registers all tools including playwright_delete by creating tool definitions from tools.ts and setting up request handlers on the MCP server.
    const TOOLS = createToolDefinitions();
    
    // Setup request handlers
    setupRequestHandlers(server, TOOLS);
  • Conditionally creates APIRequestContext for API tools like playwright_delete based on inclusion in API_TOOLS.
    // Check if the tool requires api interaction
    const requiresApi = API_TOOLS.includes(name);
    let page: Page | undefined;
    let apiContext: APIRequestContext;
    
    // Only launch browser if the tool requires browser interaction
    if (requiresBrowser) {
      page = await ensureBrowser();
    }
    
    // Set up API context for API-related operations
    if (requiresApi) {
      apiContext = await ensureApiContext(args.url);
    }
  • Helper function to create Playwright APIRequestContext with baseURL from args.url, used by API tools including playwright_delete.
    async function ensureApiContext(url: string) {
      return await request.newContext({
        baseURL: url,
      });
    }
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 the action but fails to describe key traits like authentication needs, rate limits, error handling, or what happens upon deletion (e.g., idempotency, side effects). This leaves significant gaps for an agent to understand the tool's behavior.

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 zero waste. It is appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration, making it highly concise and well-structured.

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 complexity of an HTTP DELETE operation, no annotations, and no output schema, the description is incomplete. It lacks details on response formats, error cases, or prerequisites, leaving the agent with insufficient context to use the tool effectively in real-world scenarios.

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 adds no additional meaning beyond what the schema provides, such as URL format examples or constraints. Baseline 3 is appropriate as the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the action ('Perform an HTTP DELETE request') which is a specific verb+resource combination. It distinguishes itself from siblings like playwright_get, playwright_post, and playwright_put by specifying the HTTP method, though it doesn't explicitly differentiate beyond the method name.

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?

The description provides no guidance on when to use this tool versus alternatives like playwright_delete's siblings (e.g., playwright_post for creating resources, playwright_put for updates). It lacks context on typical DELETE use cases such as resource removal, making it minimally helpful for decision-making.

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

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