Skip to main content
Glama

create_media_buy

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
brandNoAdvertiser brand name (for rules check)
agent_idNoOptional agent identifier (telemetry; feeds ADR-066 behavioral-risk shadow logging).
categoryNoProduct category (for rules check)
end_dateNoCampaign end date (ISO 8601)
bid_centsYesBid amount in cents
start_dateNoCampaign start date (ISO 8601)
campaign_idNoParent campaign UUID. When set, the campaign's default pacing + frequency cap cascade into this buy unless explicitly overridden.
budget_centsYesTotal budget in cents
creative_refNoCreative asset URL or reference
inventory_idYesTarget inventory slot UUID
advertiser_idYesAdvertiser account UUID
agent_mandateNoOptional signed agent mandate (ADR-066). Verified by the auction-entry gate.
creative_dataNoCreative metadata (JSON)
pricing_modelYesPricing model for the buy
quality_scoreNoQuality score 0-1 (default: 0.5)
pacing_strategyNoOverride pacing strategy. Falls back to campaign default, then "even".
context_relevanceNoContext relevance 0-1 (default: 0)
frequency_cap_sessionNoPer-session impression cap for this buy. NULL means defer to inventory cap. Falls back to campaign default, then 3.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / agent_id
      Added value: +{
      +  "description": "Optional agent identifier (telemetry; feeds ADR-066 behavioral-risk shadow logging).",
      +  "maxLength": 64,
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / agent_mandate
      Added value: +{
      +  "description": "Optional signed agent mandate (ADR-066). Verified by the auction-entry gate."
      +}
  3. Changed3 schema fields changed
    • addedInput schema / properties / campaign_id
      Added value: +{
      +  "description": "Parent campaign UUID. When set, the campaign's default pacing + frequency cap cascade into this buy unless explicitly overridden.",
      +  "format": "uuid",
      +  "type": "string"
      +}
    • addedInput schema / properties / frequency_cap_session
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 20,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Per-session impression cap for this buy. NULL means defer to inventory cap. Falls back to campaign default, then 3."
      +}
    • addedInput schema / properties / pacing_strategy
      Added value: +{
      +  "description": "Override pacing strategy. Falls back to campaign default, then \"even\".",
      +  "enum": [
      +    "even",
      +    "asap",
      +    "front_loaded",
      +    "back_loaded"
      +  ],
      +  "type": "string"
      +}
  4. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare this as a non-read-only, non-idempotent, non-destructive write. The description adds meaningful context beyond those hints: the 'binding commitment' side-effect warning, the confirmation-before-call requirement, and the auction scoring behavior. It does not contradict any annotation.

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 organized into four purposeful sections (description, when_to_use, combination_hints, output_format), with the core purpose front-loaded. Each section earns its place; the workflow and score formula are dense but relevant. Slightly long, but nothing is redundant.

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

Completeness5/5

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

With 18 parameters, nested objects, and no output schema, the description carries a heavy burden — and it delivers. The <output_format> section covers return values (media buy ID, status, auction score, rejection reason), the <combination_hints> covers follow-up actions on rejection, and the <when_to_use> covers prerequisites. Nothing an agent needs to call correctly is missing.

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?

Schema coverage is 100%, so the baseline is 3. The description adds value beyond the schema by supplying the score formula (0.3*bid + 0.3*similarity + 0.2*quality + 0.2*context), which clarifies how bid_cents, quality_score, and context_relevance interact, and by connecting brand/category to the rejection-adjustment flow. This meaningfully enhances what the schema alone provides.

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?

States a specific verb and resource ('Create a media buy') and clarifies the domain ('bid on publisher inventory'). It also describes the internal behavior (validates rules, runs auction scoring, returns approval/rejection), which distinguishes it from siblings like list_media_buys and activate. The reference to 'AdCP-compatible first-price sealed-bid auction' adds precise context beyond the name.

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

Usage Guidelines5/5

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

Provides a dedicated <when_to_use> section stating the exact condition ('when an advertiser wants to place a bid') and names the prerequisite source (inventory_id from list_inventory/get_inventory_item). It explicitly warns to always confirm with the user before calling, and the <combination_hints> section gives an ordered workflow (list_inventory → get_inventory_item → create_media_buy → submit_creatives → activate) plus a fallback on rejection. Nothing about when to use this vs. alternatives is left to inference.

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.