Skip to main content
Glama

maasy_generate_ads

Generate ad copy and concepts for Meta or Google by combining brand DNA with a campaign brief. Specify product, audience, and offer to produce tailored creatives.

Instructions

Generate ad creatives (copy + concepts) for Meta or Google using brand DNA and a brief.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoBrand UUID
briefYesCampaign brief: product, objective, audience, offer
platformNometa
countNo

Implementation Reference

  • src/index.ts:315-325 (registration)
    Registration of the 'maasy_generate_ads' tool on the MCP server. It uses Zod schema for validation of inputs (project_id, brief, platform, count) and delegates to toolHandler('generate_ads').
    server.tool(
      "maasy_generate_ads",
      "Generate ad creatives (copy + concepts) for Meta or Google using brand DNA and a brief.",
      {
        project_id: z.string().optional().describe("Brand UUID"),
        brief: z.string().describe("Campaign brief: product, objective, audience, offer"),
        platform: z.enum(["meta", "google", "tiktok"]).optional().default("meta"),
        count: z.number().int().min(1).max(10).optional().default(3),
      },
      toolHandler("generate_ads")
    );
  • The toolHandler helper function that wraps every tool call. For 'generate_ads', it calls callGateway('generate_ads', args) which makes an HTTP POST to the mcp-gateway Supabase edge function.
    function toolHandler(toolName: string, argsFn?: (args: Record<string, unknown>) => Record<string, unknown>) {
      return async (args: Record<string, unknown>) => {
        try {
          const gatewayArgs = argsFn ? argsFn(args) : args;
          // Auto-inject default project_id if not provided
          if (DEFAULT_PROJECT_ID && !gatewayArgs.project_id) {
            gatewayArgs.project_id = DEFAULT_PROJECT_ID;
          }
          const result = await callGateway(toolName, gatewayArgs);
          return { content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }] };
        } catch (e: unknown) {
          return {
            content: [{ type: "text" as const, text: `Error: ${e instanceof Error ? e.message : String(e)}` }],
            isError: true,
          };
        }
      };
    }
  • The callGateway function that sends the tool name and arguments to the mcp-gateway edge function. This is the actual execution point — it sends { tool: 'generate_ads', args } to the remote gateway.
    export async function callGateway(tool: string, args: Record<string, unknown> = {}): Promise<unknown> {
      const res = await fetch(gatewayUrl, {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          [authHeader.name]: authHeader.value,
        },
        body: JSON.stringify({ tool, args }),
      });
    
      const data = await res.json();
    
      if (!res.ok) {
        throw new Error(data.error || `Gateway error (${res.status})`);
      }
    
      return data.result;
    }
  • Zod input schema for the 'maasy_generate_ads' tool: project_id (optional string), brief (required string), platform (optional enum: meta/google/tiktok, default meta), count (optional int 1-10, default 3).
    {
      project_id: z.string().optional().describe("Brand UUID"),
      brief: z.string().describe("Campaign brief: product, objective, audience, offer"),
      platform: z.enum(["meta", "google", "tiktok"]).optional().default("meta"),
      count: z.number().int().min(1).max(10).optional().default(3),
    },

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.1

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden for behavioral disclosure. It does not mention whether the tool has side effects, requires permissions, or what the output format is. 'Generate' suggests a non-destructive action, but this is not explicitly stated.

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, front-loaded sentence with no filler. It efficiently conveys the tool's core function and key inputs (brand DNA, brief) without redundancy.

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?

The tool has no output schema, so the description should explain what the tool returns. It only says 'Generate ad creatives', which is vague about the format (e.g., text, structured object, list). Behavioral aspects like whether the tool persists anything are also missing, making the description incomplete for a 4-parameter generation tool.

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?

The schema already documents brief and project_id clearly. The description adds the concept of 'brand DNA', which loosely maps to project_id, but does not clarify count or platform semantics beyond the schema's enum and defaults. With 50% schema coverage, the description adds a small amount of value but does not fully compensate for missing parameter descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool generates ad creatives (copy + concepts) for Meta or Google using brand DNA and a brief. It specifies the exact deliverable and platforms, distinguishing it from sibling tools like maasy_generate_content, which is broader in scope.

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 explicit guidance on when to use this tool versus alternatives. It simply describes what the tool does without mentioning context, exclusions, or alternative tools, leaving the agent to infer usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.