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),
    },
Behavior2/5

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

No annotations exist, so the description must bear the full burden. It indicates the tool creates new content, but does not mention idempotency, safety, permissions, or side effects. Key behavioral traits like rate limits or whether it overwrites existing data are absent.

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 a single, well-structured sentence that front-loads the action and purpose. While it is concise, it sacrifices important details; however, the brevity does not cause confusion.

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?

Given the tool's complexity (generating ad creatives with multiple platforms and parameters) and no output schema, the description is too sparse. It does not specify the output format, how the brief should be structured, or how to handle errors. Sibling tools exist but no differentiation is provided.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 50% (two of four parameters have descriptions). The tool description adds no explanation for the 'platform' or 'count' parameters beyond the schema, and does not clarify how 'brand DNA' maps to 'project_id'. The description does not compensate for the schema gaps.

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 generates ad creatives (copy and concepts) for Meta or Google, using brand DNA and a brief. It distinguishes from sibling tools like maasy_generate_content by being specific to ads, though the platform list in the description omits TikTok, which is in the schema.

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?

No guidance is provided on when to use this tool versus alternatives like maasy_generate_content or maasy_create_landing. The description does not specify prerequisites, ideal contexts, or exclusion criteria.

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/Jbelieve/mcp-server'

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