Skip to main content
Glama
luis0794

Violett MCP Server

by luis0794

post_data

Send HTTP POST requests to a specified URL with custom data payloads using a tool on the Violett MCP Server to efficiently transmit information between systems.

Instructions

Send data via HTTP POST request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesData to send in POST body
urlYesURL to send POST request to

Implementation Reference

  • The handler for the 'post_data' tool. It extracts URL and data from arguments, performs an HTTP POST request using fetch with JSON body, and returns the response status, headers, and body as text content. Handles errors by returning an error message.
    case "post_data": { const url = request.params.arguments?.url as string; const data = request.params.arguments?.data; if (!url || !data) { throw new Error("URL and data are required"); } try { const response = await fetch(url, { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify(data), }); const responseText = await response.text(); const headers = Object.fromEntries(response.headers.entries()); return { content: [ { type: "text", text: `HTTP ${response.status} ${response.statusText}\n\nHeaders:\n${JSON.stringify(headers, null, 2)}\n\nResponse:\n${responseText}`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error posting data: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } }
  • The tool descriptor for 'post_data' registered in the ListToolsRequestHandler, including name, description, and input schema definition.
    { name: "post_data", description: "Send data via HTTP POST request", inputSchema: { type: "object", properties: { url: { type: "string", description: "URL to send POST request to", }, data: { type: "object", description: "Data to send in POST body", }, }, required: ["url", "data"], }, },
  • The input schema for the 'post_data' tool, defining required 'url' (string) and 'data' (object) properties.
    inputSchema: { type: "object", properties: { url: { type: "string", description: "URL to send POST request to", }, data: { type: "object", description: "Data to send in POST body", }, }, required: ["url", "data"], },

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/luis0794/violett-mcp-server'

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