{"version":"1.0.0","protocolVersion":"2025-11-25","serverInfo":{"name":"Adrails","version":"1.0.0"},"description":"AI agents that build, test and monitor Meta Ads and Google Ads campaigns from your real data.","iconUrl":"https://adrails.ai/adrails-logo.png","documentationUrl":"https://adrails.ai/docs/mcp","websiteUrl":"https://adrails.ai","transport":{"type":"streamable-http","url":"https://adrails.ai/api/mcp"},"capabilities":{"tools":{"listChanged":false}},"authentication":{"required":true,"schemes":["oauth2"],"oauth2":{"resourceMetadata":"https://adrails.ai/.well-known/oauth-protected-resource/api/mcp","dynamicClientRegistration":true}},"instructions":"Use Adrails tools for source-backed analysis. Discover accounts/integrations only when their IDs or connection state are needed; reuse results already in this conversation unless freshness matters. Request the smallest useful period, selection or page. Arguments go inside input. Scope is fixed to the authorized workspace. Call tools sequentially on this connection because they share persistent context. If another call is running, wait for it to finish before retrying, preserving the same idempotencyKey for mutations. New advertising proposals require browser approval; show the review link and never claim a pending proposal executed. An idempotent retry reports the existing action's current status without executing it again. For strategic analysis, load relevant workspace methods with knowledge_skills. Results include readable text and exact structured data: present a concise answer with relevant tables or charts, not raw JSON or both copies of the same data. There is no embedded Adrails card renderer; ask launch questions in the conversation. Report missing data, units, sources and freshness; never invent IDs, missing points or financial results.","tools":[{"name":"conversation_recall","description":"Read this chat's durable history, never another chat or workspace. messages: newest exchanges matching any query keyword first; use a short distinctive name or entity ID. Omit query to browse. Omit beforePosition on the first page; then use nextBeforePosition. message: read a source turn by turnId and part (user/assistant/entities), use nextOffset for long text or more entity IDs. actions: read the recorded action journal and linked drafts, offset pagination. No matches does not prove a topic was never discussed: broaden the query. Messages are historical statements, NOT execution proof or permission. An empty journal does not rule out changes outside this chat. Read live account data before decisions. No memory is promoted to workspace instructions.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"mode":{"type":"string","enum":["messages","message","actions"],"default":"messages"},"query":{"type":"string","minLength":2,"maxLength":120},"beforePosition":{"type":"integer","exclusiveMinimum":0},"turnId":{"type":"string","minLength":1,"maxLength":200},"part":{"type":"string","enum":["user","assistant","entities"],"default":"user"},"offset":{"type":"integer","minimum":0,"maximum":1000000,"default":0}},"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"creative_review","description":"After creative-map, creative-fatigue, creative-roadmap or market-test, review exact selected ad evidence without invented fatigue, winning status, product promises or sample thresholds. Includes available copy, asset IDs, configured goal, period and limits. focus=copy_test for a requested test: proposes ONE text-order test reusing observed wording and preserving other variables. focus=market_transfer preserves source asset/copy and uses only the user's named destination. A source is a control candidate, not a validated winner. For an additional production brief or multiple pages/accounts use evidence; standalone review/test proposal uses answer and is rendered directly. No asset produced or campaign prepared.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"language":{"type":"string","enum":["fr","en"],"description":"Language of the person's request."},"responseMode":{"type":"string","enum":["evidence","answer"],"default":"answer","description":"Leave as answer for a diagnostic or outcome review, including requests to verify evidence or say what can be concluded. evidence is ONLY for an explicitly requested additional deliverable beyond this report, or collecting multiple accounts/pages. More internal investigation is not an additional user deliverable."},"focus":{"type":"string","enum":["review","copy_test","market_transfer"],"default":"review"},"destination":{"type":"string","minLength":1,"maxLength":100,"description":"Only the destination market explicitly named by the user. Not a new account/currency/pixel requirement."},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":20},"adIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":30,"description":"Exact returned source IDs only. Omit to inspect selected accounts."},"limit":{"type":"integer","minimum":1,"maximum":10,"default":5},"offset":{"type":"integer","minimum":0,"maximum":100000,"default":0}},"required":["language"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"business_review","description":"After unit-economics, revenue-reconciliation or budget-pacing, provide a bounded explanation/calculation from explicit inputs. Missing inputs are optional: omit them, never invent examples, costs, targets or dates. Every supplied number MUST carry an exact verbatim quote from a user message or a source tool result containing the number and its definition; assistant examples and Knowledge instructions are not sources. Generic AOV is not verified net first-order revenue. For pacing use complete elapsed days only. Source currency/definitions/windows must match before combining. This tool checks quotation provenance but cannot independently certify its business meaning. Standalone explanation: call alone with answer. Broader requested work: evidence. No writes or forecasts.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"language":{"type":"string","enum":["fr","en"]},"responseMode":{"type":"string","enum":["answer","evidence"],"default":"answer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"review":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"economics"},"netRevenuePerOrder":{"type":"object","properties":{"value":{"type":"number","minimum":0,"maximum":1000000000},"quote":{"type":"string","minLength":1,"maxLength":1500,"description":"Exact verbatim excerpt from a user message or a source tool result containing this number and its definition. Never quote an assistant example or invent a source."}},"required":["value","quote"],"additionalProperties":false,"description":"Explicit net first-order revenue only; a generic basket/AOV is not confirmed net revenue."},"variableCostPerOrder":{"type":"object","properties":{"value":{"type":"number","minimum":0,"maximum":1000000000},"quote":{"type":"string","minLength":1,"maxLength":1500,"description":"Exact verbatim excerpt from a user message or a source tool result containing this number and its definition. Never quote an assistant example or invent a source."}},"required":["value","quote"],"additionalProperties":false},"requiredContributionPerOrder":{"type":"object","properties":{"value":{"type":"number","minimum":0,"maximum":1000000000},"quote":{"type":"string","minLength":1,"maxLength":1500,"description":"Exact verbatim excerpt from a user message or a source tool result containing this number and its definition. Never quote an assistant example or invent a source."}},"required":["value","quote"],"additionalProperties":false,"description":"Explicit retained contribution; zero only for a requested break-even calculation."}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"reconciliation"},"metaAttributedValue":{"type":"object","properties":{"value":{"type":"number","minimum":0,"maximum":1000000000},"quote":{"type":"string","minLength":1,"maxLength":1500,"description":"Exact verbatim excerpt from a user message or a source tool result containing this number and its definition. Never quote an assistant example or invent a source."}},"required":["value","quote"],"additionalProperties":false},"storeNetRevenue":{"type":"object","properties":{"value":{"type":"number","minimum":0,"maximum":1000000000},"quote":{"type":"string","minLength":1,"maxLength":1500,"description":"Exact verbatim excerpt from a user message or a source tool result containing this number and its definition. Never quote an assistant example or invent a source."}},"required":["value","quote"],"additionalProperties":false},"storeGrossRevenue":{"type":"object","properties":{"value":{"type":"number","minimum":0,"maximum":1000000000},"quote":{"type":"string","minLength":1,"maxLength":1500,"description":"Exact verbatim excerpt from a user message or a source tool result containing this number and its definition. Never quote an assistant example or invent a source."}},"required":["value","quote"],"additionalProperties":false},"refunds":{"type":"object","properties":{"value":{"type":"number","minimum":0,"maximum":1000000000},"quote":{"type":"string","minLength":1,"maxLength":1500,"description":"Exact verbatim excerpt from a user message or a source tool result containing this number and its definition. Never quote an assistant example or invent a source."}},"required":["value","quote"],"additionalProperties":false}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"pacing"},"totalBudget":{"type":"object","properties":{"value":{"type":"number","minimum":0,"maximum":1000000000},"quote":{"type":"string","minLength":1,"maxLength":1500,"description":"Exact verbatim excerpt from a user message or a source tool result containing this number and its definition. Never quote an assistant example or invent a source."}},"required":["value","quote"],"additionalProperties":false},"spent":{"type":"object","properties":{"value":{"type":"number","minimum":0,"maximum":1000000000},"quote":{"type":"string","minLength":1,"maxLength":1500,"description":"Exact verbatim excerpt from a user message or a source tool result containing this number and its definition. Never quote an assistant example or invent a source."}},"required":["value","quote"],"additionalProperties":false,"description":"Verified spend for all completed elapsed days, or an explicit user-supplied scenario. Omitted daily rows cannot become zero."},"elapsedDays":{"type":"object","properties":{"value":{"type":"number","minimum":0,"maximum":1000000000},"quote":{"type":"string","minLength":1,"maxLength":1500,"description":"Exact verbatim excerpt from a user message or a source tool result containing this number and its definition. Never quote an assistant example or invent a source."}},"required":["value","quote"],"additionalProperties":false},"totalDays":{"type":"object","properties":{"value":{"type":"number","minimum":0,"maximum":1000000000},"quote":{"type":"string","minLength":1,"maxLength":1500,"description":"Exact verbatim excerpt from a user message or a source tool result containing this number and its definition. Never quote an assistant example or invent a source."}},"required":["value","quote"],"additionalProperties":false}},"required":["type"],"additionalProperties":false}]}},"required":["language","review"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"portfolio_review","description":"After audit, advise across the selected accounts and campaigns using each campaign's actual objective, ad-set events, budget ownership, current-period coverage and freshly evaluated rules. Separates provider issues, policy differences, hypotheses and unknowns. Includes campaigns with no findings. Preserves intentional traffic, leads, purchases and intermediate goals; synthesizes at most three supported portfolio priorities. Does not invent CPA, causal defects, pause duration, QA purpose or a budget/test plan. Paginated; no writes. Call alone with responseMode=answer for a standalone portfolio audit or campaign advice. Use evidence for an explicitly requested additional deliverable such as a creative brief or executable plan.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"language":{"type":"string","enum":["fr","en"],"description":"Language of the person's request."},"responseMode":{"type":"string","enum":["evidence","answer"],"default":"answer","description":"Leave as answer for a diagnostic or outcome review, including requests to verify evidence or say what can be concluded. evidence is ONLY for an explicitly requested additional deliverable beyond this report, or collecting multiple accounts/pages. More internal investigation is not an additional user deliverable."},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":20,"description":"Exact selected Adrails account IDs. Omit to use the current selection."},"offset":{"type":"integer","minimum":0,"maximum":100000,"default":0},"limit":{"type":"integer","minimum":1,"maximum":25,"default":12}},"required":["language"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"budget_recommend","description":"After reading scaling-decision, evaluate budget-owning entities in ONE selected account for maintain/increase/reduce/investigate. Omit entityId/entityType to discover and review actual owners without guessing IDs; paginated. Supply both to review one campaign/ad set. Resolves the event and any cost-cap/minimum-ROAS delivery target from actual ad-set settings, never from generic results or its name. Compares the latest two complete seven-day windows in account timezone and reports gaps, evidence and review point. Missing target stays missing; delivery targets are not profit. Read recent changes and business constraints before any approval. No amount guessed and no writes. Call alone with answer for a standalone review; use evidence for multiple accounts or a broader task.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"language":{"type":"string","enum":["fr","en"],"description":"Language of the person's request."},"responseMode":{"type":"string","enum":["evidence","answer"],"default":"answer","description":"Leave as answer for a diagnostic or outcome review, including requests to verify evidence or say what can be concluded. evidence is ONLY for an explicitly requested additional deliverable beyond this report, or collecting multiple accounts/pages. More internal investigation is not an additional user deliverable."},"accountId":{"type":"string","minLength":1,"maxLength":200,"description":"Exact selected Adrails account ID, never its display name."},"entityId":{"type":"string","minLength":1,"maxLength":200,"description":"Omit to review budget-owning entities in the selected account, without guessing IDs."},"entityType":{"type":"string","enum":["campaign","adset"]},"limit":{"type":"integer","minimum":1,"maximum":5,"default":5},"offset":{"type":"integer","minimum":0,"maximum":100000,"default":0}},"required":["language","accountId"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"performance_diagnose","description":"Preferred after reading performance-diagnosis: compares two equal-length, non-overlapping historical periods from ONE saved Meta snapshot. Computes coverage and changes, separates facts, unknowns and next verification. Requires exact account ID and dates from the request/context; do not invent dates. Missing rows are never zero and generic results never purchases. Use responseMode=answer for a standalone comparison and call it alone: the verified report finishes the answer without model rewriting. Use evidence when further work is requested. No writes.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"language":{"type":"string","enum":["fr","en"],"description":"Language of the person's request."},"responseMode":{"type":"string","enum":["evidence","answer"],"default":"answer","description":"Leave as answer for a diagnostic or outcome review, including requests to verify evidence or say what can be concluded. evidence is ONLY for an explicitly requested additional deliverable beyond this report, or collecting multiple accounts/pages. More internal investigation is not an additional user deliverable."},"accountId":{"type":"string","minLength":1,"maxLength":200,"description":"Exact selected Adrails account ID, never its display name."},"before":{"type":"object","properties":{"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"}},"required":["from","to"],"additionalProperties":false,"description":"Earlier inclusive calendar period, in account timezone."},"after":{"type":"object","properties":{"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"}},"required":["from","to"],"additionalProperties":false,"description":"Later inclusive calendar period, non-overlapping and same length."},"campaignId":{"type":"string","minLength":1,"maxLength":200},"actionType":{"type":"string","minLength":1,"maxLength":200,"description":"Exact action_type from returned events or an explicit user selection. Never infer the event from a campaign title or generic results."}},"required":["language","accountId","before","after"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"changes_review","description":"Preferred after reading change-review: review recorded actions, actual application dates, baseline and observation eligibility, with pending/failed/skipped distinct from measured results. Rolling snapshots do not establish causal lift. Scope to an exact selected account, optionally one action; paginated. Use responseMode=answer and call alone for a standalone review of recent changes, evidence for broader tasks or reading multiple pages/accounts. No writes or saved learning.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"language":{"type":"string","enum":["fr","en"],"description":"Language of the person's request."},"responseMode":{"type":"string","enum":["evidence","answer"],"default":"answer","description":"Leave as answer for a diagnostic or outcome review, including requests to verify evidence or say what can be concluded. evidence is ONLY for an explicitly requested additional deliverable beyond this report, or collecting multiple accounts/pages. More internal investigation is not an additional user deliverable."},"accountId":{"type":"string","minLength":1,"maxLength":200,"description":"Exact selected Adrails account ID, never its display name."},"actionId":{"type":"string","minLength":1,"maxLength":200},"limit":{"type":"integer","minimum":1,"maximum":10,"default":5},"offset":{"type":"integer","minimum":0,"maximum":100000,"default":0}},"required":["language","accountId"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"knowledge_skills","description":"Choose and read a workspace method before specialist work. Prefer command with a known route key (budget-pacing, unit-economics, revenue-reconciliation, market-test, etc.) to load its full body in one call. Otherwise search with query, then read a returned skillId. Strategic proposals, read-only plans and requests saying do not launch STILL REQUIRE their method. Lists return metadata only and nextOffset for pagination. Scope and approvals still apply.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"skillId":{"type":"string","minLength":1,"maxLength":200},"command":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,31}$","description":"Exact installed method key; reads its full instructions within the current source scope."},"query":{"type":"string","minLength":1,"maxLength":100},"offset":{"type":"integer","minimum":0,"maximum":100000,"description":"Continue discovery using the previous nextOffset and the same query; ignored for a skillId read."}},"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"planning_calculate","description":"Deterministic budget pacing, budget allocation totals, or first-order acquisition unit economics. Use verified tool inputs or explicitly user-supplied hypothetical inputs, cite their sources and exact periods in evidence, and use one currency. Never fill missing budgets, costs, time windows or target contributions with guesses. Returns arithmetic and limitations, not a forecast, verified profitability, optimized allocation or spending approval. Does not read accounts or modify anything.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"One source currency for every amount; no currency conversion."},"evidence":{"type":"string","minLength":1,"maxLength":1500,"description":"Input sources, exact windows/cutoff and assumptions; explicitly label hypothetical inputs."},"calculation":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"budget_pacing"},"totalBudget":{"type":"number","minimum":0,"maximum":1000000000,"exclusiveMinimum":0},"spent":{"type":"number","minimum":0,"maximum":1000000000},"elapsedDays":{"type":"integer","minimum":0,"maximum":366},"totalDays":{"type":"integer","minimum":1,"maximum":366}},"required":["type","totalBudget","spent","elapsedDays","totalDays"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"unit_economics"},"netRevenuePerOrder":{"type":"number","minimum":0,"maximum":1000000000,"exclusiveMinimum":0},"variableCostPerOrder":{"type":"number","minimum":0,"maximum":1000000000},"requiredContributionPerOrder":{"type":"number","minimum":0,"maximum":1000000000,"description":"User-supplied retained contribution after ads; zero for an explicit break-even calculation."}},"required":["type","netRevenuePerOrder","variableCostPerOrder","requiredContributionPerOrder"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"budget_allocation"},"budgetCap":{"type":"number","minimum":0,"maximum":1000000000,"exclusiveMinimum":0,"description":"Confirmed envelope, on the same daily or total-period basis as every entry."},"entries":{"type":"array","items":{"type":"object","properties":{"entityId":{"type":"string","minLength":1,"maxLength":200},"currentBudget":{"type":"number","minimum":0,"maximum":1000000000},"proposedBudget":{"type":"number","minimum":0,"maximum":1000000000}},"required":["entityId","currentBudget","proposedBudget"],"additionalProperties":false},"minItems":1,"maxItems":50}},"required":["type","budgetCap","entries"],"additionalProperties":false}]}},"required":["currency","evidence","calculation"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"metric_compare","description":"Deterministically compares one non-negative observed metric with a positive target. Use ONLY when the person explicitly asks for the numeric difference, percentage gap or target-attainment percentage. A normal performance-vs-target answer should state both values and above/below without this extra call. Returns observed, target, signed difference, relative difference percent, attainment percent and above/below/equal. Do not use it for causal claims or trends.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"observed":{"type":"number","minimum":0},"target":{"type":"number","exclusiveMinimum":0}},"required":["observed","target"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"reporting_overview","description":"Spend, attributed revenue and named conversion events for the workspace's connected ad accounts, Meta and Google Ads alike. Without dates it returns each account's latest synchronized window with entity settings and status; with entityIds, those exact campaigns, ad groups or ads with their platform and ids, and for a campaign its last seven days against the seven before. On Meta, supply BOTH from/to for exact calendar periods: measured daily-row totals for accounts/campaigns, explicit gaps and complete=false if coverage is missing, max 93 days; exact ad-set/ad periods are unavailable there. For a Google Ads account's exact period, or an ad group or ad over dates, use performance_period. Read two non-overlapping periods to diagnose a change; never compare rolling-window totals as independent periods. Meta results may be visits/leads/clicks, not purchases; do not derive acquisition CPA without the conversion definition. Store orders require store_revenue.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"from":{"type":"string","format":"date","description":"Inclusive first calendar day."},"to":{"type":"string","format":"date","description":"Inclusive final calendar day."},"accountIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":50},"entityIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":50},"actionType":{"type":"string","minLength":1,"maxLength":200,"description":"Exact returned action_type to filter named event metrics. Costs require complete event and calendar coverage; never add overlapping aliases."}},"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"performance_period","description":"Reads one ad account's figures for an exact date range from the platform itself, Meta or Google Ads, at the account, campaign, ad set (ad group or asset group on Google) or ad level: spend, results, revenue, ROAS, CPA, impressions, clicks, CTR, CPC, CPM, and reach and frequency on Meta. With compareSince and compareUntil it reads a second range and gives each entity's change. Use it for any question about a period other than the synced window, a trend, or a before and after. Dates are YYYY-MM-DD, in the account's time zone, 400 days at most. campaignIds narrows the read; entityIds keeps only those rows.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"accountId":{"type":"string","minLength":1,"maxLength":200},"campaignIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":50},"compareSince":{"type":"string","format":"date"},"compareUntil":{"type":"string","format":"date"},"entityIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":50},"level":{"type":"string","enum":["account","campaign","adset","ad"]},"since":{"type":"string","format":"date"},"until":{"type":"string","format":"date"}},"required":["accountId","level","since","until"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"store_revenue","description":"Revenue for the connected stores: gross, refunded and net kept apart, with the order count. Answered in each store's own currency, never converted. Returns nothing about ad spend: use reporting_overview for that.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"from":{"type":"string","format":"date","description":"Inclusive first calendar day."},"to":{"type":"string","format":"date","description":"Inclusive final calendar day."}},"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"store_orders","description":"Orders one by one, most recent first: totals, financial status, fulfilment status, line count. For looking at a specific order or a specific status. For a total over a period, store_revenue costs one call instead of fifty.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"from":{"type":"string","format":"date","description":"Inclusive first calendar day."},"to":{"type":"string","format":"date","description":"Inclusive final calendar day."},"financialStatus":{"type":"string","minLength":1,"maxLength":40},"limit":{"type":"integer","minimum":1,"maximum":50}},"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"store_customers","description":"Customers imported from the selected Stripe or commerce connection, newest first: names, email domains, country, creation date, order count and imported lifetime spend. Use this when the person asks for clients or customers. The full email address is deliberately not stored; never invent it. `offset` opens the next page when the total exceeds `limit`.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":50},"offset":{"type":"integer","minimum":0,"maximum":5000},"search":{"type":"string","minLength":1,"maxLength":120}},"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"store_products","description":"Products in the connected stores: title, price range, inventory, status, type and vendor. `search` filters on the title.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":50},"search":{"type":"string","minLength":1,"maxLength":120},"status":{"type":"string","minLength":1,"maxLength":40}},"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"metrics_daily","description":"Daily series measured by the connected integrations: traffic, sessions, conversion rate, sales and average order value on the store side; emails received, opened and clicked on the marketing side; net profit, CPA and ROAS on the analytics side. Called without `metrics`, it returns everything measured over the period, which is how to discover the available names. Asked for three metrics or fewer, the screen also draws them day by day, so there is no need to ask for the daily detail in words. `breakdown` splits by product, by traffic source or by country instead of returning totals, and the screen draws the ranking. Returns nothing about Meta campaigns: use reporting_overview for that.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"from":{"type":"string","format":"date","description":"Inclusive first calendar day."},"to":{"type":"string","format":"date","description":"Inclusive final calendar day."},"breakdown":{"type":"string","minLength":1,"maxLength":40},"metrics":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":12}},"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"saas_performance","description":"Stripe billing, RevenueCat revenue metrics and PostHog product performance for SaaS: active subscriptions, trials, normalized MRR, ARR, collected payments, refunds and daily product events. Also returns the customer and subscription counts by actual billing cadence when Stripe or RevenueCat customer-level subscription data is available. Use it for questions such as how many customers pay annually or monthly. RevenueCat ARR is deterministically derived as normalized MRR multiplied by 12. Keeps each source and currency explicit and does not infer attribution without an identity join.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"from":{"type":"string","format":"date","description":"Inclusive first calendar day."},"to":{"type":"string","format":"date","description":"Inclusive final calendar day."}},"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"findings_review","description":"Contextual review of what the rule engine found on the selected Meta and Google Ads campaigns, against this workspace's own standard. This is the only judgement Adrails makes itself. Each finding includes observed evidence, its original snapshot date, campaign objective, ad-set or ad-group event/destination, currency, budget owner and classification: confirmed issue, policy deviation, hypothesis, platform context, not applicable or unknown. Severity is not causality. A purchase preference must not override traffic/lead goals; automatic placements and missing URL tags do not establish wasted spend or lost attribution, and CPM/CTR signals do not confirm fatigue. Use reporting_overview for the whole portfolio, including campaigns without findings; compare compatible groups and give campaign-specific advice before synthesizing priorities.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"family":{"type":"string","enum":["creative","targeting","tracking","fatigue","health"]},"limit":{"type":"integer","minimum":1,"maximum":40},"minSeverity":{"type":"string","enum":["low","medium","high","critical"]}},"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"integrations_status","description":"What this workspace has connected, what each source can do, and how fresh it is stream by stream. Read this before saying a figure is missing: \"connect Shopify\" and \"the order sync has been failing since Tuesday\" are answers, \"I do not have that data\" is not one.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{},"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"meta_sync","description":"Queues a durable refresh for one connected ad account, Meta or Google Ads. Always call this tool when the person explicitly asks to sync or refresh a selected account. Also use it when the selected account's snapshot is older than 24 hours and the person needs a current operational answer. Never say a refresh was launched unless this tool returned successfully. The refresh continues after this turn ends and survives page reloads. It does not modify campaigns or spend. Never queue every account when one selected account is enough.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"accountId":{"type":"string","minLength":1}},"required":["accountId"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"launch_brief","description":"The launch brief, the first step for any new ads: launching or preparing ads, a new campaign, adding creatives to an ad set, running a Google Drive folder, using images the person attached, or just \"I want to run ads\". Call it before asking anything, even when nothing is known yet, not even what they sell or where the creatives are (the card asks that too), and again after each set of answers. Pass everything the person actually said or picked, so it is not asked again: the account they named (by name or act_ id), the objective, the campaign name, the budget, the countries, target new_campaign when they asked to create a campaign, campaignOnly when they want no ad set. Leave out everything else: never fill a setting on their behalf, never pass their request itself as the purpose. It works out what a clean launch still needs, in the order Meta nests things: the ad account first, then where the ads go (a new campaign, a new ad set in an existing campaign, or an existing ad set), then what that choice leaves open (spread, objective, pixel and result, countries, languages, budget, dates, Page, EU beneficiary), plus the link, copy and missing shapes. It shows the person a card with those questions as choices by name. Never ask those questions in text and never ask for an id: the card does it. When nothing is missing it returns the complete brief.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"accountId":{"type":"string","maxLength":200,"description":"The ad account: its Adrails id from a pick in the card or an account mention, or the name or act_ id the person wrote in this request. Always the first thing settled."},"beneficiary":{"type":"string","maxLength":200,"description":"Who benefits from and pays for ads shown in the EU, from the card."},"campaignName":{"type":"string","maxLength":200,"description":"The campaign's name when the person gave one, word for word."},"campaignOnly":{"type":"boolean","description":"True when the person asks for the campaign alone, with no ad set and no ad. Then nothing about creatives, ad sets or ads is asked."},"conversionEvent":{"type":"string","maxLength":60,"description":"From the card."},"copy":{"type":"string","enum":["generate","reuse","provided"],"description":"Only from the person's answer."},"countries":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":50},"dailyBudget":{"type":"number","exclusiveMinimum":0,"maximum":1000000},"destinationUrl":{"type":"string","maxLength":500},"folderId":{"type":"string","maxLength":200},"formats":{"type":"string","enum":["send_missing","as_is"],"description":"Only from the person's answer; never decide it for them."},"languages":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":20},"layout":{"type":"string","enum":["one_ad_set","ad_set_per_ad","campaign_per_ad"],"description":"From the card."},"objective":{"type":"string","enum":["Sales","Traffic","Leads"]},"pageId":{"type":"string","maxLength":200,"description":"From the card."},"pixelId":{"type":"string","maxLength":200,"description":"From the card."},"purpose":{"type":"string","maxLength":200,"description":"What the ads are for, as the person said it: Black Friday, a new product, always-on sales. Not their request to run ads."},"schedule":{"type":"string","maxLength":200},"source":{"type":"string","enum":["drive_folder","images","reuse","none"],"description":"Where the creatives are, when the person said or it is plain: a mentioned folder, attached images. none: no creatives yet; Adrails makes none, so the rest is saved as a draft in Campaigns."},"target":{"type":"string","maxLength":260,"description":"Where the ads go, exactly as the card returned it: new_campaign, new_ad_set:<campaign id> or ad_set:<ad set id>."}},"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"drive_folder","description":"Reads the creatives in a Google Drive folder. With folderId (the folder_id of a type=drive_folder mention, or one returned by a search) it lists every image and video down to three levels, each with its path, the ratio Drive measured (9:16, 4:5, 1:1, 1.91:1), its pixel size, a video's duration and the file size, then how Adrails would group them into ads by default: each file at the top of the folder is one ad, each subfolder is one ad whose files are the same creative in several ratios. Without folderId it returns folders whose name contains query, most recently changed first. People file creatives their own way: when the default grouping does not fit what you see (the same duration across ratios in different folders, ratio names in file names, raw footage, logos), say how you would group them and ask the one question that decides it. Read only: it uploads and launches nothing.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"folderId":{"type":"string","minLength":1,"maxLength":200},"query":{"type":"string","maxLength":100}},"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"creative_insights","description":"Groups Meta ads by the actual image or video asset, even when the same asset is used in several ads or accounts. Returns winners, fatigue, repeated usage, performance and missing angle, offer, product, persona or creator metadata. Use this before proposing creative variants.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"accountIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":50},"limit":{"type":"integer","minimum":1,"maximum":30}},"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"creative_market_evidence","description":"Per-ad performance, existing copy/media identifiers and the parent ad set's configured country targeting, with snapshot period and freshness. Read before proposing reuse, localization or a new-market test. This is NOT a country delivery breakdown: do not attribute multi-country results to a single country or claim visuals were inspected. Selection and preview limits apply.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"accountIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":50},"adIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":50},"limit":{"type":"integer","minimum":1,"maximum":30}},"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"actions_recent","description":"Recent proposed and executed actions, their ids, evidence, execution state, conditional undo availability and 24-hour, 3-day and 7-day observations. Read this before an undo or when reporting what Adrails changed. Paginated: at most 10 actions per read, default 5; use nextOffset with the same account scope for older actions. Do not ask the person to narrow a history you can page.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"accountIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":50},"limit":{"type":"integer","minimum":1,"maximum":10},"offset":{"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"campaigns_pause","description":"Pauses a campaign, an ad group or an ad, on Meta or Google Ads. The entity must come from an earlier read: give its id exactly as it was returned. Nothing is sent before the person approves, and the pause is reversible from the platform as well as from Adrails.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. This call PREPARES a pending action. Follow its Adrails approval URL; it does not execute the change.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"entityId":{"type":"string","minLength":1},"entityType":{"type":"string","enum":["campaign","ad_group","ad"]},"reason":{"type":"string","minLength":1,"maxLength":200}},"required":["accountId","entityId","entityType","reason"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"campaigns_set_status","description":"Pauses or resumes one campaign, ad group or ad, on Meta or Google Ads. It re-reads the current platform state before applying, refuses a concurrent change, and measures the result after 24 hours, 3 days and 7 days.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. This call PREPARES a pending action. Follow its Adrails approval URL; it does not execute the change.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"entityId":{"type":"string","minLength":1},"entityType":{"type":"string","enum":["campaign","ad_group","ad"]},"reason":{"type":"string","minLength":1,"maxLength":300},"status":{"type":"string","enum":["ACTIVE","PAUSED"]}},"required":["accountId","entityId","entityType","reason","status"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"campaigns_change_budget","description":"Increases or decreases a campaign or ad group daily budget by an amount or percentage. Google Ads keeps budgets on campaigns only, and refuses a budget shared between campaigns. Requires measured spend and results for increases, caps one change at 30 percent, re-reads the platform before applying and schedules result measurements.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. This call PREPARES a pending action. Follow its Adrails approval URL; it does not execute the change.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"direction":{"type":"string","enum":["increase","decrease"]},"entityId":{"type":"string","minLength":1},"entityType":{"type":"string","enum":["campaign","ad_group"]},"reason":{"type":"string","minLength":1,"maxLength":300},"unit":{"type":"string","enum":["amount","percent"]},"value":{"type":"number","exclusiveMinimum":0}},"required":["accountId","direction","entityId","entityType","reason","unit","value"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"campaigns_setup","description":"For a read-only launch-check, inspect available account settings without preparing a launch. For building new ads, read once launch_brief is complete: launch_brief remains first, its card chooses the account, and a message starting with \"Launch brief answers:\" goes there. Lists selected Meta accounts with internal accountId, currency, snapshot freshness and available Page IDs, pixel IDs and image hashes. Available candidates are NOT confirmed selections, permission/event checks or a passed campaign preflight. With no explicitly scoped account it returns a picker; never choose for the person. Empty asset lists mean upload media or connect the missing identity in Campaigns. Never invent IDs or broaden source scope.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"accountIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":100}},"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"campaigns_create_draft","description":"Prepares the exact approval card for a NEW Meta campaign with one website ad set and one image ad. Call this tool when required choices are confirmed; do not ask for an extra verbal approval or imitate its approval card in prose. Clicking approval validates the exact structure and starts a durable Meta build immediately. Every campaign, ad set, creative and ad is created PAUSED, so approval never starts spending; activation is a separate action. Supports standard (non-special-category) Sales, Leads or Traffic campaigns. Ask for missing required fields; never invent budgets, schedules, audiences, page IDs or image hashes. Use an existing uploaded Meta image hash; otherwise ask for upload in Campaigns. Budget uses the account's native currency. placements=feeds restricts to manual Facebook Feed and Instagram Feed ONLY, not automatic placements. Advanced formats and special-category campaigns must use the Campaigns editor.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. This call PREPARES a pending action. Follow its Adrails approval URL; it does not execute the change.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"objective":{"type":"string","enum":["Sales","Traffic","Leads"]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"dailyBudget":{"type":"number","exclusiveMinimum":0,"maximum":100000},"countries":{"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"},"minItems":1,"maxItems":50},"ageMin":{"type":"integer","minimum":18,"maximum":65},"ageMax":{"type":"integer","minimum":18,"maximum":65},"startAt":{"type":"string","format":"date-time"},"endAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"placements":{"type":"string","enum":["feeds","automatic"],"description":"feeds means manual Facebook Feed and Instagram Feed ONLY, excluding Stories, Reels and Audience Network. automatic means Advantage+ placements. No later editor change is needed to restrict feeds."},"specialAdCategory":{"type":"string","const":"None"},"facebookPageId":{"type":"string","pattern":"^\\d+$"},"pixelId":{"type":"string","pattern":"^\\d+$"},"conversionEvent":{"type":"string","enum":["Purchase","Lead","Complete_registration","Add_to_cart"]},"beneficiary":{"type":"string","minLength":1,"maxLength":255},"destinationUrl":{"type":"string","format":"uri"},"callToAction":{"type":"string","enum":["Learn more","Shop now","Sign up","Contact us","Get offer","Book now"]},"imageHash":{"type":"string","minLength":1,"maxLength":255},"headline":{"type":"string","minLength":1,"maxLength":255},"primaryText":{"type":"string","minLength":1,"maxLength":2000},"description":{"type":"string","maxLength":500},"reason":{"type":"string","minLength":1,"maxLength":300}},"required":["accountId","name","objective","currency","dailyBudget","countries","ageMin","ageMax","startAt","endAt","placements","specialAdCategory","facebookPageId","beneficiary","destinationUrl","callToAction","imageHash","headline","primaryText","reason"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"campaigns_structure","description":"Reads, from the last sync, how an ad account's campaigns are built, on any platform: every campaign with its type, status, budget and bidding; every ad group or ad set with its keywords (ids, match types, quality scores) and, for Performance Max asset groups, each text with its asset id; every ad with its format, headlines, descriptions, paths, final URL, pictures and review. Read it before building under an existing campaign or ad group, or before editing, and use only the ids it returns. Optional campaignId narrows it to one campaign.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"accountId":{"type":"string","minLength":1,"maxLength":200},"campaignId":{"type":"string","minLength":1,"maxLength":60}},"required":["accountId"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"google_ads_library","description":"Reads a Google Ads account's picture library (each picture's assetId, address and size) and its audiences (id and name). Use it to reuse pictures already in the account by assetId in google_ads_build, and to name an audience signal for a Performance Max asset group. Only the pictures listed here or given by the person may be used.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"accountId":{"type":"string","minLength":1,"maxLength":200}},"required":["accountId"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"google_keyword_planner","description":"Reads Google's Keyword Planner for a Google Ads account: with mode volumes, how often each keyword is searched a month and the top of page bid range; with mode ideas, keywords that a few words or a page (https url) suggest, most searched first, with the same figures. Counts are for the countries and the language given, or everywhere. Use it to choose a search campaign's keywords on real searches rather than guesses, and say where the figures come from. Read only.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. ","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"accountId":{"type":"string","minLength":1,"maxLength":200},"countries":{"type":"array","items":{"type":"string","minLength":2,"maxLength":60},"maxItems":10,"default":[],"description":"Country names or codes: France, BE."},"keywords":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":200,"default":[]},"language":{"type":"string","minLength":2,"maxLength":40,"description":"A language name or code: French, fr."},"mode":{"type":"string","enum":["volumes","ideas"]},"url":{"type":"string","format":"uri","description":"For ideas: a page of the site, https."}},"required":["accountId","mode"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"google_ads_build","description":"Prepares the exact approval card to create Google Ads, in one of three ways: a NEW campaign (Search, Display, Demand Gen or Performance Max) with its ad groups, keywords and ads or its asset groups; new ad groups with ads under an existing campaign; or new ads, as many as asked and in several formats, in an existing ad group. Formats: responsive_search (text only: 3 to 15 headlines of 30 characters, 2 to 4 descriptions of 90, optional pins and two path words), responsive_display (Display campaigns: pictures, logo, long headline, business name) and demand_gen_image (Demand Gen campaigns). A Search campaign takes only responsive_search ads; Performance Max takes asset groups, not ads. Write copy in the language of the countries targeted, never with a price, discount or deadline the person did not give, and vary the headlines: Google combines them. Pictures are public https URLs the person gave or that campaigns_structure returned, or files of the workspace's Google Drive by the file_id drive_folder lists (driveFileId), downloaded only when Google checks and creates the ad; never invent one. A Drive folder of creatives becomes a Demand Gen campaign of image or carousel ads, or a Performance Max asset group, and its videos need their YouTube ids. After approval Google validates the exact request and everything is created PAUSED: a new campaign paused with its groups and ads under it, anything added to an existing campaign paused itself. Nothing spends until someone switches it on. Targeting takes countries, regions and cities (Lyon, FR), exclusions, radii around an address, and whether to reach only people in those places. Search and Display campaigns can carry extensions (sitelinks, callouts, structured snippets, a phone number, promotions, prices): only what the person gave or the site states, never an invented offer or price. A Performance Max asset group can carry search themes and one audience signal. Pictures already in the account are reused by assetId from google_ads_library. Use campaigns_structure first for existing ids. Meta ads go through campaigns_launch instead.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. This call PREPARES a pending action. Follow its Adrails approval URL; it does not execute the change.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"adGroups":{"type":"array","items":{"type":"object","properties":{"ads":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"descriptions":{"type":"array","items":{"type":"object","properties":{"pin":{"type":"integer","description":"Only to force this text into one position; leave it out otherwise."},"text":{"type":"string","minLength":1,"maxLength":90}},"required":["text"],"additionalProperties":false},"minItems":2,"maxItems":4},"finalUrl":{"type":"string","format":"uri"},"format":{"type":"string","const":"responsive_search","description":"Text only: Google shows up to three headlines and two descriptions it picks per search."},"headlines":{"type":"array","items":{"type":"object","properties":{"pin":{"type":"integer","description":"Only to force this text into one position; leave it out otherwise."},"text":{"type":"string","minLength":1,"maxLength":30}},"required":["text"],"additionalProperties":false},"minItems":3,"maxItems":15},"path1":{"type":"string","maxLength":15,"pattern":"^[^\\s/]*$","description":"One word shown after the domain."},"path2":{"type":"string","maxLength":15,"pattern":"^[^\\s/]*$"}},"required":["descriptions","finalUrl","format","headlines"],"additionalProperties":false},{"type":"object","properties":{"businessName":{"type":"string","minLength":1,"maxLength":25},"callToAction":{"type":"string","maxLength":30},"descriptions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":90},"minItems":1,"maxItems":5},"finalUrl":{"type":"string","format":"uri"},"format":{"type":"string","const":"responsive_display","description":"Display Network: needs at least one landscape (1.91:1) and one square (1:1) picture."},"headlines":{"type":"array","items":{"type":"string","minLength":1,"maxLength":30},"minItems":1,"maxItems":5},"images":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","pattern":"^\\d+$","description":"The picture's id in the account's library, from google_ads_library: it is reused, not sent again."},"driveFileId":{"type":"string","pattern":"^[\\w-]{10,200}$","description":"A picture in the workspace's Google Drive, by the file_id drive_folder lists. Adrails downloads it from Drive only when Google checks and creates the ad. Use it in place of url."},"kind":{"type":"string","enum":["image","logo"],"description":"logo for the brand's logo; image for everything else. Adrails measures each file to put it in its place (landscape, square, portrait)."},"url":{"type":"string","format":"uri","description":"A public https address of a PNG, JPEG or GIF, 5 MB at most, or the library's own address. Never invent one."}},"required":["kind"],"additionalProperties":false},"minItems":2,"maxItems":20},"longHeadline":{"type":"string","minLength":1,"maxLength":90}},"required":["businessName","descriptions","finalUrl","format","headlines","images","longHeadline"],"additionalProperties":false},{"type":"object","properties":{"businessName":{"type":"string","minLength":1,"maxLength":25},"callToAction":{"type":"string","maxLength":30},"descriptions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":90},"minItems":1,"maxItems":5},"finalUrl":{"type":"string","format":"uri"},"format":{"type":"string","const":"demand_gen_image","description":"YouTube, Discover and Gmail: needs a landscape or square picture and a square logo."},"headlines":{"type":"array","items":{"type":"string","minLength":1,"maxLength":30},"minItems":1,"maxItems":5},"images":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","pattern":"^\\d+$","description":"The picture's id in the account's library, from google_ads_library: it is reused, not sent again."},"driveFileId":{"type":"string","pattern":"^[\\w-]{10,200}$","description":"A picture in the workspace's Google Drive, by the file_id drive_folder lists. Adrails downloads it from Drive only when Google checks and creates the ad. Use it in place of url."},"kind":{"type":"string","enum":["image","logo"],"description":"logo for the brand's logo; image for everything else. Adrails measures each file to put it in its place (landscape, square, portrait)."},"url":{"type":"string","format":"uri","description":"A public https address of a PNG, JPEG or GIF, 5 MB at most, or the library's own address. Never invent one."}},"required":["kind"],"additionalProperties":false},"minItems":2,"maxItems":20}},"required":["businessName","descriptions","finalUrl","format","headlines","images"],"additionalProperties":false},{"type":"object","properties":{"businessName":{"type":"string","minLength":1,"maxLength":25},"callToAction":{"type":"string","maxLength":30},"cards":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","pattern":"^\\d+$"},"callToAction":{"type":"string","maxLength":30},"driveFileId":{"type":"string","pattern":"^[\\w-]{10,200}$","description":"A picture in the workspace's Google Drive, by the file_id drive_folder lists. Adrails downloads it from Drive only when Google checks and creates the ad. Use it in place of url."},"headline":{"type":"string","minLength":1,"maxLength":40},"imageUrl":{"type":"string","format":"uri","description":"The card's picture: landscape, square or portrait."},"url":{"type":"string","format":"uri"}},"required":["headline","url"],"additionalProperties":false},"minItems":2,"maxItems":10},"description":{"type":"string","minLength":1,"maxLength":90},"finalUrl":{"type":"string","format":"uri"},"format":{"type":"string","const":"demand_gen_carousel","description":"Demand Gen campaigns: 2 to 10 cards, each its own picture, headline and link, like a Meta carousel."},"headline":{"type":"string","minLength":1,"maxLength":40},"images":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","pattern":"^\\d+$","description":"The picture's id in the account's library, from google_ads_library: it is reused, not sent again."},"driveFileId":{"type":"string","pattern":"^[\\w-]{10,200}$","description":"A picture in the workspace's Google Drive, by the file_id drive_folder lists. Adrails downloads it from Drive only when Google checks and creates the ad. Use it in place of url."},"kind":{"type":"string","enum":["image","logo"],"description":"logo for the brand's logo; image for everything else. Adrails measures each file to put it in its place (landscape, square, portrait)."},"url":{"type":"string","format":"uri","description":"A public https address of a PNG, JPEG or GIF, 5 MB at most, or the library's own address. Never invent one."}},"required":["kind"],"additionalProperties":false},"minItems":1,"maxItems":20,"description":"The square logo."}},"required":["businessName","cards","description","finalUrl","format","headline","images"],"additionalProperties":false},{"type":"object","properties":{"businessName":{"type":"string","minLength":1,"maxLength":25},"descriptions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":90},"minItems":1,"maxItems":5},"finalUrl":{"type":"string","format":"uri"},"format":{"type":"string","const":"demand_gen_video","description":"Demand Gen campaigns: YouTube videos, the way a Meta video ad runs in feeds and Shorts."},"headlines":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"minItems":1,"maxItems":5},"images":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","pattern":"^\\d+$","description":"The picture's id in the account's library, from google_ads_library: it is reused, not sent again."},"driveFileId":{"type":"string","pattern":"^[\\w-]{10,200}$","description":"A picture in the workspace's Google Drive, by the file_id drive_folder lists. Adrails downloads it from Drive only when Google checks and creates the ad. Use it in place of url."},"kind":{"type":"string","enum":["image","logo"],"description":"logo for the brand's logo; image for everything else. Adrails measures each file to put it in its place (landscape, square, portrait)."},"url":{"type":"string","format":"uri","description":"A public https address of a PNG, JPEG or GIF, 5 MB at most, or the library's own address. Never invent one."}},"required":["kind"],"additionalProperties":false},"minItems":1,"maxItems":20,"description":"The square logo."},"longHeadlines":{"type":"array","items":{"type":"string","minLength":1,"maxLength":90},"minItems":1,"maxItems":5},"videos":{"type":"array","items":{"type":"string","pattern":"^[\\w-]{11}$"},"minItems":1,"maxItems":5,"description":"YouTube video ids."}},"required":["businessName","descriptions","finalUrl","format","headlines","images","longHeadlines","videos"],"additionalProperties":false}]},{"type":"object","properties":{"urlParameters":{"type":"string","maxLength":1000,"pattern":"^[^?#\\s][^#\\s]*$","description":"Added to every final URL: utm_source=google&utm_medium=cpc&utm_campaign={campaignid}. Google fills {campaignid}, {adgroupid} and {creative}."}}}]},"maxItems":20,"description":"Every ad to create in this group, of the formats its campaign takes."},"ages":{"type":"object","properties":{"max":{"type":"integer","minimum":24,"maximum":65},"min":{"type":"integer","minimum":18,"maximum":65}},"required":["max","min"],"additionalProperties":false,"description":"Ages reached, on Google's ranges: 18, 25, 35, 45, 55 and 65 and over."},"audienceLists":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":20,"description":"The account's audience lists to reach, by name or id from google_ads_library."},"excludedAudienceLists":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":20},"gender":{"type":"string","enum":["all","women","men"]},"urlParameters":{"type":"string","maxLength":1000,"pattern":"^[^?#\\s][^#\\s]*$","description":"Added to every final URL: utm_source=google&utm_medium=cpc&utm_campaign={campaignid}. Google fills {campaignid}, {adgroupid} and {creative}."},"existingId":{"type":"string","pattern":"^\\d+$","description":"A group Google already has, from campaigns_structure: only the ads are added."},"keywords":{"type":"array","items":{"type":"string","minLength":1,"maxLength":82},"maxItems":200,"description":"Search only. Google's syntax: [exact], \"phrase\", broad, and a leading minus to exclude. Chosen on google_keyword_planner's searches where the campaign runs, not guessed."},"maxCpc":{"type":"number","exclusiveMinimum":0,"description":"Manual CPC only."},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["ads"],"additionalProperties":false},"maxItems":20,"default":[]},"assetGroups":{"type":"array","items":{"type":"object","properties":{"audience":{"type":"string","minLength":1,"maxLength":200,"description":"One audience the account has, by name or id from google_ads_library: who Google should look for first."},"businessName":{"type":"string","minLength":1,"maxLength":25},"callToAction":{"type":"string","maxLength":30},"descriptions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":90},"minItems":2,"maxItems":5,"description":"One of them 60 characters or fewer."},"finalUrl":{"type":"string","format":"uri"},"headlines":{"type":"array","items":{"type":"string","minLength":1,"maxLength":30},"minItems":3,"maxItems":15},"images":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","pattern":"^\\d+$","description":"The picture's id in the account's library, from google_ads_library: it is reused, not sent again."},"driveFileId":{"type":"string","pattern":"^[\\w-]{10,200}$","description":"A picture in the workspace's Google Drive, by the file_id drive_folder lists. Adrails downloads it from Drive only when Google checks and creates the ad. Use it in place of url."},"kind":{"type":"string","enum":["image","logo"],"description":"logo for the brand's logo; image for everything else. Adrails measures each file to put it in its place (landscape, square, portrait)."},"url":{"type":"string","format":"uri","description":"A public https address of a PNG, JPEG or GIF, 5 MB at most, or the library's own address. Never invent one."}},"required":["kind"],"additionalProperties":false},"minItems":3,"maxItems":20,"description":"At least a landscape picture, a square picture and a square logo."},"longHeadlines":{"type":"array","items":{"type":"string","minLength":1,"maxLength":90},"minItems":1,"maxItems":5},"name":{"type":"string","minLength":1,"maxLength":255},"searchThemes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":50,"description":"Searches the products answer, in the searcher's words."},"youtubeVideos":{"type":"array","items":{"type":"string","pattern":"^[\\w-]{11}$"},"maxItems":15,"description":"YouTube video ids. Leave out when there are none; Google makes videos from the pictures."}},"required":["businessName","descriptions","finalUrl","headlines","images","longHeadlines","name"],"additionalProperties":false},"maxItems":10,"default":[]},"campaign":{"anyOf":[{"type":"object","properties":{"existingId":{"type":"string","pattern":"^\\d+$","description":"A campaign Google already has."}},"required":["existingId"],"additionalProperties":false},{"type":"object","properties":{"budgetType":{"type":"string","enum":["daily","total"],"default":"daily","description":"total spends dailyBudget over the whole run, Meta's lifetime budget; it needs an endDate."},"frequencyCap":{"type":"object","properties":{"cap":{"type":"integer","minimum":1,"maximum":100},"per":{"type":"string","enum":["day","week","month"]}},"required":["cap","per"],"additionalProperties":false,"description":"Display campaigns: how often one person sees the ads at most."},"urlParameters":{"type":"string","maxLength":1000,"pattern":"^[^?#\\s][^#\\s]*$","description":"Added to every final URL: utm_source=google&utm_medium=cpc&utm_campaign={campaignid}. Google fills {campaignid}, {adgroupid} and {creative}."},"conversionGoal":{"type":"string","enum":["Purchase","Lead","Add to cart","Begin checkout","Complete registration","Contact","Book appointment","Phone call","Qualified lead","Subscribe","Page view"],"description":"Leave out to bid for the account's own goals, which is usually right."},"brandSafety":{"type":"string","enum":["moderate","limited"],"description":"Display and Demand Gen: content the ads never show beside, as Meta's inventory levels. Leave out for the account's default."},"bidding":{"anyOf":[{"type":"object","properties":{"strategy":{"type":"string","const":"maximize_conversions"},"targetCpa":{"type":"number","exclusiveMinimum":0}},"required":["strategy"],"additionalProperties":false},{"type":"object","properties":{"strategy":{"type":"string","const":"maximize_conversion_value"},"targetRoas":{"type":"number","exclusiveMinimum":0,"description":"A ratio: 4 means 400%."}},"required":["strategy"],"additionalProperties":false},{"type":"object","properties":{"maxCpc":{"type":"number","exclusiveMinimum":0},"strategy":{"type":"string","const":"maximize_clicks"}},"required":["strategy"],"additionalProperties":false},{"type":"object","properties":{"strategy":{"type":"string","const":"manual_cpc"}},"required":["strategy"],"additionalProperties":false},{"type":"object","properties":{"location":{"type":"string","enum":["ANYWHERE_ON_PAGE","TOP_OF_PAGE","ABSOLUTE_TOP_OF_PAGE"],"default":"ANYWHERE_ON_PAGE"},"maxCpc":{"type":"number","exclusiveMinimum":0,"description":"The most a click may cost, in the account's currency: Google needs it."},"percent":{"type":"number","minimum":1,"maximum":100,"description":"How often the ads show there, as a percentage."},"strategy":{"type":"string","const":"target_impression_share","description":"Search campaigns only."}},"required":["maxCpc","percent","strategy"],"additionalProperties":false}]},"dailyBudget":{"type":"number","exclusiveMinimum":0,"maximum":100000,"description":"In the account's currency."},"endDate":{"type":"string","format":"date"},"excludedLocations":{"type":"array","items":{"type":"string","minLength":2,"maxLength":80},"maxItems":50},"extensions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"description1":{"type":"string","minLength":1,"maxLength":35},"description2":{"type":"string","minLength":1,"maxLength":35},"text":{"type":"string","minLength":1,"maxLength":25},"type":{"type":"string","const":"sitelink"},"url":{"type":"string","format":"uri"}},"required":["text","type","url"],"additionalProperties":false},{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":25},"type":{"type":"string","const":"callout"}},"required":["text","type"],"additionalProperties":false},{"type":"object","properties":{"header":{"type":"string","enum":["Amenities","Brands","Courses","Degree programs","Destinations","Featured hotels","Insurance coverage","Models","Neighborhoods","Service catalog","Shows","Styles","Types"]},"type":{"type":"string","const":"structured_snippet"},"values":{"type":"array","items":{"type":"string","minLength":1,"maxLength":25},"minItems":3,"maxItems":10}},"required":["header","type","values"],"additionalProperties":false},{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"phoneNumber":{"type":"string","minLength":6,"maxLength":20},"type":{"type":"string","const":"call"}},"required":["countryCode","phoneNumber","type"],"additionalProperties":false},{"type":"object","properties":{"amountOff":{"type":"number","exclusiveMinimum":0},"code":{"type":"string","maxLength":15},"endDate":{"type":"string","format":"date"},"occasion":{"type":"string","maxLength":30,"description":"One of Google's occasions: Black Friday, Christmas, Summer sale, and the like."},"ordersOver":{"type":"number","exclusiveMinimum":0},"percentOff":{"type":"number","exclusiveMinimum":0,"maximum":100},"startDate":{"type":"string","format":"date"},"target":{"type":"string","minLength":1,"maxLength":20,"description":"What is on offer."},"type":{"type":"string","const":"promotion"},"url":{"type":"string","format":"uri"}},"required":["target","type","url"],"additionalProperties":false,"description":"Only an offer the person gave: percentOff or amountOff, one of the two."},{"type":"object","properties":{"offerings":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"description":{"type":"string","minLength":1,"maxLength":25},"header":{"type":"string","minLength":1,"maxLength":25},"price":{"type":"number","minimum":0},"unit":{"type":"string","maxLength":10,"description":"hour, day, week, month, year or night, when priced per unit"},"url":{"type":"string","format":"uri"}},"required":["currency","description","header","price","url"],"additionalProperties":false},"minItems":3,"maxItems":8},"priceType":{"type":"string","enum":["Brands","Events","Locations","Neighborhoods","Product categories","Product tiers","Service categories","Service tiers","Services"]},"qualifier":{"type":"string","enum":["from","up_to","average"]},"type":{"type":"string","const":"price"}},"required":["offerings","priceType","type"],"additionalProperties":false,"description":"Only prices the person gave."}]},"maxItems":60,"description":"Search and Display campaigns: sitelinks, callouts, snippets, a phone number, promotions, prices. Only what the person gave or the site shows; never an invented offer."},"languages":{"type":"array","items":{"type":"string","minLength":2,"maxLength":40},"minItems":1,"maxItems":20,"description":"Codes (fr) or English names (French)."},"locationOption":{"type":"string","enum":["presence","presence_or_interest"],"description":"presence: people in the places; presence_or_interest (Google's default): also people interested in them."},"locations":{"type":"array","items":{"type":"string","minLength":2,"maxLength":80},"maxItems":50,"default":[],"description":"Countries (ISO code or name), regions or cities; a city with its country: \"Lyon, FR\"."},"radius":{"type":"array","items":{"type":"object","properties":{"address":{"type":"object","properties":{"city":{"type":"string","maxLength":80},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"postalCode":{"type":"string","maxLength":12},"street":{"type":"string","maxLength":120}},"required":["countryCode"],"additionalProperties":false},"km":{"type":"number","exclusiveMinimum":0,"maximum":800}},"required":["address","km"],"additionalProperties":false},"maxItems":20,"description":"A radius around an address, for a shop or a local area."},"name":{"type":"string","minLength":1,"maxLength":255},"searchPartners":{"type":"boolean","description":"Search only."},"startDate":{"type":"string","format":"date"},"type":{"type":"string","enum":["SEARCH","DISPLAY","DEMAND_GEN","PERFORMANCE_MAX"]}},"required":["bidding","dailyBudget","languages","name","type"],"additionalProperties":false}]},"reason":{"type":"string","minLength":1,"maxLength":300}},"required":["accountId","campaign","reason"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"google_ads_edit","description":"Prepares the exact approval card for changes to what a Google Ads account already has: an ad's headlines, descriptions, pins, paths, final URL, long headline or business name (the new lists replace the old ones); keywords added in Google's syntax or removed by id; campaigns, ad groups and asset groups renamed; campaign start and end dates; a campaign's target CPA or target ROAS; texts added to or removed from a Performance Max asset group; extensions added or removed; places, exclusions, radii and languages added or removed, and who a place reaches; search themes and audience signals added or removed. Google validates every change when the card is prepared and again when it is applied, all or nothing. Pausing, resuming and budgets have their own tools. Read campaigns_structure first and use its ids.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. This call PREPARES a pending action. Follow its Adrails approval URL; it does not execute the change.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"changes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"adId":{"type":"string","pattern":"^\\d+~\\d+$","description":"The ad as the snapshot names it: group~ad."},"businessName":{"type":"string","maxLength":25},"descriptions":{"type":"array","items":{"type":"object","properties":{"pin":{"type":"integer","minimum":1,"maximum":3},"text":{"type":"string","minLength":1,"maxLength":90}},"required":["text"],"additionalProperties":false},"maxItems":5},"finalUrl":{"type":"string","format":"uri"},"headlines":{"type":"array","items":{"type":"object","properties":{"pin":{"type":"integer","minimum":1,"maximum":3},"text":{"type":"string","minLength":1,"maxLength":90}},"required":["text"],"additionalProperties":false},"maxItems":15},"longHeadline":{"type":"string","maxLength":90},"path1":{"anyOf":[{"type":"string","maxLength":15},{"type":"null"}]},"path2":{"anyOf":[{"type":"string","maxLength":15},{"type":"null"}]},"type":{"type":"string","const":"ad_copy"}},"required":["adId","type"],"additionalProperties":false},{"type":"object","properties":{"add":{"type":"array","items":{"type":"string","minLength":1,"maxLength":82},"maxItems":200,"default":[],"description":"Google's syntax: [exact], \"phrase\", broad, -negative."},"adGroupId":{"type":"string","pattern":"^\\d+$"},"remove":{"type":"array","items":{"type":"string","pattern":"^\\d+~\\d+$"},"maxItems":200,"default":[],"description":"Keyword ids from the snapshot: group~criterion."},"type":{"type":"string","const":"keywords"}},"required":["adGroupId","type"],"additionalProperties":false},{"type":"object","properties":{"entityId":{"type":"string","pattern":"^\\d+(~\\d+)?$"},"entityType":{"type":"string","enum":["campaign","ad_group","asset_group"]},"name":{"type":"string","minLength":1,"maxLength":255},"type":{"type":"string","const":"rename"}},"required":["entityId","entityType","name","type"],"additionalProperties":false},{"type":"object","properties":{"campaignId":{"type":"string","pattern":"^\\d+$"},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"null runs it until stopped."},"startDate":{"type":"string","format":"date"},"type":{"type":"string","const":"dates"}},"required":["campaignId","type"],"additionalProperties":false},{"type":"object","properties":{"campaignId":{"type":"string","pattern":"^\\d+$"},"targetCpa":{"type":"number","exclusiveMinimum":0},"targetRoas":{"type":"number","exclusiveMinimum":0},"type":{"type":"string","const":"target"}},"required":["campaignId","type"],"additionalProperties":false},{"type":"object","properties":{"add":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"description1":{"type":"string","minLength":1,"maxLength":35},"description2":{"type":"string","minLength":1,"maxLength":35},"text":{"type":"string","minLength":1,"maxLength":25},"type":{"type":"string","const":"sitelink"},"url":{"type":"string","format":"uri"}},"required":["text","type","url"],"additionalProperties":false},{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":25},"type":{"type":"string","const":"callout"}},"required":["text","type"],"additionalProperties":false},{"type":"object","properties":{"header":{"type":"string","enum":["Amenities","Brands","Courses","Degree programs","Destinations","Featured hotels","Insurance coverage","Models","Neighborhoods","Service catalog","Shows","Styles","Types"]},"type":{"type":"string","const":"structured_snippet"},"values":{"type":"array","items":{"type":"string","minLength":1,"maxLength":25},"minItems":3,"maxItems":10}},"required":["header","type","values"],"additionalProperties":false},{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"phoneNumber":{"type":"string","minLength":6,"maxLength":20},"type":{"type":"string","const":"call"}},"required":["countryCode","phoneNumber","type"],"additionalProperties":false},{"type":"object","properties":{"amountOff":{"type":"number","exclusiveMinimum":0},"code":{"type":"string","maxLength":15},"endDate":{"type":"string","format":"date"},"occasion":{"type":"string","maxLength":30,"description":"One of Google's occasions: Black Friday, Christmas, Summer sale, and the like."},"ordersOver":{"type":"number","exclusiveMinimum":0},"percentOff":{"type":"number","exclusiveMinimum":0,"maximum":100},"startDate":{"type":"string","format":"date"},"target":{"type":"string","minLength":1,"maxLength":20,"description":"What is on offer."},"type":{"type":"string","const":"promotion"},"url":{"type":"string","format":"uri"}},"required":["target","type","url"],"additionalProperties":false,"description":"Only an offer the person gave: percentOff or amountOff, one of the two."},{"type":"object","properties":{"offerings":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"description":{"type":"string","minLength":1,"maxLength":25},"header":{"type":"string","minLength":1,"maxLength":25},"price":{"type":"number","minimum":0},"unit":{"type":"string","maxLength":10,"description":"hour, day, week, month, year or night, when priced per unit"},"url":{"type":"string","format":"uri"}},"required":["currency","description","header","price","url"],"additionalProperties":false},"minItems":3,"maxItems":8},"priceType":{"type":"string","enum":["Brands","Events","Locations","Neighborhoods","Product categories","Product tiers","Service categories","Service tiers","Services"]},"qualifier":{"type":"string","enum":["from","up_to","average"]},"type":{"type":"string","const":"price"}},"required":["offerings","priceType","type"],"additionalProperties":false,"description":"Only prices the person gave."}]},"maxItems":40,"default":[]},"campaignId":{"type":"string","pattern":"^\\d+$"},"remove":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","pattern":"^\\d+$"},"type":{"type":"string","enum":["sitelink","callout","structured_snippet","call","promotion","price"]}},"required":["assetId","type"],"additionalProperties":false},"maxItems":40,"default":[],"description":"A campaign's own extensions, by the assetId campaigns_structure gives."},"type":{"type":"string","const":"extensions"}},"required":["campaignId","type"],"additionalProperties":false},{"type":"object","properties":{"addLanguages":{"type":"array","items":{"type":"string","minLength":2,"maxLength":40},"maxItems":20,"default":[]},"addLocations":{"type":"array","items":{"type":"string","minLength":2,"maxLength":80},"maxItems":50,"default":[],"description":"Countries, regions or cities: \"Lyon, FR\"."},"addRadius":{"type":"array","items":{"type":"object","properties":{"address":{"type":"object","properties":{"city":{"type":"string","maxLength":80},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"postalCode":{"type":"string","maxLength":12},"street":{"type":"string","maxLength":120}},"required":["countryCode"],"additionalProperties":false},"km":{"type":"number","exclusiveMinimum":0,"maximum":800}},"required":["address","km"],"additionalProperties":false},"maxItems":20,"default":[]},"campaignId":{"type":"string","pattern":"^\\d+$"},"excludeLocations":{"type":"array","items":{"type":"string","minLength":2,"maxLength":80},"maxItems":50,"default":[]},"locationOption":{"type":"string","enum":["presence","presence_or_interest"]},"remove":{"type":"array","items":{"type":"string","pattern":"^\\d+$"},"maxItems":50,"default":[],"description":"Criterion ids from campaigns_structure: places, radii and languages."},"type":{"type":"string","const":"targeting"}},"required":["campaignId","type"],"additionalProperties":false},{"type":"object","properties":{"campaignId":{"type":"string","pattern":"^\\d+$"},"frequencyCap":{"anyOf":[{"type":"object","properties":{"cap":{"type":"integer","minimum":1,"maximum":100},"per":{"type":"string","enum":["day","week","month"]}},"required":["cap","per"],"additionalProperties":false},{"type":"null"}],"description":"null removes the cap."},"type":{"type":"string","const":"frequency"}},"required":["campaignId","frequencyCap","type"],"additionalProperties":false},{"type":"object","properties":{"campaignId":{"type":"string","pattern":"^\\d+$"},"conversionGoal":{"anyOf":[{"type":"string","enum":["Purchase","Lead","Add to cart","Begin checkout","Complete registration","Contact","Book appointment","Phone call","Qualified lead","Subscribe","Page view"],"description":"The one result the campaign bids for. It must be a category the account records: campaigns_structure lists its conversion actions."},{"type":"null"}],"description":"null returns the campaign to the account's own goals."},"type":{"type":"string","const":"conversion_goal"}},"required":["campaignId","conversionGoal","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d+(~\\d+)?$","description":"A campaign id, an ad group id, or an ad as group~ad."},"level":{"type":"string","enum":["campaign","ad_group","ad"]},"type":{"type":"string","const":"url_parameters"},"urlParameters":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"description":"null removes them."}},"required":["id","level","type","urlParameters"],"additionalProperties":false},{"type":"object","properties":{"bidding":{"anyOf":[{"type":"object","properties":{"strategy":{"type":"string","const":"maximize_conversions"},"targetCpa":{"type":"number","exclusiveMinimum":0}},"required":["strategy"],"additionalProperties":false},{"type":"object","properties":{"strategy":{"type":"string","const":"maximize_conversion_value"},"targetRoas":{"type":"number","exclusiveMinimum":0}},"required":["strategy"],"additionalProperties":false},{"type":"object","properties":{"maxCpc":{"type":"number","exclusiveMinimum":0},"strategy":{"type":"string","const":"maximize_clicks"}},"required":["strategy"],"additionalProperties":false},{"type":"object","properties":{"strategy":{"type":"string","const":"manual_cpc"}},"required":["strategy"],"additionalProperties":false},{"type":"object","properties":{"location":{"type":"string","enum":["ANYWHERE_ON_PAGE","TOP_OF_PAGE","ABSOLUTE_TOP_OF_PAGE"],"default":"ANYWHERE_ON_PAGE"},"maxCpc":{"type":"number","exclusiveMinimum":0,"description":"The most a click may cost, in the account's currency: Google needs it."},"percent":{"type":"number","minimum":1,"maximum":100,"description":"How often the ads show there, as a percentage."},"strategy":{"type":"string","const":"target_impression_share","description":"Search campaigns only."}},"required":["maxCpc","percent","strategy"],"additionalProperties":false}]},"campaignId":{"type":"string","pattern":"^\\d+$"},"type":{"type":"string","const":"bidding","description":"A new strategy restarts Google's learning: say so to the person."}},"required":["bidding","campaignId","type"],"additionalProperties":false},{"type":"object","properties":{"adGroupId":{"type":"string","pattern":"^\\d+$"},"addLists":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":20,"default":[]},"ages":{"type":"object","properties":{"max":{"type":"integer","minimum":24,"maximum":65},"min":{"type":"integer","minimum":18,"maximum":65}},"required":["max","min"],"additionalProperties":false},"excludeLists":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":20,"default":[]},"gender":{"type":"string","enum":["all","women","men"]},"remove":{"type":"array","items":{"type":"string","pattern":"^\\d+$"},"maxItems":50,"default":[],"description":"Audience criterion ids from campaigns_structure."},"type":{"type":"string","const":"audience"}},"required":["adGroupId","type"],"additionalProperties":false},{"type":"object","properties":{"addAudience":{"type":"string","minLength":1,"maxLength":200},"addSearchThemes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":50,"default":[]},"assetGroupId":{"type":"string","pattern":"^\\d+$"},"remove":{"type":"array","items":{"type":"string","pattern":"^\\d+$"},"maxItems":50,"default":[],"description":"Signal ids from campaigns_structure."},"type":{"type":"string","const":"signals"}},"required":["assetGroupId","type"],"additionalProperties":false},{"type":"object","properties":{"add":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["HEADLINE","LONG_HEADLINE","DESCRIPTION"]},"text":{"type":"string","minLength":1,"maxLength":90}},"required":["field","text"],"additionalProperties":false},"maxItems":30,"default":[]},"assetGroupId":{"type":"string","pattern":"^\\d+$"},"remove":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","pattern":"^\\d+$"},"field":{"type":"string","enum":["HEADLINE","LONG_HEADLINE","DESCRIPTION"]}},"required":["assetId","field"],"additionalProperties":false},"maxItems":30,"default":[]},"type":{"type":"string","const":"asset_group_texts"}},"required":["assetGroupId","type"],"additionalProperties":false}]},"minItems":1,"maxItems":50},"reason":{"type":"string","minLength":1,"maxLength":300}},"required":["accountId","changes","reason"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"campaigns_launch","description":"Launches the ads of a complete launch brief: call it once launch_brief says the brief is complete, never before. Adrails keeps the brief's answers for the conversation, the ad account included: pass the copy when you write it, and any other field only to change it. It shows the person the exact approval card (where the ads go, settings, copy, every creative); nothing reaches Meta as an ad before they approve, and everything is created PAUSED. After approval Adrails sends the Drive files or attached images to the ad account, waits for Meta to process the videos, then builds the campaign, ad sets and ads. With copy=generate, write the copy yourself from what the creatives show and the destination, in the language of the countries targeted, short and without emoji, and never with a price, discount, offer or deadline the person did not give: one per ad in copies when the ads differ, or one for all as headline and primaryText; with copy=provided pass the person's words exactly. When the dates are not one of the card's choices, pass startDate and endDate. If it answers that something is missing, say what in one sentence or call launch_brief; never imitate the approval card in text. For a campaign alone (campaignOnly) or a launch without creatives (source none), it prepares instead the approval of a draft saved in Campaigns: nothing is sent to Meta, and the person adds the rest there before publishing.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. This call PREPARES a pending action. Follow its Adrails approval URL; it does not execute the change.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"accountId":{"type":"string","minLength":1,"maxLength":200,"description":"Optional: the brief already holds the account the card settled. Never a name or a placeholder."},"beneficiary":{"type":"string","maxLength":200,"description":"Who benefits from and pays for ads shown in the EU, from the card."},"campaignName":{"type":"string","maxLength":200,"description":"The campaign's name when the person gave one, word for word."},"campaignOnly":{"type":"boolean","description":"True when the person asks for the campaign alone, with no ad set and no ad. Then nothing about creatives, ad sets or ads is asked."},"conversionEvent":{"type":"string","maxLength":60,"description":"From the card."},"copy":{"type":"string","enum":["generate","reuse","provided"],"description":"Only from the person's answer."},"countries":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":50},"dailyBudget":{"type":"number","exclusiveMinimum":0,"maximum":1000000},"destinationUrl":{"type":"string","maxLength":500},"folderId":{"type":"string","maxLength":200},"formats":{"type":"string","enum":["send_missing","as_is"],"description":"Only from the person's answer; never decide it for them."},"languages":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":20},"layout":{"type":"string","enum":["one_ad_set","ad_set_per_ad","campaign_per_ad"],"description":"From the card."},"objective":{"type":"string","enum":["Sales","Traffic","Leads"]},"pageId":{"type":"string","maxLength":200,"description":"From the card."},"pixelId":{"type":"string","maxLength":200,"description":"From the card."},"purpose":{"type":"string","maxLength":200,"description":"What the ads are for, as the person said it: Black Friday, a new product, always-on sales. Not their request to run ads."},"schedule":{"type":"string","maxLength":200},"source":{"type":"string","enum":["drive_folder","images","reuse","none"],"description":"Where the creatives are, when the person said or it is plain: a mentioned folder, attached images. none: no creatives yet; Adrails makes none, so the rest is saved as a draft in Campaigns."},"target":{"type":"string","minLength":1,"maxLength":260,"description":"Optional: the brief keeps where the ads go. Omit it for a campaign alone."},"copies":{"type":"array","items":{"type":"object","properties":{"ad":{"type":"string","minLength":1,"maxLength":200,"description":"The ad's name as the folder table shows it."},"description":{"type":"string","maxLength":500},"headline":{"type":"string","minLength":1,"maxLength":255},"primaryText":{"type":"string","minLength":1,"maxLength":2000}},"required":["ad","headline","primaryText"],"additionalProperties":false},"maxItems":50,"description":"One copy per ad, when the ads differ. Ads left out take headline and primaryText."},"description":{"type":"string","maxLength":500,"description":"Optional line under the headline."},"endDate":{"type":"string","format":"date","description":"Last day, only when the dates are not a card choice."},"headline":{"type":"string","maxLength":255},"primaryText":{"type":"string","maxLength":2000},"startDate":{"type":"string","format":"date","description":"First day, only when the dates are not a card choice."}},"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"campaigns_launch_activate","description":"Switches on what a finished launch created: its ads, and the ad sets and campaign they sit in when those are paused. Call it when the person asks to switch on or activate the ads of a launch, with the launchId and accountId given in brackets. It reads Meta as it is now and shows the approval card with every budget that starts spending; nothing is switched on before approval.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. This call PREPARES a pending action. Follow its Adrails approval URL; it does not execute the change.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"accountId":{"type":"string","minLength":1,"maxLength":200},"launchId":{"type":"string","minLength":1,"maxLength":60}},"required":["accountId","launchId"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"campaigns_duplicate_to_draft","description":"Prepares approval to duplicate a campaign on Meta or Google Ads in PAUSED, with everything it has: targeting, bidding, budget, extensions, keywords, ads and their pictures (reused, not sent again). Requires fresh source evidence under the workspace policy; never waive the freshness check. The tool returns the policy error if a sync is needed. Exact duplication needs only accountId, entityId and reason; no new name, budget or schedule is required, because source settings are copied unchanged. Omit variants unless explicitly requested. Optional variants replace one source ad with 3 to 5 copy variants, on Meta only: on Google, duplicate exactly and write new ads with google_ads_build. Source geography is preserved, not changed. Approval starts the durable build, but never activates it.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. This call PREPARES a pending action. Follow its Adrails approval URL; it does not execute the change.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"entityId":{"type":"string","minLength":1},"reason":{"type":"string","minLength":1,"maxLength":300},"sourceAdId":{"type":"string","minLength":1},"variants":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","maxLength":500},"headline":{"type":"string","minLength":1,"maxLength":255},"name":{"type":"string","minLength":1,"maxLength":255},"primaryText":{"type":"string","minLength":1,"maxLength":2000}},"required":["headline","name","primaryText"],"additionalProperties":false},"minItems":3,"maxItems":5}},"required":["accountId","entityId","reason"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"campaigns_split_test","description":"Proposes a split test, when the evidence gives a reason to settle a question by testing: two hooks or texts to compare, a creative that weakens and a replacement to try against it, an audience, placement or bidding question. It starts from one ad set or ad that already runs, read earlier with its exact id: that is variant A, left as it is. On a Meta ad set it is Meta's own split test (Meta divides the audience and each ad set spends its own budget) on audience, placements or bidding. On a Meta ad, the ads run side by side in their ad set and Adrails measures them, on ad_text or creative: creative swaps the image or video and keeps the copy, button, link, Page and Instagram account; use only media a tool returned for this account, by hash or videoId, never an invented one. On a Google responsive search ad, search_ad_text. On a Google responsive display ad or Demand Gen image ad, google_creative: the new ad keeps its headlines, descriptions, business name and final URL with other pictures, and logos when asked; use only asset ids google_ads_library or campaigns_structure returned for this account, never an invented one. One variable per test, one to three new variants each changing only it. Pass durationDays, metric and shares only when the person chose them; otherwise the card shows the defaults, marked as such. It shows the exact approval card; approval creates the test with its new variants PAUSED, nothing spends, and launching it is a separate approval on the test's page. It refuses, in words, what cannot be tested, stale evidence under the workspace policy and media Meta would refuse.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. This call PREPARES a pending action. Follow its Adrails approval URL; it does not execute the change.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"accountId":{"type":"string","minLength":1,"maxLength":200},"durationDays":{"type":"integer","minimum":4,"maximum":30,"description":"Only the person's choice. Left out, the card shows the form's default, 14 days, marked as the default."},"entityId":{"type":"string","minLength":1,"maxLength":64,"description":"The ad set or ad the test starts from, its id exactly as a read returned it. It is variant A and keeps running as it is."},"metric":{"type":"string","enum":["cpa","conversion_rate"],"description":"What the winner is named on. Only the person's choice; left out, the card shows CPA, marked as the default."},"name":{"type":"string","minLength":1,"maxLength":120,"description":"The test's name, in the workspace convention."},"reason":{"type":"string","minLength":1,"maxLength":300,"description":"The observed reason for this test, with its source and period."},"shares":{"type":"array","items":{"type":"integer","minimum":10,"maximum":90},"description":"A Meta split test of ad sets only, and only the person's split: one percentage per variant, A first, adding up to 100. Left out, the split is even."},"variable":{"type":"string","enum":["audience","placements","bidding","ad_text","search_ad_text","creative","google_creative"]},"variants":{"type":"array","items":{"type":"object","properties":{"change":{"anyOf":[{"type":"object","properties":{"ageMax":{"type":"integer","minimum":18,"maximum":65,"description":"65 means 65 and over."},"ageMin":{"type":"integer","minimum":18,"maximum":65},"countries":{"type":"string","maxLength":500,"description":"Country names separated by commas, as the ad set's own are written."},"gender":{"type":"string","enum":["All genders","Men","Women"]},"variable":{"type":"string","const":"audience"}},"required":["ageMax","ageMin","countries","gender","variable"],"additionalProperties":false},{"type":"object","properties":{"placements":{"type":"array","items":{"type":"string","enum":["Facebook feed","Facebook Reels","Facebook Stories","Facebook in-stream video","Facebook Marketplace","Facebook search results","Facebook right column","Instagram feed","Instagram Reels","Instagram Stories","Instagram Explore","Instagram profile feed","Messenger inbox","Messenger Stories","Audience Network","Audience Network rewarded video"]},"maxItems":20,"description":"Empty means Advantage+ placements."},"variable":{"type":"string","const":"placements"}},"required":["placements","variable"],"additionalProperties":false},{"type":"object","properties":{"bidTarget":{"type":"string","maxLength":20,"description":"The amount in the account's currency, or the ROAS for Minimum ROAS; empty for Highest volume."},"strategy":{"type":"string","enum":["Highest volume","Cost per result goal","Bid cap","Minimum ROAS"]},"variable":{"type":"string","const":"bidding"}},"required":["bidTarget","strategy","variable"],"additionalProperties":false},{"type":"object","properties":{"description":{"type":"string","maxLength":255},"headline":{"type":"string","maxLength":255},"primaryText":{"type":"string","maxLength":2000},"variable":{"type":"string","const":"ad_text"}},"required":["description","headline","primaryText","variable"],"additionalProperties":false},{"type":"object","properties":{"descriptions":{"type":"array","items":{"type":"string","maxLength":90},"minItems":2,"maxItems":4},"headlines":{"type":"array","items":{"type":"string","maxLength":30},"minItems":3,"maxItems":15},"variable":{"type":"string","const":"search_ad_text"}},"required":["descriptions","headlines","variable"],"additionalProperties":false},{"type":"object","properties":{"media":{"type":"array","items":{"type":"object","properties":{"hash":{"type":"string","minLength":6,"maxLength":64,"description":"An image's hash in the ad account's library, exactly as a tool returned it."},"ratio":{"type":"string","enum":["1:1","9:16","4:5","1.91:1"],"description":"The placements this asset runs in. 1:1 runs everywhere no other entry applies and is required; 9:16 Stories and Reels; 4:5 Feeds; 1.91:1 Right column and Audience Network."},"videoId":{"type":"string","pattern":"^\\d{1,32}$","description":"A video's id in the ad account's library, exactly as a tool returned it."}},"required":["ratio"],"additionalProperties":false},"minItems":1,"maxItems":4},"variable":{"type":"string","const":"creative"}},"required":["media","variable"],"additionalProperties":false},{"type":"object","properties":{"images":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","pattern":"^\\d{1,20}$","description":"A picture's asset id in the Google Ads account, exactly as google_ads_library or campaigns_structure returned it."},"kind":{"type":"string","enum":["image","logo"],"description":"image: a marketing picture, its place decided by its shape (landscape 1.91:1, square 1:1, portrait 4:5 on Demand Gen). logo: square 1:1, or wide 4:1 on a responsive display ad."}},"required":["assetId","kind"],"additionalProperties":false},"minItems":1,"maxItems":25,"description":"Every picture and logo of the new ad: a responsive display ad needs a landscape and a square picture, 15 in all, and up to 5 logos; a Demand Gen image ad a landscape or square picture, 20 in all, and 1 to 5 square logos. Keep the original's logos to change only the pictures."},"variable":{"type":"string","const":"google_creative"}},"required":["images","variable"],"additionalProperties":false}]},"name":{"type":"string","minLength":1,"maxLength":120}},"required":["change","name"],"additionalProperties":false},"minItems":1,"maxItems":3,"description":"The new variants, B and after. Each changes only the tested variable, and is complete: a new ad's full text, a new ad set's full audience."}},"required":["accountId","entityId","name","reason","variable","variants"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"findings_apply_to_draft","description":"Applies existing deterministic finding patches for UTM, enhancements, placements or tracking. On Meta they go to new PAUSED campaign copies; approval starts durable Meta builds and activation is separate. On Google Ads they are edits to the live campaigns, validated by Google and applied all or none after approval. Only database findings with a proposed fix are accepted, all from one account.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. This call PREPARES a pending action. Follow its Adrails approval URL; it does not execute the change.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"findingIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":20},"reason":{"type":"string","minLength":1,"maxLength":300}},"required":["findingIds","reason"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"campaigns_publish_draft","description":"Legacy recovery action for an already validated local proposal. Creates every missing Meta entity in PAUSED and records every returned Meta ID. New agent-created campaigns start this process automatically after their main approval.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. This call PREPARES a pending action. Follow its Adrails approval URL; it does not execute the change.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"draftId":{"type":"string","minLength":1}},"required":["draftId"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"actions_undo","description":"Undoes a previously applied reversible action only when Meta still matches the state Adrails wrote. Refuses to overwrite a later direct change.\nMCP: use the input object for tool arguments. UI reports and questions are returned as structured content. This call PREPARES a pending action. Follow its Adrails approval URL; it does not execute the change.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"actionId":{"type":"string","minLength":1}},"required":["actionId"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"accounts_list","description":"List connected ad accounts, timezone, currency, freshness and enabled state.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"after":{"type":"string","minLength":1,"maxLength":200,"description":"Use nextCursor from the previous page."}},"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"accounts_update","description":"Enable or disable an account in this workspace. Disabling stops its polling and hides its data; it does not pause ads.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"accountId":{"type":"string","minLength":1,"maxLength":200},"enabled":{"type":"boolean"}},"required":["accountId","enabled"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"integrations_catalog","description":"List implemented providers, available data and connection requirements.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{},"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"integrations_detail","description":"Read one connection's imported data coverage, sync streams and trend.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"connectionId":{"type":"string","minLength":1,"maxLength":200}},"required":["connectionId"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"integrations_connect","description":"Create a secure Adrails setup link for a provider. The user completes OAuth or enters credentials in Adrails, never in tool arguments.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"provider":{"type":"string","minLength":1,"maxLength":200}},"required":["provider"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"integrations_update","description":"Reconnect an existing integration to refresh its credentials or provider access through a secure Adrails setup link.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"connectionId":{"type":"string","minLength":1,"maxLength":200}},"required":["connectionId"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"integrations_sync","description":"Queue synchronization for one existing connection. A queued request does not mean its data is already fresh.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"provider":{"type":"string","minLength":1,"maxLength":200},"connectionId":{"type":"string","minLength":1,"maxLength":200}},"required":["provider","connectionId"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"integrations_disconnect","description":"Revoke one provider connection and stop importing its data. Reconnection requires the user's provider authorization.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"provider":{"type":"string","minLength":1,"maxLength":200},"connectionId":{"type":"string","minLength":1,"maxLength":200}},"required":["provider","connectionId"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"targeting_options","description":"Look up actual platform audience, interest, language or location IDs. Returned candidates are not confirmed launch choices.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"platform":{"type":"string","enum":["meta","google_ads"]},"accountId":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["custom-audience","interest","language","location"]},"query":{"type":"string","maxLength":100}},"required":["platform","accountId","kind"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"audience_estimate","description":"Estimate Meta reach for proposed targeting using the existing account audience service. An estimate is not measured performance.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"accountId":{"type":"string","minLength":1,"maxLength":200},"ageMinimum":{"type":"integer","minimum":13,"maximum":65},"ageMaximum":{"type":"integer","minimum":13,"maximum":65},"countries":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":50},"genders":{"type":"array","items":{"type":"number","enum":[1,2]},"maxItems":2},"interests":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":100}},"required":["id","name"],"additionalProperties":false},"maxItems":50},"locations":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":100}},"required":["key","name"],"additionalProperties":false},"maxItems":50},"languages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":100}},"required":["id","name"],"additionalProperties":false},"maxItems":50},"customAudiences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":100}},"required":["id","name"],"additionalProperties":false},"maxItems":50}},"required":["accountId","ageMinimum","ageMaximum"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"campaign_drafts","description":"List, save, validate or delete workspace campaign drafts. Save takes the existing Adrails campaign source schema. Publish with campaigns_publish_draft and individual approval.","inputSchema":{"type":"object","properties":{"input":{"anyOf":[{"type":"object","properties":{"operation":{"type":"string","const":"list"},"adAccountId":{"type":"string","minLength":1,"maxLength":200},"campaignClientId":{"type":"string","minLength":1,"maxLength":200}},"required":["operation"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","const":"save"},"draftId":{"type":"string","minLength":1,"maxLength":200},"adAccountId":{"type":"string","minLength":1,"maxLength":200},"source":{"type":"object","additionalProperties":{}}},"required":["operation","adAccountId","source"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","const":"validate"},"draftId":{"type":"string","minLength":1,"maxLength":200}},"required":["operation","draftId"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","const":"delete"},"campaignClientIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100}},"required":["operation","campaignClientIds"],"additionalProperties":false}]},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"campaign_templates","description":"List, create, update or delete reusable campaign templates using the existing template payload schema.","inputSchema":{"type":"object","properties":{"input":{"anyOf":[{"type":"object","properties":{"operation":{"type":"string","const":"list"},"channel":{"type":"string","enum":["Meta Ads","Google Ads"]},"view":{"type":"string","minLength":1,"maxLength":100}},"required":["operation"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","const":"create"},"name":{"type":"string","minLength":1,"maxLength":100},"channel":{"type":"string","enum":["Meta Ads","Google Ads"]},"payload":{"type":"object","additionalProperties":{}},"view":{"type":"string","enum":["campaigns","adsets","ads"]}},"required":["operation","name","channel","payload","view"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","const":"update"},"name":{"type":"string","minLength":1,"maxLength":100},"channel":{"type":"string","enum":["Meta Ads","Google Ads"]},"payload":{"type":"object","additionalProperties":{}},"templateId":{"type":"string","minLength":1,"maxLength":200}},"required":["operation","name","channel","payload","templateId"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","const":"delete"},"templateId":{"type":"string","minLength":1,"maxLength":200}},"required":["operation","templateId"],"additionalProperties":false}]},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"campaign_media","description":"List platform media or upload a small base64 image up to 500 KB. Use the Adrails Campaigns uploader for larger images/videos. Upload does not launch ads.","inputSchema":{"type":"object","properties":{"input":{"anyOf":[{"type":"object","properties":{"operation":{"type":"string","const":"list"},"platform":{"type":"string","enum":["meta","google_ads"]},"accountId":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["image","video"]}},"required":["operation","platform","accountId"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","const":"upload"},"platform":{"type":"string","enum":["meta","google_ads"]},"accountId":{"type":"string","minLength":1,"maxLength":200},"fileName":{"type":"string","minLength":1,"maxLength":100},"mimeType":{"type":"string","enum":["image/png","image/jpeg","image/gif"]},"base64":{"type":"string","minLength":4,"maxLength":700000,"pattern":"^[A-Za-z0-9+/]+={0,2}$"}},"required":["operation","platform","accountId","fileName","mimeType","base64"],"additionalProperties":false}]},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"workflows_list","description":"List workspace automation definitions, schedules and available templates.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"after":{"type":"string","minLength":1,"maxLength":200,"description":"Use nextCursor from the previous page."}},"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"workflows_manage","description":"Create, duplicate, save, enable, disable or delete an automation. Enabled workflows may send messages or perform the configured account actions under product guardrails.","inputSchema":{"type":"object","properties":{"input":{"anyOf":[{"type":"object","properties":{"operation":{"type":"string","const":"create"},"templateId":{"type":"string","minLength":1,"maxLength":200},"timeZone":{"type":"string","minLength":1,"maxLength":200},"adPlatform":{"type":"string","enum":["meta","google_ads"]}},"required":["operation","templateId","timeZone"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","const":"duplicate"},"automationId":{"type":"string","minLength":1,"maxLength":200}},"required":["operation","automationId"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","const":"save"},"automationId":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":100},"definition":{"type":"object","additionalProperties":{}}},"required":["operation","automationId","name","definition"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","const":"set_enabled"},"automationId":{"type":"string","minLength":1,"maxLength":200},"enabled":{"type":"boolean"}},"required":["operation","automationId","enabled"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","const":"delete"},"automationId":{"type":"string","minLength":1,"maxLength":200}},"required":["operation","automationId"],"additionalProperties":false}]},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"workflows_preview","description":"Preview an automation or integration source without delivering messages or applying its proposed changes.","inputSchema":{"type":"object","properties":{"input":{"anyOf":[{"type":"object","properties":{"operation":{"type":"string","const":"workflow"},"automationId":{"type":"string","minLength":1,"maxLength":200},"definition":{"type":"object","additionalProperties":{}}},"required":["operation","automationId","definition"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","const":"source"},"node":{"type":"object","additionalProperties":{}},"timeZone":{"type":"string","minLength":1,"maxLength":200}},"required":["operation","node","timeZone"],"additionalProperties":false}]},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"workflows_run","description":"Run a saved automation now. It may deliver messages and execute configured actions; all current workspace and plan checks apply.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"automationId":{"type":"string","minLength":1,"maxLength":200}},"required":["automationId"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"channels_manage","description":"List or manage automation delivery channels. Creating, testing or changing a webhook sends a connection message. Email channels save recipients without sending a test email. Targets are private and must never be repeated in answers.","inputSchema":{"type":"object","properties":{"input":{"anyOf":[{"type":"object","properties":{"operation":{"type":"string","const":"list"},"after":{"type":"string","minLength":1,"maxLength":200}},"required":["operation"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","const":"create"},"name":{"type":"string","minLength":1,"maxLength":100},"kind":{"type":"string","enum":["slack","discord","email"]},"target":{"type":"string","minLength":1,"maxLength":4000,"description":"Webhook URL, or comma-separated email recipients for an email channel."},"webhookUrl":{"type":"string","format":"uri","maxLength":2000,"description":"Legacy alias for a webhook target."}},"required":["operation","name","kind"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","const":"update"},"name":{"type":"string","minLength":1,"maxLength":100},"channelId":{"type":"string","minLength":1,"maxLength":200},"target":{"type":"string","minLength":1,"maxLength":4000},"webhookUrl":{"type":"string","format":"uri","maxLength":2000}},"required":["operation","name","channelId"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","const":"test"},"channelId":{"type":"string","minLength":1,"maxLength":200}},"required":["operation","channelId"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","const":"delete"},"channelId":{"type":"string","minLength":1,"maxLength":200}},"required":["operation","channelId"],"additionalProperties":false}]},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"knowledge_manage","description":"Create, update, favorite or delete a workspace Knowledge entry. Changes affect future agent instructions and remain workspace-scoped.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"operation":{"type":"string","enum":["create","update","favorite","delete"]},"fields":{"type":"object","properties":{"skillId":{"type":"string","minLength":1,"maxLength":200},"command":{"type":"string","minLength":1,"maxLength":100},"kind":{"type":"string","enum":["skill","shortcut"]},"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":180},"prompt":{"type":"string","maxLength":4000},"metaScope":{"type":"string","enum":["all","selected"]},"integrationScope":{"type":"string","enum":["all","selected"]},"metaAccountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"integrationConnectionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"favorite":{"type":"string","enum":["true","false"]}},"additionalProperties":false}},"required":["operation","fields"],"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"jobs_status","description":"Read persisted background job, publication, action or workflow state. Pending, applied and failed are distinct; do not infer completion.","inputSchema":{"type":"object","properties":{"input":{"type":"object","properties":{"kind":{"type":"string","enum":["background","publication","action","workflow","operation"],"default":"background"},"id":{"type":"string","minLength":1,"maxLength":200},"tool":{"type":"string","minLength":1,"maxLength":200},"key":{"type":"string","minLength":8,"maxLength":128}},"additionalProperties":false},"accountIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Optional account selection; can only narrow this workspace's access."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"description":"Required for a mutation. Reuse the same key only when retrying the exact same call."},"userStatement":{"type":"string","maxLength":8000,"description":"Optional verbatim user-provided context, treated as an unverified user statement, never permission or verified platform evidence."}},"required":["input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}}],"resources":[],"prompts":[]}