{
  "serverInfo": {
    "name": "adflitz",
    "title": "Adflitz",
    "version": "1.0.0"
  },
  "description": "Connect your AI to Meta, Google and LinkedIn ad accounts: read performance, draft changes, publish after approval.",
  "iconUrl": "https://adflitz.com/adflitz-logo-400.png",
  "documentationUrl": "https://adflitz.com/docs/mcp",
  "privacyPolicyUrl": "https://adflitz.com/privacy",
  "supportEmail": "contact@adflitz.com",
  "transport": {
    "type": "streamable-http",
    "url": "https://adflitz.com/api/mcp"
  },
  "authentication": {
    "required": true,
    "schemes": [
      "oauth2",
      "bearer"
    ],
    "scopes": [
      "adflitz.read",
      "adflitz.draft",
      "adflitz.publish"
    ],
    "protectedResourceMetadata": "https://adflitz.com/.well-known/oauth-protected-resource/api/mcp",
    "authorizationServerMetadata": "https://adflitz.com/.well-known/oauth-authorization-server"
  },
  "tools": [
    {
      "name": "adflitz_overview",
      "title": "Workspace overview",
      "description": "Start here. Returns the workspace, this key's access level, projects with their agent permissions, connected platforms and open drafts. Call it first to learn which project_id to use.",
      "inputSchema": {
        "type": "object",
        "properties": {}
      },
      "annotations": {
        "title": "Workspace overview",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "adflitz_list_projects",
      "title": "List projects",
      "description": "Lists the workspace's projects (brands or clients) with the agent permission on each.",
      "inputSchema": {
        "type": "object",
        "properties": {}
      },
      "annotations": {
        "title": "List projects",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "adflitz_connection_status",
      "title": "Platform connection status",
      "description": "Shows each of the nine ad platforms: connected or not, what Adflitz supports there, and the link a person uses to connect it.",
      "inputSchema": {
        "type": "object",
        "properties": {}
      },
      "annotations": {
        "title": "Platform connection status",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "adflitz_list_ad_accounts",
      "title": "List ad accounts",
      "description": "Lists ad accounts linked to the workspace or a project.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "project_id": {
            "description": "Project id. Optional when the key can reach exactly one project.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "platform": {
            "type": "string",
            "enum": [
              "meta",
              "google",
              "tiktok",
              "linkedin",
              "reddit",
              "x",
              "microsoft",
              "pinterest",
              "chatgpt_ads"
            ]
          }
        }
      },
      "annotations": {
        "title": "List ad accounts",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "adflitz_list_campaigns",
      "title": "List campaigns",
      "description": "Lists synced campaigns with status and budgets, across platforms or for one platform.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "project_id": {
            "description": "Project id. Optional when the key can reach exactly one project.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "platform": {
            "type": "string",
            "enum": [
              "meta",
              "google",
              "tiktok",
              "linkedin",
              "reddit",
              "x",
              "microsoft",
              "pinterest",
              "chatgpt_ads"
            ]
          },
          "status": {
            "type": "string"
          },
          "include_archived": {
            "default": false,
            "description": "Also list archived and deleted objects (status archived/deleted). They cannot be changed.",
            "type": "boolean"
          },
          "limit": {
            "default": 50,
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          }
        }
      },
      "annotations": {
        "title": "List campaigns",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "adflitz_list_ad_groups",
      "title": "List ad groups / ad sets",
      "description": "Lists synced ad groups (Meta: ad sets) for a campaign or project.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "project_id": {
            "description": "Project id. Optional when the key can reach exactly one project.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "campaign_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "platform": {
            "type": "string",
            "enum": [
              "meta",
              "google",
              "tiktok",
              "linkedin",
              "reddit",
              "x",
              "microsoft",
              "pinterest",
              "chatgpt_ads"
            ]
          },
          "include_archived": {
            "default": false,
            "description": "Also list archived and deleted objects (status archived/deleted). They cannot be changed.",
            "type": "boolean"
          },
          "limit": {
            "default": 50,
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          }
        }
      },
      "annotations": {
        "title": "List ad groups / ad sets",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "adflitz_list_ads",
      "title": "List ads",
      "description": "Lists synced ads with their creative (headline, text, CTA, landing page).",
      "inputSchema": {
        "type": "object",
        "properties": {
          "project_id": {
            "description": "Project id. Optional when the key can reach exactly one project.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "ad_group_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "platform": {
            "type": "string",
            "enum": [
              "meta",
              "google",
              "tiktok",
              "linkedin",
              "reddit",
              "x",
              "microsoft",
              "pinterest",
              "chatgpt_ads"
            ]
          },
          "include_archived": {
            "default": false,
            "description": "Also list archived and deleted objects (status archived/deleted). They cannot be changed.",
            "type": "boolean"
          },
          "limit": {
            "default": 50,
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          }
        }
      },
      "annotations": {
        "title": "List ads",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "adflitz_get_report",
      "title": "Performance report",
      "description": "Cross-platform performance from the reporting store, in the ad account currency (`currency` in the result; all monetary values use it): spend, impressions, clicks, conversions, revenue, CTR, CPC, CPM, CPA and ROAS, with the previous period for comparison. Group by day, platform, campaign, ad_group or ad.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "project_id": {
            "description": "Project id. Optional when the key can reach exactly one project.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "days": {
            "default": 30,
            "description": "Window ending yesterday (max 1131 days = Meta's 37 months). Ignored when from/to are set.",
            "type": "integer",
            "minimum": 1,
            "maximum": 1131
          },
          "from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "to": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "platforms": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "meta",
                "google",
                "tiktok",
                "linkedin",
                "reddit",
                "x",
                "microsoft",
                "pinterest",
                "chatgpt_ads"
              ]
            }
          },
          "group_by": {
            "default": "platform",
            "type": "string",
            "enum": [
              "day",
              "platform",
              "campaign",
              "ad_group",
              "ad"
            ]
          },
          "currency": {
            "description": "ISO currency code, e.g. EUR. Accounts in different currencies are never added together; the report covers one currency (default: the one with the most spend) and lists all in `currencies`.",
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          }
        }
      },
      "annotations": {
        "title": "Performance report",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "adflitz_platform_options",
      "title": "Platform options for drafts",
      "description": "Returns the values a platform accepts when creating campaigns, ad sets and ads (Meta: Outcome objectives, optimization goals per objective, billing events, bid strategies, special ad categories, call-to-action types; LinkedIn: objectives, campaign types, cost types, optimization goals, required fields). Use it before building create operations.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "platform": {
            "default": "meta",
            "type": "string",
            "enum": [
              "meta",
              "google",
              "tiktok",
              "linkedin",
              "reddit",
              "x",
              "microsoft",
              "pinterest",
              "chatgpt_ads"
            ]
          }
        }
      },
      "annotations": {
        "title": "Platform options for drafts",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "adflitz_sync_now",
      "title": "Sync an ad account now",
      "description": "Queues a fresh sync of one linked ad account (entities plus the last `days` days of metrics, max 37 months). Data appears within minutes; check adflitz_connection_status for progress.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "ad_account_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "days": {
            "default": 3,
            "type": "integer",
            "minimum": 1,
            "maximum": 1131
          }
        },
        "required": [
          "ad_account_id"
        ]
      },
      "annotations": {
        "title": "Sync an ad account now",
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "adflitz_list_drafts",
      "title": "List drafts",
      "description": "Lists change drafts with status, guardrail result and review link.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "project_id": {
            "description": "Project id. Optional when the key can reach exactly one project.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "published",
              "rejected",
              "failed",
              "expired"
            ]
          },
          "limit": {
            "default": 50,
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          }
        }
      },
      "annotations": {
        "title": "List drafts",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "adflitz_get_draft",
      "title": "Get a draft",
      "description": "Returns one draft with its operations, before/after diff, guardrail checks and publish result.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "draft_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "draft_id"
        ]
      },
      "annotations": {
        "title": "Get a draft",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "adflitz_create_draft",
      "title": "Create a change draft",
      "description": "Files a change as a draft for approval. Operations are typed: campaign.create, campaign.update, ad_group.create, ad_group.update, ad.create, ad.update and note. Ids are Adflitz ids from the list tools. New entities default to paused. Adflitz computes the before/after diff, checks budget guardrails and platform rules (Meta: Outcome objective, optimization goal, billing event, promoted_object, targeting.geo_locations, Facebook Page for ads; see adflitz_platform_options). Returns the review link.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "project_id": {
            "description": "Project id. Optional when the key can reach exactly one project.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "title": {
            "type": "string",
            "maxLength": 140
          },
          "summary": {
            "description": "Why the change makes sense. Shown to the reviewer.",
            "type": "string",
            "maxLength": 4000
          },
          "platform": {
            "type": "string",
            "enum": [
              "meta",
              "google",
              "tiktok",
              "linkedin",
              "reddit",
              "x",
              "microsoft",
              "pinterest",
              "chatgpt_ads"
            ]
          },
          "operations": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "campaign.create"
                    },
                    "ad_account_id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "objective": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    },
                    "daily_budget": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 10000000
                    },
                    "lifetime_budget": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 10000000
                    },
                    "status": {
                      "default": "paused",
                      "type": "string",
                      "enum": [
                        "active",
                        "paused",
                        "archived"
                      ]
                    },
                    "bid_strategy": {
                      "type": "string",
                      "maxLength": 60
                    },
                    "special_ad_categories": {
                      "maxItems": 5,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "maxLength": 60
                      }
                    },
                    "start_at": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "end_at": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "countries": {
                      "maxItems": 50,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 2
                      }
                    },
                    "eu_political_advertising": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "ad_account_id",
                    "name",
                    "objective"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "campaign.update"
                    },
                    "campaign_id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "changes": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "paused",
                            "archived"
                          ]
                        },
                        "daily_budget": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 10000000
                        },
                        "lifetime_budget": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 10000000
                        },
                        "end_at": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        }
                      }
                    }
                  },
                  "required": [
                    "type",
                    "campaign_id",
                    "changes"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "ad_group.create"
                    },
                    "campaign_id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "daily_budget": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 10000000
                    },
                    "lifetime_budget": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 10000000
                    },
                    "targeting": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    },
                    "status": {
                      "default": "paused",
                      "type": "string",
                      "enum": [
                        "active",
                        "paused",
                        "archived"
                      ]
                    },
                    "optimization_goal": {
                      "type": "string",
                      "maxLength": 60
                    },
                    "billing_event": {
                      "type": "string",
                      "maxLength": 60
                    },
                    "bid_strategy": {
                      "type": "string",
                      "maxLength": 60
                    },
                    "bid_amount": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 10000000
                    },
                    "promoted_object": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    },
                    "destination_type": {
                      "type": "string",
                      "maxLength": 60
                    },
                    "start_at": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "end_at": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "keywords": {
                      "maxItems": 80,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          },
                          "match_type": {
                            "default": "PHRASE",
                            "type": "string",
                            "enum": [
                              "BROAD",
                              "PHRASE",
                              "EXACT"
                            ]
                          }
                        },
                        "required": [
                          "text"
                        ]
                      }
                    }
                  },
                  "required": [
                    "type",
                    "campaign_id",
                    "name"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "ad_group.update"
                    },
                    "ad_group_id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "changes": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "paused",
                            "archived"
                          ]
                        },
                        "daily_budget": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 10000000
                        },
                        "lifetime_budget": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 10000000
                        },
                        "end_at": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        "bid_strategy": {
                          "type": "string",
                          "maxLength": 60
                        },
                        "targeting": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        }
                      }
                    }
                  },
                  "required": [
                    "type",
                    "ad_group_id",
                    "changes"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "ad.create"
                    },
                    "ad_group_id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "creative": {
                      "type": "object",
                      "properties": {
                        "headline": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "body": {
                          "default": "",
                          "type": "string",
                          "maxLength": 2000
                        },
                        "cta": {
                          "type": "string",
                          "maxLength": 40
                        },
                        "landing_url": {
                          "type": "string",
                          "maxLength": 2000,
                          "format": "uri"
                        },
                        "media_url": {
                          "type": "string",
                          "maxLength": 2000,
                          "format": "uri"
                        },
                        "page_id": {
                          "type": "string",
                          "pattern": "^\\d{5,25}$"
                        },
                        "instagram_user_id": {
                          "type": "string",
                          "pattern": "^\\d{5,25}$"
                        },
                        "image_hash": {
                          "type": "string",
                          "maxLength": 100
                        },
                        "headlines": {
                          "maxItems": 15,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 90
                          }
                        },
                        "descriptions": {
                          "maxItems": 4,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        },
                        "path1": {
                          "type": "string",
                          "maxLength": 15
                        },
                        "path2": {
                          "type": "string",
                          "maxLength": 15
                        }
                      },
                      "required": [
                        "headline",
                        "landing_url"
                      ]
                    },
                    "status": {
                      "default": "paused",
                      "type": "string",
                      "enum": [
                        "active",
                        "paused",
                        "archived"
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "ad_group_id",
                    "name",
                    "creative"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "ad.update"
                    },
                    "ad_id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "changes": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "paused",
                            "archived"
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "type",
                    "ad_id",
                    "changes"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "note"
                    },
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2000
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ]
                }
              ]
            }
          }
        },
        "required": [
          "operations"
        ]
      },
      "annotations": {
        "title": "Create a change draft",
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      }
    },
    {
      "name": "adflitz_approve_draft",
      "title": "Approve a draft",
      "description": "Approves a pending draft. Needs a publish-level key and a project set to drafts and publishing.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "draft_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "draft_id"
        ]
      },
      "annotations": {
        "title": "Approve a draft",
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "adflitz_publish_draft",
      "title": "Publish a draft",
      "description": "Publishes a draft to the ad platform through its connector (approving it first if needed). Guardrail blocks are never overridden by agents. While a platform is not connected, the draft stays approved and the result says not_connected.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "draft_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "draft_id"
        ]
      },
      "annotations": {
        "title": "Publish a draft",
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true
      }
    },
    {
      "name": "adflitz_reject_draft",
      "title": "Reject a draft",
      "description": "Rejects a draft. Draft-level keys may reject drafts they filed; publish-level keys may reject any draft.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "draft_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "reason": {
            "type": "string",
            "maxLength": 500
          }
        },
        "required": [
          "draft_id"
        ]
      },
      "annotations": {
        "title": "Reject a draft",
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "adflitz_search_library",
      "title": "Search the ads library",
      "description": "Searches competitor ads by advertiser or text. Data comes only from official sources (Meta Ad Library API, Google Ads Transparency), which for commercial ads cover what ran in the EU/EEA. Also returns matching ads the team saved. Check `sources` for which source is live; while access is pending, results come from the cache and saved ads.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "platform": {
            "type": "string",
            "enum": [
              "meta",
              "google"
            ],
            "description": "Library source: meta (Meta Ad Library) or google (Google Ads Transparency)."
          },
          "limit": {
            "default": 50,
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          }
        },
        "required": [
          "query"
        ]
      },
      "annotations": {
        "title": "Search the ads library",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "adflitz_list_competitors",
      "title": "List tracked competitors",
      "description": "Lists the advertisers the team tracks, with platform, website, alert settings, last check and ad count from the official library sources.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "project_id": {
            "description": "Project id. Optional when the key can reach exactly one project.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        }
      },
      "annotations": {
        "title": "List tracked competitors",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "adflitz_track_competitor",
      "title": "Track a competitor",
      "description": "Adds an advertiser to the watchlist. Adflitz checks it daily in the official library of the platform (Meta Ad Library or Google Ads Transparency) once that source is live.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "project_id": {
            "description": "Project id. Optional when the key can reach exactly one project.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "platform": {
            "type": "string",
            "enum": [
              "meta",
              "google"
            ],
            "description": "Library source: meta (Meta Ad Library) or google (Google Ads Transparency)."
          },
          "website": {
            "type": "string",
            "maxLength": 300,
            "format": "uri"
          },
          "notes": {
            "type": "string",
            "maxLength": 1000
          }
        },
        "required": [
          "name",
          "platform"
        ]
      },
      "annotations": {
        "title": "Track a competitor",
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      }
    },
    {
      "name": "adflitz_untrack_competitor",
      "title": "Stop tracking a competitor",
      "description": "Removes an advertiser from the watchlist.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "competitor_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "competitor_id"
        ]
      },
      "annotations": {
        "title": "Stop tracking a competitor",
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "adflitz_list_boards",
      "title": "List swipe-file boards",
      "description": "Lists the saved-ads boards.",
      "inputSchema": {
        "type": "object",
        "properties": {}
      },
      "annotations": {
        "title": "List swipe-file boards",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "adflitz_list_saved_ads",
      "title": "List saved ads",
      "description": "Lists ads in the team's swipe file, optionally for one board.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "board_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "limit": {
            "default": 50,
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          }
        }
      },
      "annotations": {
        "title": "List saved ads",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "adflitz_save_ad",
      "title": "Save an ad to the swipe file",
      "description": "Files a reference ad (yours or a competitor's) to a board.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "project_id": {
            "description": "Project id. Optional when the key can reach exactly one project.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "board_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "platform": {
            "type": "string",
            "enum": [
              "meta",
              "google",
              "tiktok",
              "linkedin",
              "reddit",
              "x",
              "microsoft",
              "pinterest",
              "chatgpt_ads"
            ]
          },
          "advertiser_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "headline": {
            "type": "string",
            "maxLength": 300
          },
          "body": {
            "type": "string",
            "maxLength": 3000
          },
          "landing_url": {
            "type": "string",
            "maxLength": 2000,
            "format": "uri"
          },
          "media_url": {
            "type": "string",
            "maxLength": 2000,
            "format": "uri"
          },
          "notes": {
            "type": "string",
            "maxLength": 1000
          },
          "tags": {
            "maxItems": 12,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 32
            }
          }
        },
        "required": [
          "platform",
          "advertiser_name"
        ]
      },
      "annotations": {
        "title": "Save an ad to the swipe file",
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      }
    },
    {
      "name": "adflitz_list_activity",
      "title": "Activity feed",
      "description": "Recent workspace activity: drafts, approvals, publishes, agent actions, autopilot runs.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "limit": {
            "default": 50,
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          }
        }
      },
      "annotations": {
        "title": "Activity feed",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "adflitz_list_autopilot_rules",
      "title": "List autopilot rules",
      "description": "Lists autopilot rules (pause losers, scale winners, creative fatigue, budget pacing) with their parameters and last run.",
      "inputSchema": {
        "type": "object",
        "properties": {}
      },
      "annotations": {
        "title": "List autopilot rules",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "adflitz_run_autopilot",
      "title": "Run autopilot now",
      "description": "Evaluates enabled autopilot rules (or one rule) against synced data and files findings as drafts for approval.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "rule_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        }
      },
      "annotations": {
        "title": "Run autopilot now",
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      }
    }
  ],
  "resources": [],
  "prompts": [],
  "toolCount": 30
}