Skip to main content
Glama
plutzilla

Omnisend MCP Server

getCategory

Retrieve detailed product category information from Omnisend marketing platform using unique identifiers to manage product data.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for getCategory: calls API function, applies field filter, returns formatted JSON response or error.
    async (args) => {
      try {
        const response = await getCategory(args.categoryId);
        
        // Filter category data to include only defined fields
        const filteredCategory = filterCategoryFields(response);
        
        return {
          content: [
            { 
              type: "text", 
              text: JSON.stringify(filteredCategory, 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 JSON schema for getCategory tool: requires categoryId string.
    {
      additionalProperties: false,
      properties: {
        categoryId: { description: "Category ID", type: "string" }
      },
      required: ["categoryId"],
      type: "object"
    },
  • Registration of the getCategory MCP tool on the server.
    server.tool(
  • Core helper function implementing the Omnisend API call to fetch a single product category by ID.
    export const getCategory = async (categoryId: string): Promise<ProductCategory> => {
      try {
        const response = await omnisendApi.get<ProductCategory>(`/product-categories/${categoryId}`);
        return response.data;
      } catch (error) {
        if (error instanceof Error) {
          throw new Error(`Error getting category information: ${error.message}`);
        } else {
          throw new Error('Unknown error occurred when getting category');
        }
      }
  • Helper utility to filter and select specific fields from category data for tool responses.
    // Filter function for category data
    export const filterCategoryFields = (category: any) => {
      return {
        categoryID: category.categoryID,
        title: category.title,
        handle: category.handle,
        description: category.description,
        imageUrl: category.imageUrl,
        categoryUrl: category.categoryUrl,
        createdAt: category.createdAt,
        updatedAt: category.updatedAt
      };
    }; 
Behavior2/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 states this is a retrieval operation, implying it's likely read-only and non-destructive, but doesn't confirm this explicitly. It lacks details on authentication needs, error handling (e.g., what happens if the ID is invalid), rate limits, or response format. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 front-loads the core action ('Retrieve detailed information') and resource. There is no wasted language or redundancy, making it easy to parse quickly. Every word contributes directly to understanding the tool's function.

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 low complexity (0 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks behavioral details (e.g., safety, errors) and usage guidelines, which are more critical in this sparse context. Without annotations or output schema, the agent has incomplete information about how to invoke it successfully or interpret results.

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 schema fully documents the absence of parameters. The description adds value by specifying that retrieval is 'by its unique identifier,' implying an ID is needed, though it doesn't clarify if this is passed differently (e.g., in the URL or context). This extra semantic hint compensates slightly beyond the schema's empty state, warranting 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 verb ('Retrieve') and resource ('detailed information about a specific product category'), making the purpose understandable. It distinguishes from siblings like listCategories (which lists multiple categories) and updateCategory (which modifies categories). However, it doesn't explicitly contrast with getProduct or getContact, which have similar retrieval patterns for different resources.

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. It doesn't mention prerequisites (e.g., needing a category ID), exclusions (e.g., not for listing categories), or direct comparisons to siblings like listCategories (for browsing) or getProduct (for product details). The agent must infer usage from the name and context 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

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