Skip to main content
Glama
Ucode-io

Postman MCP Generator

by Ucode-io

get_data

Retrieve specific data from the Ucode Items API by providing a resource ID, enabling streamlined access to targeted information with Postman MCP Generator integration.

Instructions

Get data from the Ucode Items API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe ID of the resource to retrieve.

Implementation Reference

  • The core handler function `executeFunction` that performs the HTTP GET request to retrieve data from the Ucode Items API using the provided `id` parameter.
    const executeFunction = async ({ id }) => {
      const baseUrl = 'https://postman-rest-api-learner.glitch.me/';
      const token = process.env.UCODE_PUBLIC_APIS_API_KEY;
      try {
        // Construct the URL with query parameters
        const url = new URL(`${baseUrl}/info`);
        url.searchParams.append('id', id);
    
        // Perform the fetch request
        const response = await fetch(url.toString(), {
          method: 'GET',
          headers: {
            'Content-Type': 'application/json'
          }
        });
    
        // 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 data = await response.json();
        return data;
      } catch (error) {
        console.error('Error getting data:', error);
        return { error: 'An error occurred while getting data.' };
      }
    };
  • The tool schema definition including name 'get_data', description, input parameters schema (object with required integer 'id'), used for MCP tool registration.
      name: 'get_data',
      description: 'Get data from the Ucode Items API.',
      parameters: {
        type: 'object',
        properties: {
          id: {
            type: 'integer',
            description: 'The ID of the resource to retrieve.'
          }
        },
        required: ['id']
      }
    }
  • lib/tools.js:7-16 (registration)
    The `discoverTools` function that dynamically loads and registers all tools (including get_data) by importing their apiTool exports based on paths.
    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);
    }
  • mcpServer.js:85-86 (registration)
    Invocation of discoverTools() in the MCP server startup to load the tools array containing the get_data tool.
    const tools = await discoverTools();
  • Array of tool file paths used for dynamic loading, including the path to get-data.js.
    export const toolPaths = [
      'ucode-public-apis/ucode-items-ap-is/post-data.js',
      'ucode-public-apis/ucode-items-ap-is/get-data.js',
      'ucode-public-apis/ucode-items-ap-is/delete-data.js',
      'ucode-public-apis/ucode-items-ap-is/update-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. It states 'Get data' which implies a read operation, but doesn't cover aspects like authentication needs, rate limits, error handling, or what the response looks like. This is a significant gap for a tool with no 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It's front-loaded with the core action, making it easy to parse, though it could be more informative without sacrificing brevity.

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. It doesn't explain what 'data' is returned, how it's structured, or any behavioral traits like side effects. For a tool with siblings indicating a CRUD-like API, more context is needed to guide the agent effectively.

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 description adds no parameter-specific information beyond the input schema, which has 100% coverage for the single parameter 'id'. Since the schema already fully documents the parameter, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract from the schema's completeness.

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 ('Get data') and target ('from the Ucode Items API'), which is clear but vague. It doesn't specify what kind of data is retrieved or differentiate from sibling tools like 'delete_data' or 'update_data', which would require more specificity about the operation's scope.

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. With siblings like 'delete_data', 'post_data', and 'update_data', the description lacks explicit instructions on use cases, prerequisites, or exclusions, leaving the agent to infer usage from the tool name alone.

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