wafle MCP server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LOG_LEVEL | No | Log level (default info) | info |
| WAFLE_API_KEY | Yes | Your wafle admin key (required) | |
| WAFLE_API_URL | No | The wafle API URL (default: https://wafle.click/wp-json/waffle/v1) | https://wafle.click/wp-json/waffle/v1 |
| WAFLE_MCP_TOKENS | No | Comma-separated bearer tokens for legacy admin-tier auth (fallback when REQUIRE_JWT is unset) | |
| WAFLE_TIMEOUT_MS | No | Timeout in milliseconds for API calls (optional, default 30000) | 30000 |
| WAFLE_MCP_HTTP_HOST | No | Host for HTTP transport (only used with --transport=http, default 0.0.0.0) | 0.0.0.0 |
| WAFLE_MCP_HTTP_PORT | No | Port for HTTP transport (only used with --transport=http, default 7100) | 7100 |
| WAFLE_MCP_JWT_SECRET | No | Shared HS256 secret for tenant-scoped JWT auth (recommended, generate with openssl rand -hex 64) | |
| WAFLE_MCP_REQUIRE_JWT | No | Set to '1' to refuse legacy bearer tokens in production |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| wafle_abandoned_listA | List abandoned cart sessions: last activity, items, optional email captured before exit. Use to estimate recovery potential or to feed a manual outreach campaign. |
| wafle_abandoned_send_recoveryA | Trigger a recovery email to the captured address of an abandoned-cart session. The email contains a one-click recovery link with the cart pre-filled. Idempotent: re-sending within the cooldown window is a no-op (wafle returns the existing send id). |
| wafle_ads_anomalies_listA | List ads anomalies detected by the cron-driven detector (runs every 30 minutes). Each anomaly includes kind (cpa_spike, roas_break, conversion_drop, spend_overrun, learning_limited_stuck, tracking_drift), severity, scope, and the metrics that triggered it. Anomalies fire admin-inbox notifications (warning+) and push notifications (critical only) with a 6h cooldown per (kind, scope_id) pair. Use this tool to read raw history. |
| wafle_ads_audience_overlap_checkA | Compute % overlap between custom audiences in the connected ad account. Returns a matrix (audience_a × audience_b → overlap_pct + overlap_users). Use this when the merchant runs many similar adsets — high overlap (>40%) typically means they're bidding against themselves and inflating CPM. Pass specific Note: Meta's overlap API is sampled (it builds the matrix once a day), so values may be a few hours stale. The wafle backend caches results for 6 hours per (slug, audience_set) tuple. |
| wafle_ads_breakdown_by_creativeA | Per-creative performance breakdown for a campaign (or whole account if Use when you need to find the one creative carrying a campaign vs the ones bleeding spend. Sort defaults to spend desc; a |
| wafle_ads_bulk_pauseA | Pause many Meta campaigns in a single tool call. Returns per-id success/failure so partial successes are visible. Best for ROAS-floor sweeps ("pause everything below 1.5x last 7d") and seasonal cleanup. The wafle backend serializes the underlying Marketing API requests with a 1 RPS throttle to stay below Meta's per-app rate limit. |
| wafle_ads_campaign_pauseA | Pause a Meta Ads campaign by id. Idempotent — pausing an already-paused campaign returns ok=true. Uses the tenant's connected Meta access token; the LLM does not need to pass credentials. Use when ROAS is below threshold or as the apply step of a pause-recommendation. For multi-campaign pauses, prefer |
| wafle_ads_campaign_resumeA | Resume a paused Meta Ads campaign by id. Sets status to ACTIVE. Idempotent for already-active campaigns. Note: campaigns paused for 14+ days lose their Learning Phase signal — Meta will re-enter Learning when you resume them. |
| wafle_ads_campaign_update_budgetA | Update a Meta campaign's budget. Pass Cents are in the ad account currency. The recommender follows a +30% / max +50% rule when scaling winners; if you call this directly, mirror that constraint to avoid blowing the Learning Phase. |
| wafle_ads_compare_periodsA | Compare two date ranges (e.g. '2026-04' vs '2026-03', or two arbitrary date windows) and return delta % per metric: spend, revenue, ROAS, CPA, conversions, profit. Both ranges are evaluated against the wafle CAPI server-side truth so the comparison is honest (Meta's pixel attribution can drift quarter to quarter and produce false deltas). Use to answer 'how did April do vs March?' or 'did the new creative pack improve things in the last 14 days vs the prior 14?'. Ranges can be passed as ISO months or as start/end dates; the two windows must NOT overlap. |
| wafle_ads_creative_performance_logA | Daily timeseries for a single creative_id since Use to detect (a) Learning Phase exit, (b) creative fatigue (frequency rising + CTR falling), (c) the right scale moment (3+ days of stable ROAS above target). The response also includes |
| wafle_ads_generate_report_monthlyA | Generate a structured monthly ads report for a store. Returns total spend, total revenue, profit, blended ROAS, top 5 winning campaigns, bottom 5 losing campaigns, and a Backed by |
| wafle_ads_performance_summaryA | Account-level cross-tabbed performance — joins Meta Marketing API spend/impressions/clicks with wafle CAPI orders/revenue. Each campaign returns: spend, meta_reported_orders (from pixel), wafle_orders (server-side truth), cpa_real_cents (spend / wafle_orders), roas_real, learning_phase, plus a prev_period block for trend analysis. Use this as the input to any optimization decision — it's what the recommender feeds the LLM. |
| wafle_ads_propose_pause_underperformersA | READ-ONLY proposer: returns a list of adsets with ROAS below This tool NEVER mutates. To execute, the caller must explicitly call |
| wafle_ads_recommendation_applyA | Apply a wafle ads recommendation by id — runs the underlying writer action (pause campaign, raise budget, etc.) and marks the recommendation applied. Idempotent: re-applying returns the previous result. If the action requires human judgment (request_human_review, generate_creative_variants), the call queues the work and returns ok=true with |
| wafle_ads_recommendations_listA | List ads recommendations generated by wafle's AI engine. Recommendations cross-tab the Meta API spend with the server-side truth (wafle CAPI orders + revenue), so CPA/ROAS reflect what actually happened — not Meta's own attribution. Each card has: title, description, action (the actual writer call to apply it), confidence (0..1), expected_impact, severity. Apply with |
| wafle_ads_sync_fullA | Run a full ads-platform catalog sync (Meta Catalog API or equivalent) AND wait until it finishes. Emits progress notifications. Long-running (5+ minutes for large catalogs). For fire-and-forget, call the underlying create endpoint directly. |
| wafle_agents_activateA | Activate an agent — moves status to |
| wafle_agents_createA | Create a new custom agent. Two paths:
Cost guardrail ( |
| wafle_agents_getA | Get one agent by its slug — full definition including system_prompt, tools_allowed, guardrails, trigger_config and stats counters. |
| wafle_agents_listA | List custom agents defined for a store. Each agent has system_prompt + tools whitelist + guardrails + trigger. Filter by status (draft/active/paused/archived) or trigger_type. |
| wafle_agents_pauseA | Pause an active agent. Triggers stop firing; existing runs unaffected. |
| wafle_agents_runA | Manually dispatch a run for an agent. Returns the |
| wafle_agents_runs_approveA | Approve a run that is |
| wafle_agents_runs_getA | Get a specific run with its full conversation + audit log (steps: user_input, assistant_text, tool_call, tool_result, approval_request, approval_granted, error). |
| wafle_agents_runs_listA | List runs for an agent — paginated, filterable by status. Each row: status, tokens, cost_cents, duration_ms. |
| wafle_agents_runs_rejectA | Reject a run that is |
| wafle_agents_statsA | Aggregated stats for an agent: total runs, success rate, total cost, top tool names called. |
| wafle_agents_templatesA | List the 5 pre-armed agent templates: customer-support-bot, content-writer-nightly, stock-watcher, abandoned-recovery, fraud-detector. Use the |
| wafle_agents_tool_catalogA | List the catalog of tools that can be added to an agent's |
| wafle_agents_updateA | Patch an existing agent — change system_prompt, tools_allowed, guardrails, trigger_config, model, status, etc. Slug + tenant_id are immutable. |
| wafle_ai_categorizeA | Auto-classify products without a category. Call with a list of SKUs and a list of allowed categories. Each product gets |
| wafle_ai_jobs_acceptA | Apply an AI job's output to the platform.
|
| wafle_ai_jobs_editA | Save user edits on an AI job's output and apply them. For product_description, the edited text is what gets written to data.descriptions.. |
| wafle_ai_jobs_getA | Fetch a single AI job by id. Includes input_payload, output_payload, tokens, cost, model, duration, and user review status. |
| wafle_ai_jobs_listA | Paginated list of AI jobs for a store. Filter by job_type, status, or user_review. Use to surface a 'pending review' queue or to find a specific recent job. |
| wafle_ai_jobs_rejectA | Mark an AI job's output as rejected. Use to keep usage stats clean and to preserve learning signal for prompt tuning. |
| wafle_ai_product_describeA | Generate a sales copy description for a product. Reads name + attributes + images from the catalog, runs the configured LLM, and stores the output as a 'pending review' job. Call Tone: 'persuasivo' | 'tecnico' | 'breve'. Length is approximate words (±15%). |
| wafle_ai_review_summaryA | Summarize the approved reviews of a product into 2–3 sentences plus sentiment + key points. Output goes into a job; call |
| wafle_ai_segment_compileA | Compile a natural-language description (e.g. 'clientes que compraron al menos 2 veces y abandonaron carro últimos 30 días') into the email-marketing segmentation DSL. Returns |
| wafle_ai_support_hintA | Customer-service co-pilot: classify an inbound message, gauge sentiment, decide if it needs escalation, and draft a friendly response. PII (emails, phones) in the message is redacted before being sent to the LLM. |
| wafle_ai_translateA | Translate a piece of text from one language to another. Cached by sha256(source_text|source_lang|target_lang) — re-translating the same input is free. Preserves markdown, lists, links and {{placeholders}}. Use for product descriptions, emails, or short copy snippets. Source and target are language codes ('es', 'en', 'pt', 'es-AR', 'pt-BR'). |
| wafle_ai_usageA | Token + cost aggregate for a store since a date (defaults to last 30 days). Use for the AI dashboard chart and quota guidance. |
| wafle_analytics_by_periodA | Time-series breakdown of analytics: revenue + orders bucketed by day/week/month. Use for charts and 'compare last 30d to previous 30d' workflows. |
| wafle_analytics_summaryA | High-level KPIs for a store over a window: orders, revenue, AOV, top products, conversion funnel, abandoned-cart rate. Use as the starting point of any 'how is store X doing?' question. |
| wafle_auth_keys_createA | Create a new wafle API key with the given scopes. Returns the secret ONCE — store it immediately. Use when onboarding a new dashboard user, integration, or agent. Prefer narrowly-scoped keys. If the wafle backend has not yet implemented Admin-only: tenant clients cannot mint API keys. |
| wafle_auth_keys_listA | List API keys associated with the master account (or with a specific store, if the upstream key supports it). Returns prefix + scopes for each key. Full secrets are NEVER returned by wafle. Use to audit who has access. Admin-only: tenant clients cannot enumerate API keys. |
| wafle_auth_meA | Return information about the wafle admin key currently configured for this MCP server. Use this to verify the server is correctly authenticated before running other tools, or to debug a 401 error. The response is Do NOT use this to authenticate end-user requests — wafle's REST has separate magic-link auth for storefront customers. |
| wafle_checkout_cart_recoverA | List abandoned carts (cart_token has items but no |
| wafle_checkout_order_getA | Fetch one order from wafle_orders. |
| wafle_checkout_order_mark_paidA | Manually flip a transfer/cash order to paid (proof-of-deposit verified, cash collected at delivery). Returns 422 if the order is on a webhook-driven gateway (mp / stripe) — those move via /webhooks/* automatically. |
| wafle_checkout_order_refundA | Refund a paid order — full when |
| wafle_checkout_order_resend_emailB | Resend a transactional email tied to an order. Default template: |
| wafle_checkout_orders_listA | List orders from the wafle_orders table for a store. Returns the new checkout pipeline (cart→MP/Stripe/transfer→paid). Filterable by status, date floor ( |
| wafle_coupons_createA | Create a coupon. Codes are case-insensitive. Date fields are epoch seconds (0 = no bound). Common patterns:
|
| wafle_coupons_deleteA | Delete a coupon by id. Past usage history is preserved on orders. |
| wafle_coupons_listA | List all coupons of a store. Each row: code, type, value, usage, validity dates, applies-to scope. Use to audit active discounts or to find a code before editing. |
| wafle_coupons_updateA | Patch a coupon by id. Only sent fields change. |
| wafle_csv_importA | Import a CSV product feed into a store with Returns the final import summary: imported, updated, errors, duration. |
| wafle_customers_getA | Fetch a single customer profile by email. Returns aggregated stats: lifetime value, order count, last seen, top SKUs. |
| wafle_customers_listA | List customers of a store with pagination + filters: search by email/name, has-orders, segment. Wafle treats customers as derived data over |
| wafle_customers_ordersA | List the orders of a single customer (by email). |
| wafle_customers_segments_listA | List all customer segments configured for a store. Segments power the |
| wafle_domains_addA | Attach a new custom domain (e.g. 'mi-tienda.com') to a wafle store. Wafle generates a verification_token and returns the 3 alternative DNS instructions the tenant must apply. After creating, the tenant updates DNS at their provider, then call Validation rules: lowercase FQDN only, no IPs, no wildcards, no .wafle.click subdomains, max 10 active domains per tenant. |
| wafle_domains_listA | List the custom domains attached to a wafle store. Returns each domain's status (pending_verification / verifying / ssl_pending / active / ssl_failed / disabled), SSL expiry, verification token, and DNS-setup instructions for all 3 verification methods (TXT/CNAME/file). Use first when the user asks 'what domains does store X have?' or before giving DNS instructions to a new tenant. |
| wafle_domains_statusA | Fetch the full status of a single attached domain — current status (pending/verifying/active/etc), SSL expiry, last renewal, log of recent events. Includes the original DNS-setup instructions so you can re-show them to the tenant. Use to answer 'is mi-tienda.com working yet?' or to debug a stuck verification. |
| wafle_domains_verifyA | Trigger immediate verification + SSL + nginx provisioning for a previously-added domain. Idempotent — safe to call repeatedly. The pipeline:
Rate-limited to 1 attempt per minute per domain (DNS + acme upstream). |
| wafle_exports_customersA | Export the customer list of a store as CSV (default) or JSON. Includes email, name, phone, total spent, order count, last seen. Use for CRM imports or general data exports. Wafle returns the raw CSV/JSON in the response body — for large stores prefer the dashboard download flow. |
| wafle_exports_google_adsA | Export an audience formatted for Google Ads Customer Match: hashed email/phone with the column names Google expects. |
| wafle_exports_meta_audienceA | Export an audience formatted for Meta (Facebook/Instagram) custom audiences: hashed email + phone per row, schema-compatible with Meta's CSV upload. Filter by segment to build retargeting (high-intent, recovered, top-spenders) cohorts. |
| wafle_gateways_createA | Create a new gateway. Types:
After creating, run |
| wafle_gateways_deleteA | Delete a gateway. Fails if the gateway is currently the default for any store — switch the store first. Destructive and irreversible. Confirm with the user. |
| wafle_gateways_listA | List all payment gateways across all stores (master view). Each gateway includes type, currency, active flag, store association. Use to audit which stores have which gateways configured. Secrets are NEVER returned (only |
| wafle_gateways_testA | Run a live credential test against the gateway provider. For MP it calls Use after |
| wafle_gateways_updateA | Patch an existing gateway. Use to rotate credentials ( Destructive in the sense that an inactive gateway will reject new charges; live transactions in flight are unaffected. |
| wafle_invitations_createA | Invite a teammate to a tenant by email. Sends an invitation email with a magic link. Requires the actor to be |
| wafle_members_listA | List all members of a tenant — accepted memberships + pending invitations. Requires |
| wafle_members_update_roleA | Update a member's role / scopes / is_active for a given tenant. Requires |
| wafle_orders_add_noteA | Add an internal or customer-visible note to an order. Notes appear in the timeline and (if |
| wafle_orders_cancelA | Cancel an order. If the gateway supports auto-refund and the order was paid, wafle will trigger the refund. Destructive: the order moves to |
| wafle_orders_createA | Manually create an order. Use only for migrations or telephone sales — normal orders flow from the storefront. Body uses canonical snake_case shape: items[]+payment_method+gateway_id (see waffle-docs/API-CONVENTIONS.md). Idempotency-Key header is auto-set; safe to retry on transient errors. |
| wafle_orders_getA | Fetch a single order by id. Returns customer, items, totals, gateway info, status, shipment data, timeline reference. |
| wafle_orders_listA | List orders for a store with pagination + filters. Filters: status, date range, customer email, search. Use this for any 'pendientes', 'enviados', 'últimos N días' style query. The response includes |
| wafle_orders_refundA | Refund a paid order, fully or partially. The refund is sent through whichever gateway captured the payment (MercadoPago / Stripe / manual transfer). Destructive AND irreversible. Confirm amount before calling. |
| wafle_orders_shipA | Mark an order as shipped. Records the carrier, tracking number, and updates status to Triggers the customer notification email if the store has it enabled. |
| wafle_orders_timelineA | Get the chronological timeline of an order: status changes, payment events, shipment, notes, refunds. Use to audit how an order got into its current state. |
| wafle_pixels_getA | Fetch the current marketing pixel IDs configured for a store: Meta (Facebook), TikTok, GA4, Google Ads. |
| wafle_pixels_setA | Set / update marketing pixel IDs of a store. Pass only the pixels you want to change; omit fields stay untouched. Pass |
| wafle_pricing_compute_previewA | Compute the final price of a list of (sku, qty) pairs given the store's current rules. Returns base price, applied rules, final price. Use as a sanity check before publishing pricing changes — answers 'how much would I be charging?' without disturbing the live cart. |
| wafle_pricing_rules_createA | Create a new pricing rule. Types:
Always preview with |
| wafle_pricing_rules_deleteA | Delete a pricing rule by id. Irreversible — confirm before calling. |
| wafle_pricing_rules_listA | List all dynamic pricing rules of a store: catalog-wide multipliers, category markups, sale discount tiers, fixed prices on specific SKUs. Use before editing — pricing rules compose, so you need to know what's already there. |
| wafle_pricing_rules_updateB | Patch an existing pricing rule by id. |
| wafle_products_create_manualA | Manually create a product in a store whose Do NOT use on stores with |
| wafle_products_getA | Fetch a single product by slug (the URL-friendly id). Returns full detail including variants, images, attributes and overrides. |
| wafle_products_listA | List products of a single store with pagination + optional search/filter. Returns id, slug, name, sku, price, stock, status, images. Use to browse catalog or to find a product id before editing/overriding. |
| wafle_products_overrideA | Set per-product overrides (price, name, description, images) that survive catalog syncs. Use on Wafle stores overrides server-side and re-applies them after every sync. |
| wafle_products_searchA | Lightweight search of products by name/sku. Equivalent to |
| wafle_products_sync_statusA | Get the status of a product-sync job (pending|running|done|failed). Pair with |
| wafle_products_sync_triggerA | Trigger an asynchronous catalog sync for a store. Returns a job id; poll Only meaningful on |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| conectar_meta_y_sync | Conectar la cuenta Meta (Business Manager + ad account + catalog ID) a una tienda y disparar la sync inicial del catálogo al Catalog API de Meta. Reporta últimas 3 syncs y propone schedule recurrente. |
| debug_orden_fallida | Diagnóstico completo de una orden con problema de pago/envío: estado actual, timeline, y opcionalmente reintento con un gateway secundario sin re-cobrar al cliente. |
| onboarding_tienda_nueva | Onboarding completo de una tienda nueva: crear store, configurar Mercado Pago, importar catálogo CSV (opcional), y crear una API key restringida para el frontend. |
| pedido_enviar | Marcar un pedido como enviado: registrar carrier + tracking, cambiar status a `shipped`, y disparar el email transaccional al cliente. |
| segmentar_y_campania | Segmentar clientes (criterio + nombre) y lanzar/agendar una campaña de email con un template existente y un subject custom. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| API conventions | Canonical request/response shapes used by the wafle REST API: snake_case, money units, timestamps, pagination, idempotency, errors. |
| Architecture overview | High-level architecture of the wafle platform: REST API, dashboard, storefronts, multi-tenancy, catalog modes, background jobs. |
| Stores list | Lean list of every wafle store the configured key can see: id, slug, name, domain, status, catalog mode, payment + shipping methods, gateway IDs. Use as a starting point before drilling into a specific store. |
| System health | Snapshot of the wafle backend: database, redis, cron, queue, releases. Returns latency per check. Cheap first call when something looks off. |
| Scope catalog | Reference catalog of every wafle API scope: domain, tier (read/write/admin), human label. Sourced from the MCP scope matrix; matches the wafle backend. |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/the33warehouse-tech/wafle-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server