Skip to main content
Glama
Ucode-io

Postman MCP Generator

by Ucode-io

post_data

Send data to the Ucode Items API by specifying the name in the request body. Integrates with Postman MCP Generator for API interactions using the Model Context Protocol.

Instructions

Post data to the Ucode Items API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name to be added in the request body.

Implementation Reference

  • The executeFunction that handles the tool logic: posts data to the API endpoint using fetch with the provided 'name' parameter.
    const executeFunction = async ({ name }) => {
      const baseUrl = 'https://postman-rest-api-learner.glitch.me/';
      const token = process.env.UCODE_PUBLIC_APIS_API_KEY;
      const data = { name };
    
      try {
        // Perform the fetch request
        const response = await fetch(`${baseUrl}/info`, {
          method: 'POST',
          headers: {
            'Content-Type': 'application/json',
          },
          body: JSON.stringify(data),
        });
    
        // Check if the response was successful
        if (!response.ok) {
          const errorData = await response.json();
          throw new Error(errorData);
        }
    
        // Parse and return the response data
        const responseData = await response.json();
        return responseData;
      } catch (error) {
        console.error('Error posting data:', error);
        return { error: 'An error occurred while posting data.' };
      }
    };
  • The apiTool object defining the tool's schema, including name 'post_data', description, and input parameters schema.
    const apiTool = {
      function: executeFunction,
      definition: {
        type: 'function',
        function: {
          name: 'post_data',
          description: 'Post data to the Ucode Items API.',
          parameters: {
            type: 'object',
            properties: {
              name: {
                type: 'string',
                description: 'The name to be added in the request body.'
              }
            },
            required: ['name']
          }
        }
      }
    };
  • lib/tools.js:7-16 (registration)
    The discoverTools function that dynamically imports and registers all tools from paths.js, including post_data by loading its apiTool.
    export async function discoverTools() {
      const toolPromises = toolPaths.map(async (file) => {
        const module = await import(`../tools/${file}`);
        return {
          ...module.apiTool,
          path: file,
        };
      });
      return Promise.all(toolPromises);
    }
  • tools/paths.js:1-2 (registration)
    The toolPaths array that includes the path to the post-data.js tool file, used for dynamic loading.
    export const toolPaths = [
      'ucode-public-apis/ucode-items-ap-is/post-data.js',
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Post data' implies a write operation, but it doesn't specify permissions needed, side effects, error handling, or response format. This leaves critical behavioral traits undocumented, making it insufficient for safe and effective use.

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 directly states the tool's action and target without unnecessary details. It's appropriately sized and front-loaded, making it easy to parse quickly. This is an example of optimal 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 lack of annotations and output schema, the description is incomplete for a write operation tool. It doesn't explain what happens after posting (e.g., success response, error cases), nor does it address behavioral aspects like authentication or rate limits. For a tool with one parameter but no structured safety info, more context is needed.

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 'name' parameter clearly documented. The description adds no additional meaning beyond the schema, such as examples or constraints. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 states the action ('Post data') and target ('Ucode Items API'), which clarifies the basic purpose. However, it doesn't specify what type of data is posted or how it differs from sibling tools like 'update_data', making it somewhat vague. It avoids tautology by not just restating the 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 'update_data' or 'delete_data'. There's no mention of prerequisites, context, or exclusions, leaving the agent to infer usage based on the name alone. This lack of explicit direction reduces its effectiveness.

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/Ucode-io/mcp-server'

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