Skip to main content
Glama
plutzilla

Omnisend MCP Server

listProducts

Retrieve paginated product lists from the Omnisend catalog to manage and access product information with cursor-based navigation.

Instructions

Retrieve a list of products from the Omnisend catalog with pagination support. The response includes pagination information (next/previous cursor, limit, offset).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that executes the listProducts tool. It calls the imported listProducts helper from api-resources, applies product field filtering, formats the response as MCP content with JSON text, and handles errors.
    async (args) => {
      try {
        const response = await listProducts(args);
        
        // Filter products data to include only defined fields
        const filteredProducts = response.products.map(filterProductFields);
        
        return {
          content: [
            { 
              type: "text", 
              text: JSON.stringify({
                products: filteredProducts,
                paging: response.paging
              }, 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" }] };
      }
    }
  • JSON Schema defining the input parameters for the listProducts tool, including pagination, status, vendor, date filters, categories, and tags.
    {
      additionalProperties: false,
      properties: {
        limit: { description: "Maximum number of products to return", type: "number" },
        offset: { description: "Skip first N results", type: "number" },
        status: { description: "Filter products by status", enum: ["active", "draft", "archived"], type: "string" },
        vendor: { description: "Filter products by vendor/brand", type: "string" },
        createdAfter: { description: "Filter products created after specified date (ISO format)", type: "string" },
        updatedAfter: { description: "Filter products updated after specified date (ISO format)", type: "string" },
        categories: { description: "Filter products by categories", items: { type: "string" }, type: "array" },
        tags: { description: "Filter products by tags", items: { type: "string" }, type: "array" }
      },
      type: "object"
    },
  • The server.tool call that registers the listProducts tool with the MCP server, specifying name, description, input schema, and handler.
    server.tool(
      "listProducts",
      "Retrieve a list of products from the Omnisend catalog with pagination support. The response includes pagination information (next/previous cursor, limit, offset).",
      {
        additionalProperties: false,
        properties: {
          limit: { description: "Maximum number of products to return", type: "number" },
          offset: { description: "Skip first N results", type: "number" },
          status: { description: "Filter products by status", enum: ["active", "draft", "archived"], type: "string" },
          vendor: { description: "Filter products by vendor/brand", type: "string" },
          createdAfter: { description: "Filter products created after specified date (ISO format)", type: "string" },
          updatedAfter: { description: "Filter products updated after specified date (ISO format)", type: "string" },
          categories: { description: "Filter products by categories", items: { type: "string" }, type: "array" },
          tags: { description: "Filter products by tags", items: { type: "string" }, type: "array" }
        },
        type: "object"
      },
      async (args) => {
        try {
          const response = await listProducts(args);
          
          // Filter products data to include only defined fields
          const filteredProducts = response.products.map(filterProductFields);
          
          return {
            content: [
              { 
                type: "text", 
                text: JSON.stringify({
                  products: filteredProducts,
                  paging: response.paging
                }, 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 helper function that performs the HTTP GET request to the Omnisend '/products' API endpoint with query params and returns the ProductsResponse.
    export const listProducts = async (params: ListProductsParams = {}): Promise<ProductsResponse> => {
      try {
        const response = await omnisendApi.get<ProductsResponse>('/products', { params });
        return response.data;
      } catch (error) {
        if (error instanceof Error) {
          throw new Error(`Error getting products list: ${error.message}`);
        } else {
          throw new Error('Unknown error occurred when getting products list');
        }
      }
    };
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds useful context about pagination support and response structure (including cursors, limit, offset), which goes beyond a basic read operation. However, it doesn't cover aspects like rate limits, authentication needs, or error handling, leaving some gaps in transparency.

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 efficiently structured in two sentences: the first states the core purpose, and the second adds critical behavioral context (pagination). There is no wasted text, and information is front-loaded appropriately for a tool with no parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a list operation with pagination), no annotations, and no output schema, the description is moderately complete. It covers the pagination behavior but lacks details on response format, error cases, or integration with sibling tools. For a read-only tool with no params, this is adequate but has clear gaps.

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 the description doesn't need to compensate for undocumented parameters. It appropriately focuses on behavioral aspects (pagination) rather than parameter details, earning a baseline 4 for not adding unnecessary param info.

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 verb ('Retrieve') and resource ('list of products from the Omnisend catalog'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'getProduct' (singular) or 'listCategories'/'listContacts', which would require a more specific distinction to earn a 5.

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 'getProduct' (for single products) or 'listCategories'/'listContacts' (for other list operations). It mentions pagination support but doesn't specify scenarios where this is preferred over other list tools, 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