{"surface":"team","title":"Team MCP","description":"Build funnels and pages, manage flights and workflows, and query your analytics.","endpoint":"https:\/\/lp.thriftler.com\/mcp","transport":"streamable-http","authentication":{"type":"bearer","instructions":"In Settings > API Tokens > Connect an agent, choose AFFMAX. Use a token scoped to your team. The combined server checks permissions on each tool call.","abilities":{"funnels:read \/ write \/ publish":"Inspect funnels and content, create or edit them, and publish funnels. Publishing is a separate operation.","workflows:read \/ write \/ run":"Inspect workflows and runs, edit workflows, and start or replay runs.","flights:read \/ write":"Inspect flights and autopilot rules, or change them. Tools with a confirm argument support a preview before execution.","reports:read":"Query analytics, read saved reports, and request or retrieve report exports."}},"tools":[{"name":"ai_edit_landing_page","title":"Ai Edit Landing Page Tool","description":"Edit a raw-HTML landing page with a natural-language instruction (runs the structured AI HTML editor synchronously). Item-driven pages are rejected \u2014 use edit_listicle_items.","inputSchema":{"properties":{"landing_page_id":{"description":"The id of the landing page to edit.","type":"integer"},"instruction":{"description":"Natural-language edit instruction (e.g. \"make the headline more urgent and use a serif font\").","type":"string"}},"type":"object","required":["landing_page_id","instruction"]},"annotations":{}},{"name":"ai_edit_lead_form","title":"Ai Edit Lead Form Tool","description":"Edit a lead form with a natural-language instruction (runs FormAiEditor synchronously \u2014 persists field\/consent\/outcome changes and cascades outcome renames\/deletes onto funnel nodes).","inputSchema":{"properties":{"form_id":{"description":"The id of the lead form to edit.","type":"integer"},"instruction":{"description":"Natural-language edit instruction (e.g. \"add a phone field and a high-intent outcome for buyers in CA\").","type":"string"}},"type":"object","required":["form_id","instruction"]},"annotations":{}},{"name":"ai_edit_path_flow","title":"Ai Edit Path Flow Tool","description":"Edit a path-flow quiz with a natural-language instruction (runs PathFlowAiEditor synchronously \u2014 persists step\/option\/goto\/rule\/copy changes + rebuilds). Outcome rename\/delete use edit_path_flow_outcomes.","inputSchema":{"properties":{"flow_id":{"description":"The id of the path flow to edit.","type":"integer"},"instruction":{"description":"Natural-language edit instruction (e.g. \"add a step asking about timeline and route impatient users to the express outcome\").","type":"string"}},"type":"object","required":["flow_id","instruction"]},"annotations":{}},{"name":"apply_funnel_operations","title":"Apply Funnel Operations Tool","description":"Apply a batch of named graph operations to a funnel atomically (all-or-nothing). Each op carries an `op` plus its keys (ref\/from\/to\/weight\/slot\/destination_id\/...). Returns the updated graph + per-op results, or the failing op index on error.","inputSchema":{"properties":{"funnel_id":{"description":"The id of the funnel to edit.","type":"integer"},"operations":{"description":"Ordered list of graph operations. Each item is an object with an `op` key (e.g. add_traffic_source, add_offer_node, set_flow_edge, set_weight, remove_node) plus that op's parameters.","items":{"type":"object"},"type":"array"}},"type":"object","required":["funnel_id","operations"]},"annotations":{}},{"name":"apply_workflow_operations","title":"Apply Workflow Operations Tool","description":"Apply an atomic batch of graph operations to a workflow (all-or-nothing). This is the ONLY way to change a workflow's structure.\n\nEach operation is an object with an `op` key. Node refs (`ref`\/`from`\/`to`) are node uuids from get_workflow; a node added earlier in the SAME batch is referenced by the `as` alias you tag its add_node op with.\n\nOperations:\n- add_node {type, config?, x?, y?, as?} \u2014 add a node of the given registry `type` (see list_workflow_node_types).\n- remove_node {ref} \u2014 delete a node and every edge touching it.\n- set_node_config {ref, config} \u2014 merge `config` into a node's config.\n- set_edge {from, to, handle?} \u2014 wire an edge from the source node's `handle` output port (default `out`).\n- remove_edge {from, to, handle?} \u2014 delete the edge between two nodes (optionally only the one leaving `handle`).\n- move_node {ref, x, y} \u2014 reposition a node on the canvas.\n- set_trigger {trigger_type, event?, config?} \u2014 set what starts the workflow: `trigger_type` is manual|scheduled|event|webhook; an event trigger REQUIRES `event` (a trigger-event key from list_workflow_node_types); a scheduled trigger stores its cron in config (e.g. config: {\"cron\": \"0 * * * *\"}).\n- set_input_form {fields, steps?, result_template?, success_message?, docs?} \u2014 define the \"form face\" a human fills to seed a run. Each field is {key, label, type (text|textarea|number|select|boolean|email|url|file), required?, options? (select), default?, placeholder?, help?, sensitive?, visible_when? {field, operator: equals|in, value}}. A `visible_when` field shows only when another field matches (chains cascade; hidden values dropped + required waived server-side). `steps` is [{key, title, field_keys}] grouping fields into ordered forward-only screens. Every field key becomes a run-context value templated as {{ key }} in downstream nodes. `result_template` is the completion message shown to the submitter. Send fields: [] to clear. `docs` is publisher-facing markdown context (\"about this form\") surfaced on the portal form page, the Forms API, and its generated OpenAPI; omitted = preserved, empty string = cleared.\n\nReturns the updated graph + per-op results, or the failing op index on error (batch rolled back).","inputSchema":{"properties":{"workflow_id":{"description":"The id of the workflow to edit.","type":"integer"},"operations":{"description":"Ordered op objects (add_node{type,config?,x?,y?,as?}, remove_node{ref}, set_node_config{ref,config}, set_edge{from,to,handle?}, remove_edge{from,to,handle?}, move_node{ref,x,y}, set_trigger{trigger_type,event?,config?}, set_input_form{fields,steps?,result_template?,success_message?,docs?}); refs are node uuids from get_workflow or an `as` alias of a node added earlier in THIS batch; applied atomically.","items":{"type":"object"},"type":"array"}},"type":"object","required":["workflow_id","operations"]},"annotations":{}},{"name":"build_funnel","title":"Build Funnel Tool","description":"Execute an approved plan into a draft funnel (status -> building). Only runs while awaiting_approval. Poll get_funnel_build until built, then publish_funnel.","inputSchema":{"properties":{"build_id":{"description":"The id of the build (awaiting_approval) to execute.","type":"integer"}},"type":"object","required":["build_id"]},"annotations":{}},{"name":"create_funnel_plan","title":"Create Funnel Plan Tool","description":"Start an AI funnel build: create a build (planning) and dispatch the planner. Poll get_funnel_build until status is awaiting_approval, then build_funnel.","inputSchema":{"properties":{"instruction":{"description":"Natural-language description of the funnel to build.","type":"string"},"inputs":{"description":"Optional structured hints folded into the planner context: offer_ids (array), domain, vertical.","type":"object"}},"type":"object","required":["instruction"]},"annotations":{}},{"name":"create_landing_page","title":"Create Landing Page Tool","description":"Create a landing page. mode generate (generate:true, offer_id + page_type) returns a page id immediately and generates asynchronously \u2014 poll get_landing_page until generation_status is complete; mode manual (page_type + title + html_content) stores exact content. Item-driven page_types (listicle\/offer_wall) are generation-only.","inputSchema":{"properties":{"generate":{"description":"true \u2192 AI-generate from an offer; false\/omitted \u2192 manual exact content. Item-driven page_types are always generated.","type":"boolean"},"offer_id":{"description":"Offer to generate from (required to generate or for item-driven pages); optional routing hint when manual.","type":"integer"},"page_type":{"description":"One of: prelander, advertorial, custom (raw-HTML) or listicle, offer_wall (item-driven, generation-only).","type":"string"},"custom_instructions":{"description":"Extra generation guidance (generate mode).","type":"string"},"template_slug":{"description":"Force a specific template slug (generate mode).","type":"string"},"variant_label":{"description":"Variant label for the generated page (defaults to v1).","type":"string"},"additional_offer_ids":{"description":"Item-driven pages: the extra offers (slot 2..N) to curate alongside the primary offer_id.","items":{"type":"integer"},"type":"array"},"name":{"description":"Optional internal display name. Defaults to a placeholder (\"{offer} {Page Type}\" in generate mode, the title in manual mode). An explicit name here is never overwritten by AI-headline upgrade after generation.","type":"string"},"title":{"description":"Manual mode: page title (required when manual).","type":"string"},"html_content":{"description":"Manual mode: the exact page HTML (required when manual).","type":"string"},"css_custom":{"description":"Manual mode: optional custom CSS.","type":"string"},"design":{"description":"Manual mode: optional design tokens (fontPairing, accentColor).","type":"object"},"domain_id":{"description":"Manual mode: optional domain id.","type":"integer"}},"type":"object","required":["page_type"]},"annotations":{}},{"name":"create_lead_buyer","title":"Create Lead Buyer Tool","description":"Create a lead buyer (host\/post destination for captured leads): name (required), is_active, endpoint_url (fallback posting URL used only when a routed endpoint does not define its own post_url), auth_type (none\/bearer\/api_key\/basic, default none) + auth_credentials, posting_format (json\/form_encoded\/xml, default json), field_mapping (buyer_field => template, inherited\/overridden per endpoint), response_parsing, post_timeout_ms (default 5000), daily_cap, priority (default 10, lower is higher priority). Wire an actual posting endpoint with create_lead_buyer_endpoint. auth_credentials is never returned in any response.","inputSchema":{"properties":{"name":{"description":"Buyer name.","type":"string"},"is_active":{"description":"Whether the buyer currently receives leads. Defaults true.","type":"boolean"},"endpoint_url":{"description":"Fallback posting URL used only when a routed endpoint does not define its own post_url.","type":"string"},"auth_type":{"description":"none, bearer, api_key, or basic. Defaults none.","type":"string"},"auth_credentials":{"description":"Credentials matching auth_type: {token} for bearer, {header, key} for api_key, {username, password} for basic. Stored encrypted; never returned.","type":"object"},"posting_format":{"description":"json, form_encoded, or xml. Defaults json.","type":"string"},"field_mapping":{"description":"Default field mapping: buyer_field => \"{{ template }}\" or a literal string. Endpoints may override.","type":"object"},"response_parsing":{"description":"success_indicators[], duplicate_indicators[], lead_id_path, price_path, redirect_path, rejection_reason_path.","type":"object"},"post_timeout_ms":{"description":"Posting timeout in milliseconds. Defaults 5000.","type":"integer"},"daily_cap":{"description":"Daily lead cap. Omit for unlimited.","type":"integer"},"priority":{"description":"Lower is higher priority. Defaults 10.","type":"integer"}},"type":"object","required":["name"]},"annotations":{}},{"name":"create_lead_buyer_endpoint","title":"Create Lead Buyer Endpoint Tool","description":"Create a lead-buyer posting endpoint: lead_buyer_id (required), name (required \u2014 becomes the Destination name a funnel wires a lead edge to), post_url (required), post_method (get\/post\/put, default post), post_format (json\/form\/xml, default form), field_mapping (buyer_field => template; defaults to the standard TrustedForm\/Jornaya compliance mapping), response_parser_config, strip_referrer, require_trustedform, cap_config. Creates the Destination + LeadBuyerEndpoint atomically (all-or-nothing). Returns destination_id (wire this into a funnel) and endpoint id.","inputSchema":{"properties":{"lead_buyer_id":{"description":"The id of the lead buyer this endpoint posts to.","type":"integer"},"name":{"description":"Destination name (shown in list_destinations and the funnel builder).","type":"string"},"post_url":{"description":"The URL leads are posted to.","type":"string"},"post_method":{"description":"get, post, or put. Defaults post.","type":"string"},"post_format":{"description":"json, form, or xml. Defaults form.","type":"string"},"field_mapping":{"description":"buyer_field => \"{{ template }}\" or a literal string. Defaults to the standard TrustedForm\/Jornaya compliance mapping.","type":"object"},"response_parser_config":{"description":"success_indicators[], duplicate_indicators[], lead_id_path, price_path, redirect_path, rejection_reason_path.","type":"object"},"strip_referrer":{"description":"When true, the originating referrer header is not forwarded to the buyer. Defaults false.","type":"boolean"},"require_trustedform":{"description":"When true, a lead without a TrustedForm certificate is rejected instead of posted. Defaults false.","type":"boolean"},"cap_config":{"description":"daily\/weekly\/monthly caps + on_exhaustion behavior.","type":"object"}},"type":"object","required":["lead_buyer_id","name","post_url"]},"annotations":{}},{"name":"create_lead_form","title":"Create Lead Form Tool","description":"Create a lead form. mode generate (generate:true, vertical) runs AI synchronously; mode manual (name + optional fields\/consent\/thank_you_config) stores exact content. Both seed the default \"submitted\" outcome.","inputSchema":{"properties":{"generate":{"description":"true \u2192 AI-generate for a vertical; false\/omitted \u2192 manual exact content.","type":"boolean"},"vertical":{"description":"The vertical to generate for (required to generate).","type":"string"},"instructions":{"description":"Extra generation guidance (generate mode).","type":"string"},"name":{"description":"Manual mode: form name (required when manual).","type":"string"},"fields":{"description":"Manual mode: form field definitions.","items":{"type":"object"},"type":"array"},"consent_language":{"description":"Manual mode: consent language.","type":"string"},"thank_you_config":{"description":"Manual mode: thank-you screen config.","type":"object"}},"type":"object"},"annotations":{}},{"name":"create_path_flow","title":"Create Path Flow Tool","description":"Create a path-flow quiz. mode generate (generate:true, offer_id) runs AI synchronously; mode manual (name + optional steps\/outcomes) stores exact content. Both provision the served quiz page + rebuild.","inputSchema":{"properties":{"generate":{"description":"true \u2192 AI-generate from an offer; false\/omitted \u2192 manual exact content.","type":"boolean"},"offer_id":{"description":"The offer to generate from (required to generate).","type":"integer"},"instruction":{"description":"Extra generation guidance (generate mode).","type":"string"},"name":{"description":"Manual mode: flow name (required when manual).","type":"string"},"vertical":{"description":"Manual mode: optional vertical.","type":"string"},"steps":{"description":"Manual mode: quiz steps \u2014 each {key?, question, help_text?, answer_type? (single_choice|zip_input), options:[{value,label,icon?,goto_step?}], is_required?}.","items":{"type":"object"},"type":"array"},"outcomes":{"description":"Manual mode: routing outcomes \u2014 each {key, label?, rules:[{field,operator,value}], is_fallback?}.","items":{"type":"object"},"type":"array"}},"type":"object"},"annotations":{}},{"name":"create_workflow","title":"Create Workflow Tool","description":"Create an empty DRAFT workflow (manual trigger unless trigger_type\/event say otherwise). Returns the new workflow id; wire nodes\/edges with apply_workflow_operations, then activate with set_workflow_status.","inputSchema":{"properties":{"name":{"description":"The workflow name.","type":"string"},"description":{"description":"Optional description of what the workflow automates.","type":"string"},"trigger_type":{"description":"Optional trigger type: manual (default), scheduled, event, or webhook.","type":"string"},"event":{"description":"REQUIRED when trigger_type is event: a trigger-event key from list_workflow_node_types (e.g. postback.received).","type":"string"},"trigger_config":{"description":"Optional trigger config (e.g. {\"cron\": \"0 * * * *\"} for a scheduled trigger).","type":"object"}},"type":"object","required":["name"]},"annotations":{}},{"name":"decide_approval","title":"Decide Approval Tool","description":"Approve or reject a workflow run that is parked (Waiting) on an approval step. Pass the approval step id (from get_workflow_run \u2014 a step with node_type \"approval\" and status \"waiting\"), approved=true|false, and an optional note. The run resumes asynchronously down the approved\/rejected branch \u2014 poll get_workflow_run for progress.","inputSchema":{"properties":{"step_id":{"description":"The id of the Waiting approval step to decide (from get_workflow_run).","type":"integer"},"approved":{"description":"true to approve (route the \"approved\" handle), false to reject (\"rejected\").","type":"boolean"},"note":{"description":"Optional reviewer note recorded on the decision and exposed to downstream nodes as {{ approval.note }}.","type":"string"}},"type":"object","required":["step_id","approved"]},"annotations":{}},{"name":"edit_lead_form_outcomes","title":"Edit Lead Form Outcomes Tool","description":"Apply discrete lead-form outcome ops (add_outcome\/edit_outcome_rules\/remove_outcome\/set_outcome_post_submit) in one transaction; cascades rename\/removal onto funnel lead_form nodes. Invalid rules error.","inputSchema":{"properties":{"form_id":{"description":"The id of the lead form to edit.","type":"integer"},"operations":{"description":"Ordered outcome ops. Each has an `op` (add_outcome\/edit_outcome_rules\/remove_outcome\/set_outcome_post_submit) + `key`, plus that op's params (label, rules[{field,operator,value}], mode, confirm_heading\/message\/seconds).","items":{"type":"object"},"type":"array"}},"type":"object","required":["form_id","operations"]},"annotations":{}},{"name":"edit_lead_form_steps","title":"Edit Lead Form Steps Tool","description":"Apply discrete lead-form step ops (add_step\/edit_step\/remove_step\/reorder_steps\/move_field\/set_branch_rules) in one transaction; normalizes the step document (forward-only equals\/in branch rules) and re-bakes the bound page.","inputSchema":{"properties":{"form_id":{"description":"The id of the lead form to edit.","type":"integer"},"operations":{"description":"Ordered step ops. Each has an `op` (add_step\/edit_step\/remove_step\/reorder_steps\/move_field\/set_branch_rules) plus its keys: key, title, subtitle, position (add\/edit\/remove_step); reassign_to (remove_step); ordered_keys (reorder_steps); field_name + step_key (move_field); step_key + rules[{field,operator(equals|in),value,goto}] (set_branch_rules), where goto is a later step key, \"__next__\", or \"__end__\".","items":{"type":"object"},"type":"array"}},"type":"object","required":["form_id","operations"]},"annotations":{}},{"name":"edit_listicle_items","title":"Edit Listicle Items Tool","description":"Edit an item-driven landing page (listicle\/offer_wall): pass `instruction` for an AI edit (copy, editorial structure, article meta, rating\/badge, variation swap, item images, design, custom CSS, or full layout redesign \u2014 everything except routing), OR `operations` (edit_item_copy\/reorder_items\/add_editorial_item\/add_offer_item\/remove_item\/edit_headline) for precise ops. Adding or removing an OFFER item is ops-mode only (add_offer_item\/remove_item) \u2014 not available via instruction. Returns the rebuilt items.","inputSchema":{"properties":{"landing_page_id":{"description":"The id of the item-driven landing page to edit.","type":"integer"},"instruction":{"description":"Natural-language edit (AI mode). Mutually exclusive with operations.","type":"string"},"operations":{"description":"Ordered discrete item ops (ops mode). Each has an `op` (edit_item_copy\/reorder_items\/add_editorial_item\/add_offer_item\/remove_item\/edit_headline) plus its keys: item_id, heading, body, cta, order, position, headline, subheadline, and for add_offer_item, `destination_id` (required, must resolve to a team destination) plus optional heading\/body\/cta (manual copy; omitted = synthesized fallback copy from the destination's offer) and position. Mutually exclusive with instruction.","items":{"type":"object"},"type":"array"}},"type":"object","required":["landing_page_id"]},"annotations":{}},{"name":"edit_path_flow_outcomes","title":"Edit Path Flow Outcomes Tool","description":"Apply discrete path-flow outcome ops (add_outcome\/edit_outcome_rules\/remove_outcome\/rename_outcome) in one transaction; cascades rename\/removal onto funnel path_flow nodes. Invalid rules error.","inputSchema":{"properties":{"flow_id":{"description":"The id of the path flow to edit.","type":"integer"},"operations":{"description":"Ordered outcome ops. Each has an `op` (add_outcome\/edit_outcome_rules\/remove_outcome\/rename_outcome) + `key`, plus its params (new_key, label, is_fallback, rules:[{field,operator,value}]).","items":{"type":"object"},"type":"array"}},"type":"object","required":["flow_id","operations"]},"annotations":{}},{"name":"edit_path_flow_steps","title":"Edit Path Flow Steps Tool","description":"Apply discrete path-flow step ops (add_step\/edit_step\/remove_step\/reorder_steps\/edit_option\/set_goto) in one transaction; re-bakes the quiz page. Guard violations (dangling goto, referenced step) error.","inputSchema":{"properties":{"flow_id":{"description":"The id of the path flow to edit.","type":"integer"},"operations":{"description":"Ordered step ops. Each has an `op` (add_step\/edit_step\/remove_step\/reorder_steps\/edit_option\/set_goto) plus its keys (step_key, new_step_key, after_step_key, question, help_text, answer_type, options, ordered_step_keys, option_value, option_label, option_icon, goto_step_key).","items":{"type":"object"},"type":"array"}},"type":"object","required":["flow_id","operations"]},"annotations":{}},{"name":"get_export","title":"Get Export Tool","description":"Check the status of an async export submitted with submit_export; returns a signed download URL once completed.","inputSchema":{"properties":{"id":{"description":"The export id returned by submit_export.","type":"integer"}},"type":"object","required":["id"]},"annotations":{}},{"name":"get_flight","title":"Get Flight Tool","description":"Get one flight in full detail: budget, ad URL, stats (spend\/impressions\/clicks\/conversions\/revenue\/ROI), and its compiled Autopilot rules.","inputSchema":{"properties":{"flight_id":{"description":"The flight to fetch.","type":"integer"}},"type":"object","required":["flight_id"]},"annotations":{}},{"name":"get_funnel","title":"Get Funnel Tool","description":"Get one funnel's routing graph (nodes keyed by uuid ref, plus edges) by id.","inputSchema":{"properties":{"funnel_id":{"description":"The id of the funnel to fetch.","type":"integer"}},"type":"object","required":["funnel_id"]},"annotations":{}},{"name":"get_funnel_build","title":"Get Funnel Build Tool","description":"Poll a funnel build's lifecycle state (status, plan, funnel_id, log) by id.","inputSchema":{"properties":{"build_id":{"description":"The id of the funnel build to poll.","type":"integer"}},"type":"object","required":["build_id"]},"annotations":{}},{"name":"get_landing_page","title":"Get Landing Page Tool","description":"Fetch one landing page by id (item-driven pages include their ordered items).","inputSchema":{"properties":{"landing_page_id":{"description":"The id of the landing page to fetch.","type":"integer"}},"type":"object","required":["landing_page_id"]},"annotations":{}},{"name":"get_lead_buyer","title":"Get Lead Buyer Tool","description":"Read one lead buyer (auth type, posting format, field mapping, response parsing, caps, priority) plus its posting endpoints (id, destination_id, post_url, post_method, post_format, field_mapping, response_parser_config, strip_referrer, require_trustedform, cap_config). Auth credentials are never returned, only a has_credentials flag.","inputSchema":{"properties":{"lead_buyer_id":{"description":"The id of the lead buyer to read.","type":"integer"}},"type":"object","required":["lead_buyer_id"]},"annotations":{}},{"name":"get_lead_form","title":"Get Lead Form Tool","description":"Fetch one lead form by id, with its ordered post-submit outcomes.","inputSchema":{"properties":{"form_id":{"description":"The id of the lead form to fetch.","type":"integer"}},"type":"object","required":["form_id"]},"annotations":{}},{"name":"get_path_flow","title":"Get Path Flow Tool","description":"Fetch one path-flow quiz by id, with its steps (and per-option goto skip-logic) + routing outcomes.","inputSchema":{"properties":{"flow_id":{"description":"The id of the path flow to fetch.","type":"integer"}},"type":"object","required":["flow_id"]},"annotations":{}},{"name":"get_workflow","title":"Get Workflow Tool","description":"Get one workflow's graph by id: nodes keyed by uuid ref (with config + output handles), edges (from\/to\/handle), the current trigger, the input_form (the form face a human fills to seed a run \u2014 pass its declared field keys as run_workflow inputs), and canvas positions. Every ref you pass to apply_workflow_operations comes from here.","inputSchema":{"properties":{"workflow_id":{"description":"The id of the workflow to fetch.","type":"integer"}},"type":"object","required":["workflow_id"]},"annotations":{}},{"name":"get_workflow_run","title":"Get Workflow Run Tool","description":"Get one workflow run by id: run status\/error\/timings plus every step (node ref + label + type, status, taken output handles, output keys, error, timings). Runs are async \u2014 poll this until the run status is terminal.","inputSchema":{"properties":{"run_id":{"description":"The id of the workflow run to fetch.","type":"integer"}},"type":"object","required":["run_id"]},"annotations":{}},{"name":"list_autopilot_rules","title":"List Autopilot Rules Tool","description":"List the current team's compiled Autopilot rules (metric, threshold, window, action, cooldown, status, last fired). Optionally filter to one flight.","inputSchema":{"properties":{"flight_id":{"description":"Optional flight filter.","type":"integer"}},"type":"object"},"annotations":{}},{"name":"list_destinations","title":"List Destinations Tool","description":"List the current team's destinations (id, name, type, and for offers the source network + account) to wire into a funnel as offers or lead-buyer endpoints. Optional `type` filter: affiliate_offer, rsoc_feed, lead_buyer_endpoint (host\/post buyers), external_redirect.","inputSchema":{"properties":{"type":{"description":"Optional filter: affiliate_offer, rsoc_feed, lead_buyer_endpoint, external_redirect.","type":"string"}},"type":"object"},"annotations":{}},{"name":"list_flights","title":"List Flights Tool","description":"List the current team's flights (id, name, status, traffic source, funnel, budget, spend\/revenue\/ROI). Optionally filter by status, funnel, or traffic source account.","inputSchema":{"properties":{"status":{"description":"Optional status filter: draft, pending, active, paused, completed, or failed.","type":"string"},"funnel_id":{"description":"Optional funnel filter.","type":"integer"},"traffic_source_account_id":{"description":"Optional traffic source account filter.","type":"integer"}},"type":"object"},"annotations":{}},{"name":"list_funnels","title":"List Funnels Tool","description":"List the current team's funnels (id, name, status, slug).","inputSchema":{"type":"object","properties":{}},"annotations":{}},{"name":"list_landing_pages","title":"List Landing Pages Tool","description":"List the current team's landing pages (id, name, title, slug, page_type, status, generation_status, variant_label, offer_id), newest first. Use to recover a page id after an async create_landing_page. Optional page_type filter.","inputSchema":{"properties":{"page_type":{"description":"Optional filter: prelander, advertorial, custom, listicle, or offer_wall.","type":"string"}},"type":"object"},"annotations":{}},{"name":"list_lead_buyers","title":"List Lead Buyers Tool","description":"List the current team's lead buyers: id, name, is_active, endpoint_count, daily_cap, priority. Use get_lead_buyer for full detail on one buyer including its posting endpoints.","inputSchema":{"type":"object","properties":{}},"annotations":{}},{"name":"list_saved_reports","title":"List Saved Reports Tool","description":"List the current user's own saved reports plus the team's shared reports (name, embedded query, schedule config if present).","inputSchema":{"type":"object","properties":{}},"annotations":{}},{"name":"list_workflow_node_types","title":"List Workflow Node Types Tool","description":"List every workflow node type available to add_node (key, label, category, declared inputs\/outputs, output handles, config field names) plus the trigger-event catalog for set_trigger (key, label, description).","inputSchema":{"type":"object","properties":{}},"annotations":{}},{"name":"list_workflow_runs","title":"List Workflow Runs Tool","description":"List a workflow's most recent runs (id, status, triggered_by, started\/finished timestamps, error). Use get_workflow_run for a run's per-step detail.","inputSchema":{"properties":{"workflow_id":{"description":"The id of the workflow whose runs to list.","type":"integer"},"limit":{"description":"Max runs to return (default 10, max 50).","type":"integer"}},"type":"object","required":["workflow_id"]},"annotations":{}},{"name":"list_workflows","title":"List Workflows Tool","description":"List the current team's workflows (id, name, status, trigger, node\/run counts). Optionally filter by status (draft, active, archived).","inputSchema":{"properties":{"status":{"description":"Optional status filter: draft, active, or archived.","type":"string"}},"type":"object"},"annotations":{}},{"name":"pause_flight","title":"Pause Flight Tool","description":"Pause an Active flight on its traffic source. Without confirm:true, returns a preview only. With confirm:true, requires flights:write and queues the pause.","inputSchema":{"properties":{"flight_id":{"description":"The Active flight to pause.","type":"integer"},"confirm":{"description":"Set true to execute; omit\/false to preview only.","type":"boolean"}},"type":"object","required":["flight_id"]},"annotations":{}},{"name":"publish_funnel","title":"Publish Funnel Tool","description":"Publish a funnel (goes Active). Hard structural problems block (fix the graph). Soft policy warnings require acknowledge_policy:true to publish over them.","inputSchema":{"properties":{"funnel_id":{"description":"The id of the funnel to publish.","type":"integer"},"acknowledge_policy":{"description":"Set true to publish over soft policy warnings (pre-approval). Defaults to false.","type":"boolean"}},"type":"object","required":["funnel_id"]},"annotations":{}},{"name":"replay_workflow_run","title":"Replay Workflow Run Tool","description":"Replay a finished workflow run as a NEW run seeded from its original trigger payload. Refused for non-terminal runs, runs without a seed snapshot, or while a run is in flight. The new run is ASYNC \u2014 poll get_workflow_run until terminal.","inputSchema":{"properties":{"run_id":{"description":"The id of the finished workflow run to replay.","type":"integer"}},"type":"object","required":["run_id"]},"annotations":{}},{"name":"resume_flight","title":"Resume Flight Tool","description":"Resume a Paused flight on its traffic source. Without confirm:true, returns a preview only. With confirm:true, requires flights:write and queues the resume.","inputSchema":{"properties":{"flight_id":{"description":"The Paused flight to resume.","type":"integer"},"confirm":{"description":"Set true to execute; omit\/false to preview only.","type":"boolean"}},"type":"object","required":["flight_id"]},"annotations":{}},{"name":"run_report","title":"Run Report Tool","description":"Run a breakdown, timeseries, or totals analytics query over the team's tracking data, the same query engine the Reporting island uses.","inputSchema":{"properties":{"mode":{"description":"breakdown (default), timeseries, or totals.","type":"string"},"from":{"description":"Start date (Y-m-d).","type":"string"},"to":{"description":"End date (Y-m-d), inclusive.","type":"string"},"tz":{"description":"IANA timezone (defaults to the team timezone).","type":"string"},"granularity":{"description":"hour, day, week, or month (default day).","type":"string"},"groupBy":{"description":"Up to 4 ReportDimension values to group by (breakdown mode).","items":{"type":"string"},"type":"array"},"metrics":{"description":"ReportMetric values to include.","items":{"type":"string"},"type":"array"},"filters":{"description":"Filter rows: [{dimension, op: eq|in|neq|like, values: [...]}].","type":"array"},"conversionTimeMode":{"description":"visit or postback (default visit).","type":"string"},"sortBy":{"description":"A ReportDimension value to sort by.","type":"string"},"sortDir":{"description":"asc or desc (default desc).","type":"string"},"page":{"description":"Page number (default 1).","type":"integer"},"perPage":{"description":"Rows per page (default 500, max 50000).","type":"integer"}},"type":"object","required":["from","to"]},"annotations":{}},{"name":"run_workflow","title":"Run Workflow Tool","description":"Start a run of a workflow. A normal run (default) executes for real and is refused while a run is already in flight; seed it with \"context\" (arbitrary keys) or \"inputs\" (values for the workflow's input form, whitelisted to its declared fields). Pass preview=true for a TEST run: side-effect nodes SIMULATE (nothing is fired) unless preview_live=true, previews draw from a separate budget and are NOT blocked by an in-flight run, and the sample payload defaults to the workflow's sample trigger when omitted. Either way the run is ASYNC \u2014 returns the run id + status; poll get_workflow_run until terminal.","inputSchema":{"properties":{"workflow_id":{"description":"The id of the workflow to run.","type":"integer"},"context":{"description":"Optional key\/value seed for the run-context bag (the entry node inputs). Ignored for a preview run \u2014 pass \"sample\" instead.","type":"object"},"inputs":{"description":"Optional values for the workflow's INPUT FORM (see get_workflow input_form). Whitelisted to the form's declared fields (undeclared keys are rejected, required fields enforced) then merged into the run-context seed. Use this instead of \"context\" when the workflow has an input form.","type":"object"},"preview":{"description":"Start a PREVIEW \/ test run: side-effect nodes simulate (nothing fired), a separate budget, and exempt from the one-in-flight guard. Default false.","type":"boolean"},"preview_live":{"description":"With preview=true, execute everything for REAL (relays post, campaigns pause). Default false.","type":"boolean"},"sample":{"description":"With preview=true, the sample trigger payload to seed the preview. Defaults to the workflow's sample trigger when omitted.","type":"object"}},"type":"object","required":["workflow_id"]},"annotations":{}},{"name":"set_flight_budget","title":"Set Flight Budget Tool","description":"Set (mode: set) or adjust by a factor (mode: adjust) a flight's live daily budget on its traffic source. Without confirm:true, returns a preview only. With confirm:true, requires flights:write and executes immediately.","inputSchema":{"properties":{"flight_id":{"description":"The flight to adjust.","type":"integer"},"mode":{"description":"set (absolute) or adjust (factor).","type":"string"},"amount_minor":{"description":"Daily budget in minor units (e.g. cents). Required when mode=set.","type":"integer"},"factor":{"description":"Adjustment factor, e.g. 1.2 scales up 20%. Required when mode=adjust.","type":"number"},"confirm":{"description":"Set true to execute; omit\/false to preview only.","type":"boolean"}},"type":"object","required":["flight_id","mode"]},"annotations":{}},{"name":"set_workflow_status","title":"Set Workflow Status Tool","description":"Set a workflow status: draft, active, or archived. Only active workflows fire on scheduled\/event\/webhook triggers. Activating an event-triggered workflow with no configured event is refused.","inputSchema":{"properties":{"workflow_id":{"description":"The id of the workflow to update.","type":"integer"},"status":{"description":"The new status: draft, active, or archived.","type":"string"}},"type":"object","required":["workflow_id","status"]},"annotations":{}},{"name":"submit_export","title":"Submit Export Tool","description":"Submit an async analytics export (breakdown query, csv or xlsx). Returns an export id to poll with get_export.","inputSchema":{"properties":{"from":{"description":"Start date (Y-m-d).","type":"string"},"to":{"description":"End date (Y-m-d), inclusive.","type":"string"},"tz":{"description":"IANA timezone (default UTC).","type":"string"},"granularity":{"description":"hour, day, week, or month (default day).","type":"string"},"groupBy":{"description":"Up to 4 ReportDimension values to group by.","items":{"type":"string"},"type":"array"},"metrics":{"description":"ReportMetric values to include.","items":{"type":"string"},"type":"array"},"filters":{"description":"Filter rows: [{dimension, op: eq|in|neq|like, values: [...]}].","type":"array"},"conversionTimeMode":{"description":"visit or postback (default visit).","type":"string"},"format":{"description":"csv (default) or xlsx.","type":"string"},"columns":{"description":"Selected metric columns; default columns when omitted.","items":{"type":"string"},"type":"array"},"hideZeroSpend":{"description":"Drop zero-cost rows (default false).","type":"boolean"}},"type":"object","required":["from","to"]},"annotations":{}},{"name":"update_funnel_plan","title":"Update Funnel Plan Tool","description":"Replace a funnel build plan while it is awaiting_approval. The plan must be a valid funnel build plan (funnel, nodes, edges, publish, rationale).","inputSchema":{"properties":{"build_id":{"description":"The id of the build whose plan to replace.","type":"integer"},"plan":{"description":"The replacement funnel build plan (funnel, artifacts, nodes, edges, publish, rationale).","type":"object"}},"type":"object","required":["build_id","plan"]},"annotations":{}},{"name":"update_landing_page","title":"Update Landing Page Tool","description":"Edit a raw-HTML landing page (name\/title\/status\/html_content\/css_custom\/design). Item-driven pages (listicle\/offer_wall) are rejected \u2014 use edit_listicle_items.","inputSchema":{"properties":{"landing_page_id":{"description":"The id of the landing page to edit.","type":"integer"},"name":{"description":"New internal display name (independent of title\/slug\/content).","type":"string"},"title":{"description":"New title.","type":"string"},"status":{"description":"New status (e.g. draft, active).","type":"string"},"html_content":{"description":"Replacement page HTML (design tokens re-baked in).","type":"string"},"css_custom":{"description":"Replacement custom CSS (blank clears it).","type":"string"},"design":{"description":"Design tokens (fontPairing, accentColor); re-bakes over the stored html.","type":"object"}},"type":"object","required":["landing_page_id"]},"annotations":{}},{"name":"update_lead_buyer_endpoint","title":"Update Lead Buyer Endpoint Tool","description":"Edit a lead-buyer posting endpoint (this is how you swap a placeholder post_url for the real one). Resolve by endpoint_id or destination_id, then pass any of: lead_buyer_id (retarget to a different buyer), name (renames the wired Destination), post_url, post_method, post_format, field_mapping, response_parser_config, strip_referrer, require_trustedform, cap_config. Never changes the endpoint's team or which Destination row it is wired to.","inputSchema":{"properties":{"endpoint_id":{"description":"The id of the endpoint to edit. Provide this or destination_id.","type":"integer"},"destination_id":{"description":"The wired Destination id. Provide this or endpoint_id.","type":"integer"},"lead_buyer_id":{"description":"Retarget this endpoint to a different lead buyer.","type":"integer"},"name":{"description":"Renames the wired Destination.","type":"string"},"post_url":{"description":"New posting URL.","type":"string"},"post_method":{"description":"get, post, or put.","type":"string"},"post_format":{"description":"json, form, or xml.","type":"string"},"field_mapping":{"description":"Replacement field mapping: buyer_field => \"{{ template }}\" or a literal string.","type":"object"},"response_parser_config":{"description":"Replacement response-parsing rules.","type":"object"},"strip_referrer":{"description":"When true, the originating referrer header is not forwarded to the buyer.","type":"boolean"},"require_trustedform":{"description":"When true, a lead without a TrustedForm certificate is rejected instead of posted.","type":"boolean"},"cap_config":{"description":"Replacement daily\/weekly\/monthly caps + on_exhaustion behavior.","type":"object"}},"type":"object"},"annotations":{}},{"name":"update_lead_form","title":"Update Lead Form Tool","description":"Edit a lead form: form surface (name\/fields\/consent_language\/thank_you_config\/validation_rules\/is_active) + served page (page={brand_name,headline,subheadline,tagline,partners[],reassurance,disclaimer}; design={accentColor,fontPairing}). Re-bakes the bound lead-form page (footer disclaimer defaults to consent_language). Step \/ branching edits use edit_lead_form_steps; outcome edits use edit_lead_form_outcomes.","inputSchema":{"properties":{"form_id":{"description":"The id of the lead form to edit.","type":"integer"},"name":{"description":"New form name.","type":"string"},"fields":{"description":"Replacement form field definitions.","items":{"type":"object"},"type":"array"},"consent_language":{"description":"Replacement consent language (also the served footer disclaimer unless page.disclaimer is set).","type":"string"},"thank_you_config":{"description":"Replacement thank-you screen config.","type":"object"},"validation_rules":{"description":"Replacement validation rules.","type":"object"},"is_active":{"description":"Active flag.","type":"boolean"},"page":{"description":"Served-page chrome merged onto the bound lead-form page: brand_name, tagline, headline, subheadline, partners[], reassurance, disclaimer.","type":"object"},"design":{"description":"Design tokens for the bound page: accentColor (hex, e.g. \"#15C7BF\"), fontPairing.","type":"object"}},"type":"object","required":["form_id"]},"annotations":{}},{"name":"update_path_flow","title":"Update Path Flow Tool","description":"Edit a path-flow surface: name\/status + config. config={theme, page:{...chrome}, progress_style, ttl_hours} \u2014 theme (e.g. \"comparison-portal\") switches the served template; page sets quiz chrome (brand_name, headline, subheadline, partners[], benefits[{icon,title,body}], benefits_heading, reassurance, disclaimer, final_headline\/final_subheadline\/final_cta). config is shallow-merged and re-bakes the page. Step\/outcome edits use edit_path_flow_steps \/ edit_path_flow_outcomes.","inputSchema":{"properties":{"flow_id":{"description":"The id of the path flow to edit.","type":"integer"},"name":{"description":"New flow name.","type":"string"},"status":{"description":"New status (e.g. draft, active).","type":"string"},"config":{"description":"Shallow-merged config. Keys: theme (template, e.g. \"comparison-portal\"); page (object of quiz chrome: brand_name, tagline, headline, subheadline, partners[], reassurance, benefits[{icon,title,body}], benefits_heading, disclaimer, final_headline, final_subheadline, final_cta); progress_style; ttl_hours. Re-bakes the served page.","type":"object"}},"type":"object","required":["flow_id"]},"annotations":{}},{"name":"upsert_autopilot_rule","title":"Upsert Autopilot Rule Tool","description":"Compile a new Autopilot rule onto a flight (metric\/threshold\/window -> action). Without confirm:true, returns a preview only. With confirm:true, requires flights:write and activates the rule immediately.","inputSchema":{"properties":{"flight_id":{"description":"The flight to attach the rule to.","type":"integer"},"metric":{"description":"An AutopilotMetric value, e.g. cpa, roas, drought, roi, epc.","type":"string"},"threshold":{"description":"Breach threshold. Ignored for the drought metric.","type":"number"},"window_hours":{"description":"Rolling window in hours, e.g. 6.","type":"integer"},"action":{"description":"pause, resume, set_budget, adjust_budget, or alert.","type":"string"},"cooldown_minutes":{"description":"Minimum minutes between automated firings (default 60).","type":"integer"},"budget_amount_minor":{"description":"Daily budget in minor units. Required when action=set_budget.","type":"integer"},"budget_factor":{"description":"Adjustment factor. Required when action=adjust_budget.","type":"number"},"scope":{"description":"campaign (default) or ad_set. ad_set only applies to pause\/resume.","type":"string"},"ad_set_external_id":{"description":"Platform ad-set id. Required when scope=ad_set.","type":"string"},"confirm":{"description":"Set true to execute; omit\/false to preview only.","type":"boolean"}},"type":"object","required":["flight_id","metric","window_hours","action"]},"annotations":{}}]}