Skip to main content
Glama

Create AI Display CreativeDocuments from objective and requestedFormats without pre-existing creatives. Optional outputs requests static JPEG/PNG delivery after save_to_studio while retaining the editable document. Export existing versions with export_creative. Build and save existing Studio creative records. When campaignId or campaignName is supplied, LeanrIQ resolves the complete persisted campaign inventory, uses each saved brief, approved asset set, and eligible global or advertiser template, then runs the canonical Studio Gold build path. Campaign-scoped calls save by default; use persistence preview_only only for an unsaved ad-hoc preview.

build_ad
Idempotent

Create AI Display CreativeDocuments from objective and requestedFormats without pre-existing creatives. Optional outputs requests static JPEG/PNG delivery after save_to_studio while retaining the editable document. Export existing versions with export_creative. Build and save existing Studio creative records. When campaignId or campaignName is supplied, LeanrIQ resolves the complete persisted campaign inventory, uses each saved brief, approved asset set, and eligible global or advertiser template, then runs the canonical Studio Gold build path. Campaign-scoped calls save by default; use persistence preview_only only for an unsaved ad-hoc preview.. Classification: creates billable AI usage. Execution: durable. Task support: optional. Mutation modes: validate_only, preview_only, execute. Partial failure policy: completed_items_not_rolled_back. The returned JSON is internal application state for LeanrIQ and ChatGPT orchestration. Use assistantSummary first when responding to the user. Never display raw JSON, data, or meta unless the user explicitly asks for raw JSON. Mention IDs only when useful for follow-up or debugging. Prefer concise, human language, highlight the most useful insight, and suggest the next best LeanrIQ action. If idempotencyKey is omitted on a mutation, the MCP layer derives a deterministic retry key from the tool and business arguments so an accidental identical replay cannot create duplicate work. For a mutation when more than one seat is authorised, seatId or seatName must be supplied on that exact tool call; a remembered or previously selected seat is not sufficient for a write.

Input Schema

NameRequiredDescriptionDefault
briefNo
forceNo
inputNo
assetsNo
promptNo
seatIdNo
taskIdNo
assetIdNo
outputsNoOptional editable/static JPEG/PNG delivery requirements. Studio persistence is required for static output.
audienceNo
campaignNo
creativeNo
flightIdNo
seatNameNo
templateNo
accountIdNo
objectiveNo
advertiserNo
campaignIdNo
creativeIdNo
templateIdNo
creativeIdsNo
persistenceNo
advertiserIdNo
instructionsNo
sourceLocaleNo
targetMarketNo
contentLocaleNo
marketContextNo
targetMarketsNo
contentLocalesNo
idempotencyKeyNo
requestedFormatsNo
defaultContentLocaleNo
marketLanguageProfileNo
resolvedContentLocaleNo
skipTraffickedRebuildNo
languageVariantGroupIdNo
requestedOutputLocalesNo
supportedContentLocalesNo

Output Schema

NameRequiredDescriptionDefault
dataYes
metaYes
errorNo
statusYes
assistantSummaryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changed
    • addedInput schema / properties / contentLocale
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / contentLocales
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "maxItems": 20,
      +  "type": "array"
      +}
    • addedInput schema / properties / defaultContentLocale
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / languageVariantGroupId
      Added value: +{
      +  "maxLength": 160,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / marketContext
      Added value: +{
      +  "properties": {
      +    "currency": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "targetMarket": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "targetMarkets": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "timeZone": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / marketLanguageProfile
      Added value: +{
      +  "additionalProperties": {},
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / outputs
      Added value: +{
      +  "description": "Optional editable/static JPEG/PNG delivery requirements. Studio persistence is required for static output.",
      +  "items": {
      +    "anyOf": [
      +      {
      +        "additionalProperties": false,
      +        "properties": {
      +          "type": {
      +            "const": "editable",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "additionalProperties": false,
      +        "properties": {
      +          "format": {
      +            "enum": [
      +              "jpeg",
      +              "png"
      +            ],
      +            "type": "string"
      +          },
      +          "maxBytes": {
      +            "exclusiveMinimum": 0,
      +            "maximum": 9007199254740991,
      +            "type": "integer"
      +          },
      +          "quality": {
      +            "maximum": 100,
      +            "minimum": 1,
      +            "type": "integer"
      +          },
      +          "type": {
      +            "const": "static",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "enum": [
      +          "editable",
      +          "static_jpeg",
      +          "static_png"
      +        ],
      +        "type": "string"
      +      }
      +    ]
      +  },
      +  "maxItems": 8,
      +  "type": "array"
      +}
    • addedInput schema / properties / requestedOutputLocales
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "maxItems": 20,
      +  "type": "array"
      +}
    • addedInput schema / properties / resolvedContentLocale
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / sourceLocale
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / supportedContentLocales
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "maxItems": 20,
      +  "type": "array"
      +}
    • addedInput schema / properties / targetMarket
      Added value: +{
      +  "maxLength": 160,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / targetMarkets
      Added value: +{
      +  "items": {
      +    "maxLength": 160,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 50,
      +  "type": "array"
      +}
  2. First observed

TDQS

A4/5.0
Behavior5/5

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

Substantially exceeds the annotations: it discloses billable AI usage, durable execution, the validate_only/preview_only/execute mutation modes, a completed_items_not_rolled_back partial-failure policy, and two operational constraints not in the schema (automatic deterministic idempotencyKey derivation on mutation replay, and the requirement that seatId/seatName be passed on the exact write call when multiple seats are authorised). It also states the agent-facing response contract (use assistantSummary, don't dump raw JSON), which the annotations do not carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and routing are correctly front-loaded, which is good. But the text is padded with generic cross-tool boilerplate about assistantSummary, never displaying raw JSON, mentioning IDs only when useful, and concise human language, plus a duplicated title block and a stray double period; those sentences do not earn their place for this specific tool.

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?

For an extremely complex 40-parameter mutation with an output schema (so return values need no explanation), the description covers the essential behaviors: build path resolution, save-by-default vs preview, seat requirement, idempotency, billable usage, and failure semantics. The remaining shortfall is per-parameter meaning, which is a schema-coverage problem rather than a missing behavioral explanation.

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 description coverage is only 3% across 40 parameters, so the description must carry the burden. It does explain the semantically critical ones (objective, requestedFormats, outputs with static JPEG/PNG requiring Studio persistence, persistence default vs preview_only, campaignId/campaignName, seatId/seatName, idempotencyKey), but dozens of parameters (brief, input, assets, prompt, template, marketContext, locale fields, skipTraffickedRebuild, etc.) get no clarification, leaving most of the surface undocumented.

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 opening sentence gives a specific verb+resource+scope: 'Create AI Display CreativeDocuments from objective and requestedFormats without pre-existing creatives.' It also routes away for existing versions ('Export existing versions with export_creative'). However, with siblings like leanriq_build_ad, build_dooh, build_videoad and build_campaign_creative_set in the same family, it never explicitly says which build path this is versus those, so sibling differentiation is only partial.

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?

Gives concrete selection conditions: campaignId/campaignName triggers full persisted-campaign resolution and the Studio Gold build path, campaign-scoped calls save by default, and persistence preview_only is reserved for unsaved ad-hoc previews. It also names export_creative as the alternative for existing versions. What is missing is guidance on when to choose this over the near-identically-named leanriq_build_ad or the other build_* tools.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources