Skip to main content
Glama

Creative Specifications

creative_specs
Read-onlyIdempotent

Retrieve platform-specific creative requirements for Google and Meta ad formats. Input platform and optional format filter to get exact dimensions, video specs, and character limits, preventing upload rejection.

Instructions

Platform-specific creative requirements for ad formats. Returns the exact image dimensions, aspect ratios, video duration and codec, headline/primary-text character limits, supported CTA buttons, and file size ceilings for each ad format. Input: platform ("google_ads"|"meta_ads") and optional format filter (e.g. "responsive_display", "video", "carousel", "single_image"). Use this before building creatives to avoid rejection at upload time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
platformYesPlatform to get specs for
formatNo

Implementation Reference

  • Tool handler for 'creative_specs' — receives platform and optional format, calls getCreativeSpecs() and returns the specs as JSON.
    // ── Tool 10: creative_specs ─────────────────────────────────────────
    
    server.registerTool(
      'creative_specs',
      {
        title: 'Creative Specifications',
        description: 'Platform-specific creative requirements for ad formats. Returns the exact image dimensions, aspect ratios, video duration and codec, headline/primary-text character limits, supported CTA buttons, and file size ceilings for each ad format. Input: platform ("google_ads"|"meta_ads") and optional format filter (e.g. "responsive_display", "video", "carousel", "single_image"). Use this before building creatives to avoid rejection at upload time.',
        inputSchema: CreativeSpecsInputSchema,
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
      },
      async ({ platform, format }) => {
        try {
          const specs = getCreativeSpecs(platform, format);
          return { content: [{ type: 'text' as const, text: JSON.stringify({
            platform,
            format_filter: format ?? 'all',
            specs_count: specs.length,
            specs,
          }, null, 2) }] };
        } catch (e) { return handleToolError(e); }
      },
    );
  • Input schema (CreativeSpecsInputSchema) for the creative_specs tool — validates platform and optional format filter.
    export const CreativeSpecsInputSchema = z.object({
      platform: PlatformSchema.describe('Platform to get specs for'),
      format: z.enum(['image', 'video', 'carousel', 'stories']).optional(),
    });
  • Type definition (CreativeSpecSchema) describing the shape of creative specification data — image_specs, video_specs, text_specs.
    export const CreativeSpecSchema = z.object({
      platform: PlatformSchema,
      format: z.string(),
      placement: z.string(),
      image_specs: z.object({
        width: z.number().int(),
        height: z.number().int(),
        aspect_ratio: z.string(),
        max_file_size_mb: z.number(),
        formats: z.array(z.string()),
      }).nullable(),
      video_specs: z.object({
        min_duration_sec: z.number(),
        max_duration_sec: z.number(),
        aspect_ratios: z.array(z.string()),
        max_file_size_mb: z.number(),
        formats: z.array(z.string()),
      }).nullable(),
      text_specs: z.object({
        headline_max_chars: z.number().int(),
        description_max_chars: z.number().int(),
        cta_options: z.array(z.string()),
      }),
    });
    export type CreativeSpec = z.infer<typeof CreativeSpecSchema>;
  • Helper functions getCreativeSpecs() and getAllCreativeSpecs() that filter the hardcoded CREATIVE_SPECS array by platform and optional format.
    /** Get platform-specific creative specifications filtered by platform and optional format. Returns image sizes, video specs, text limits, and CTA options. */
    export function getCreativeSpecs(platform: Platform, format?: string): CreativeSpec[] {
      let specs = CREATIVE_SPECS.filter((s) => s.platform === platform);
      if (format) {
        specs = specs.filter((s) => s.format.toLowerCase().includes(format.toLowerCase()));
      }
      return specs;
    }
    
    /** Get all creative specifications across all platforms and formats. */
    export function getAllCreativeSpecs(): CreativeSpec[] {
      return CREATIVE_SPECS;
    }
  • src/index.ts:751-751 (registration)
    Tool registration entry in the server card's tool list for the 'creative_specs' tool.
    { name: 'creative_specs', description: 'Platform creative requirements' },
Behavior3/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, which cover the safety profile. The description adds that the tool returns exact specifications, which aligns with the read-only nature. No additional behavioral traits (e.g., rate limits) are disclosed, but the description does not contradict annotations.

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 concise with three focusing sentences: first on output, second on input, third on usage. There is no redundancy. It is well-structured and front-loaded with the most critical information.

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

Completeness4/5

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

Given the lack of an output schema, the description provides a detailed list of return fields (image dimensions, aspect ratios, etc.). It also explains input parameters and gives a usage tip. The only gap is the inconsistency between description examples and schema enums, but overall the description covers essential context for a tool of this complexity.

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?

Schema coverage is 50% (format parameter lacks description). The description does add meaning by providing example values for format (e.g., 'responsive_display', 'single_image') and clarifying platform as 'google_ads'|'meta_ads', but these examples differ from the schema's enum values (platform: 'google'/'meta'; format: 'image'/'video'/'carousel'/'stories'). This inconsistency reduces reliability. Overall, the description partially compensates for the schema gap but introduces confusion.

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 returns platform-specific creative requirements and lists specific output fields. It is distinct from sibling tools. However, there is a minor inconsistency: the description mentions platform values 'google_ads' and 'meta_ads' while the schema uses 'google' and 'meta', which could cause confusion.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly advises using this tool 'before building creatives to avoid rejection at upload time', setting clear context. No direct alternatives are mentioned, but sibling tools do not overlap significantly, making the guidance effective.

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/enzoemir1/adops-mcp'

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