Skip to main content
Glama

playwright_post

Execute HTTP POST requests to specified URLs with data payloads using the Playwright MCP Server, enabling browser automation and web interaction.

Instructions

Perform an HTTP POST request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to perform POST operation
valueYesData to post in the body

Implementation Reference

  • Handler for 'playwright_post' tool: performs HTTP POST request to the given URL with JSON data from 'value' argument, returns response JSON and status.
    case "playwright_post": try { var data = { data: args.value, headers: { 'Content-Type': 'application/json' } }; var response = await apiContext!.post(args.url, data); return { toolResult: { content: [{ type: "text", text: `Performed POST 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 POST operation on ${args.url}: ${(error as Error).message}`, }], isError: true, }, }; }
  • Schema definition for 'playwright_post' tool including input parameters 'url' and 'value'.
    { name: "playwright_post", description: "Perform an HTTP POST request", inputSchema: { type: "object", properties: { url: { type: "string", description: "URL to perform POST operation" }, value: { type: "string", description: "Data to post in the body" }, }, required: ["url", "value"], }, },
  • Registration of the tools list handler which exposes all tools including 'playwright_post' via MCP protocol.
    // List tools handler server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: tools, }));
  • API_TOOLS array categorizes 'playwright_post' as an API tool, triggering APIRequestContext setup in the handler.
    export const API_TOOLS = [ "playwright_get", "playwright_post", "playwright_put", "playwright_delete", "playwright_patch" ];

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

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