Skip to main content
Glama
plutzilla

Omnisend MCP Server

getCurrentBrand

Retrieve current brand details from Omnisend, including ID, website, platform, currency, and configuration data for marketing operations.

Instructions

Retrieve information about the current brand from Omnisend. This includes brand ID, website, platform, version, currency, and other brand-related details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler function that executes the logic for 'getCurrentBrand': fetches the current brand via API, filters fields, formats as JSON text, and handles errors.
      async () => {
        try {
          const response = await getCurrentBrand();
          
          // Filter brand data to include only defined fields
          const filteredBrand = filterBrandFields(response);
          
          return {
            content: [
              { 
                type: "text", 
                text: JSON.stringify(filteredBrand, 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" }] };
        }
      }
    );
  • TypeScript interface definition for Brand, defining the structure of the brand data returned by the tool.
    export interface Brand {
      brandID: string;
      website?: string;
      platform?: string;
      version?: string;
      currency?: string;
      createdAt?: string;
      updatedAt?: string;
      [key: string]: unknown;
    } 
  • Registration of the 'getCurrentBrand' tool on the MCP server, including name, description, input schema, and handler.
    export const registerBrandsTools = (server: McpServer) => {
      // Get current brand tool
      server.tool(
        "getCurrentBrand",
        "Retrieve information about the current brand from Omnisend. This includes brand ID, website, platform, version, currency, and other brand-related details.",
        {
          additionalProperties: false,
          properties: {},
          type: "object"
        },
        async () => {
          try {
            const response = await getCurrentBrand();
            
            // Filter brand data to include only defined fields
            const filteredBrand = filterBrandFields(response);
            
            return {
              content: [
                { 
                  type: "text", 
                  text: JSON.stringify(filteredBrand, 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" }] };
          }
        }
      );
    }; 
  • Helper function that makes the API call to retrieve the current brand data from Omnisend.
    // Get current brand information
    export const getCurrentBrand = async (): Promise<Brand> => {
      try {
        const response = await omnisendApi.get<Brand>('/brands/current');
        return response.data;
      } catch (error) {
        if (error instanceof Error) {
          throw new Error(`Error getting current brand information: ${error.message}`);
        } else {
          throw new Error('Unknown error occurred when getting current brand');
        }
      }
    }; 
  • Helper function to filter brand data to only include relevant fields matching the Brand interface.
    export const filterBrandFields = (brand: any) => {
      return {
        brandID: brand.brandID,
        website: brand.website,
        platform: brand.platform,
        version: brand.version,
        currency: brand.currency,
        createdAt: brand.createdAt,
        updatedAt: brand.updatedAt
      };
    }; 
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. It indicates this is a read operation ('Retrieve'), but doesn't disclose behavioral traits like authentication needs, rate limits, or error handling. It adds some context by listing the returned data types, but lacks details on response format or potential side effects. This is adequate but has clear gaps 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 two sentences that efficiently state the purpose and scope without redundancy. It's front-loaded with the core function and follows with specific details. Every sentence adds value, and there's no wasted text.

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 complete. It explains what data is returned but lacks information on response structure or operational context. Without annotations or output schema, it should ideally provide more behavioral details, but it's adequate for a simple retrieval tool.

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 tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to compensate for any gaps, and it appropriately doesn't discuss parameters. Baseline 4 is applied as it meets expectations for a parameterless tool.

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 tool's purpose with a specific verb ('Retrieve') and resource ('information about the current brand'), including what data is returned (brand ID, website, etc.). It distinguishes this from siblings like getCategory or getProduct by specifying brand information rather than other entity types. However, it doesn't explicitly contrast with all siblings, keeping it at 4 instead of 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. It doesn't mention prerequisites, context for brand retrieval, or comparisons to other tools like getCategory or listContacts. Usage is implied by the purpose but lacks explicit when/when-not instructions.

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