Skip to main content
Glama
plutzilla

Omnisend MCP Server

getProduct

Retrieve detailed product information from the Omnisend marketing platform using a unique identifier to access specific product data for management and tracking operations.

Instructions

Retrieve detailed information about a specific product by its unique identifier.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'getProduct' tool. It calls the underlying API function, applies field filtering, and returns the product data as formatted JSON text in the MCP response format.
    async (args) => {
      try {
        const response = await getProduct(args.productId);
        
        // Filter product data to include only defined fields
        const filteredProduct = filterProductFields(response);
        
        return {
          content: [
            { 
              type: "text", 
              text: JSON.stringify(filteredProduct, null, 2) 
            }
          ]
        };
      } catch (error) {
        if (error instanceof Error) {
          return { content: [{ type: "text", text: `Error: ${error.message}` }] };
        }
        return { content: [{ type: "text", text: "An unknown error occurred" }] };
      }
    }
  • Input schema validation for the 'getProduct' tool, specifying that a 'productId' string is required.
    {
      additionalProperties: false,
      properties: {
        productId: { description: "Product ID", type: "string" }
      },
      required: ["productId"],
      type: "object"
    },
  • Registration of the 'getProduct' tool on the MCP server using server.tool(), including name, description, schema, and handler.
    server.tool(
      "getProduct",
      "Retrieve detailed information about a specific product by its unique identifier.",
      {
        additionalProperties: false,
        properties: {
          productId: { description: "Product ID", type: "string" }
        },
        required: ["productId"],
        type: "object"
      },
      async (args) => {
        try {
          const response = await getProduct(args.productId);
          
          // Filter product data to include only defined fields
          const filteredProduct = filterProductFields(response);
          
          return {
            content: [
              { 
                type: "text", 
                text: JSON.stringify(filteredProduct, null, 2) 
              }
            ]
          };
        } catch (error) {
          if (error instanceof Error) {
            return { content: [{ type: "text", text: `Error: ${error.message}` }] };
          }
          return { content: [{ type: "text", text: "An unknown error occurred" }] };
        }
      }
    );
  • Supporting API utility function that performs the HTTP GET request to retrieve product details from the Omnisend API.
    export const getProduct = async (productId: string): Promise<Product> => {
      try {
        const response = await omnisendApi.get<Product>(`/products/${productId}`);
        return response.data;
      } catch (error) {
        if (error instanceof Error) {
          throw new Error(`Error getting product information: ${error.message}`);
        } else {
          throw new Error('Unknown error occurred when getting product');
        }
      }
    };
Behavior2/5

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

With no annotations provided, the description carries full burden but only states it's a retrieval operation. It doesn't disclose behavioral traits such as error handling, authentication needs, rate limits, or what 'detailed information' entails, which is insufficient for a 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 that directly states the tool's function without any wasted words. It is appropriately sized and front-loaded, making it easy to understand quickly.

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 simplicity (0 parameters, no output schema), the description is minimal but lacks completeness. It doesn't explain what 'detailed information' includes, error cases, or how it differs from siblings, leaving gaps in context despite the low complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description adds value by specifying retrieval by 'unique identifier', which clarifies the expected input context beyond the empty schema, justifying a score above the baseline of 3.

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 ('retrieve detailed information') and resource ('specific product'), making the purpose evident. However, it doesn't explicitly differentiate from sibling tools like 'getCategory' or 'getContact', which follow the same pattern for different resources, so it doesn't reach the highest 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?

The description provides no guidance on when to use this tool versus alternatives like 'listProducts' or 'getCategory'. It mentions retrieving by 'unique identifier' but doesn't clarify prerequisites or exclusions, leaving usage context implied at best.

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/plutzilla/omnisend-mcp'

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