Skip to main content
Glama
luis0794

Violett MCP Server

by luis0794

post_data

Send HTTP POST requests with data payloads to specified URLs for API integration and data transmission.

Instructions

Send data via HTTP POST request

Input Schema

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

Implementation Reference

  • Handler function for the 'post_data' tool that performs an HTTP POST request with the provided data to the specified URL, returns response status, headers, and body, or error details if failed.
    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,
        };
      }
    }
  • Schema definition for the 'post_data' tool including name, description, and input schema requiring 'url' (string) and 'data' (object).
    {
      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"],
      },
    },
  • Registration of available tools list including 'post_data' in the ListToolsRequestHandler.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          {
            name: "fetch_url",
            description: "Fetch content from a URL via HTTP GET request",
            inputSchema: {
              type: "object",
              properties: {
                url: {
                  type: "string",
                  description: "URL to fetch",
                },
              },
              required: ["url"],
            },
          },
          {
            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"],
            },
          },
        ],
      };
    });
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the HTTP method (POST) but lacks critical details like authentication requirements, error handling, rate limits, response format, or 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 zero wasted words. It's appropriately sized and front-loaded, directly stating the tool's function 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 the tool's complexity (HTTP POST with mutation potential), lack of annotations, and no output schema, the description is insufficient. It doesn't address authentication, error cases, response structure, or behavioral traits needed for safe and effective use, leaving significant gaps.

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 both parameters ('url' and 'data') well-documented in the schema. The description adds no additional meaning beyond what the schema provides, such as format examples or constraints, so it meets the baseline for high schema coverage.

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 ('Send data') and method ('via HTTP POST request'), providing a specific verb+resource combination. However, it doesn't differentiate from the sibling tool 'fetch_url' (likely a GET request tool), which would require explicit comparison to achieve a perfect score.

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 'fetch_url' or other HTTP methods. The description only states what the tool does, not when it's appropriate, leaving the agent to infer usage context without explicit direction.

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

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