MISSINdevelopersLog in

MCP

Discounts tools

MCP tools for discounts: what each does, the key level it needs, the operation it runs and its input schema. Part of the MISSIN public API: call it with an…

An operation tool runs one API operation and takes its variables, so the operation's page says what each accepts. Two differences: the server fills in workspaceId and updatedBy, and campaignId, partnerId, formId, discountCodeId, socialNetworkId, waitlistId, incentiveId, channelId also take the record's name. A task tool chains several operations and is described here in full. Every tool's input schema, keyed by tool name: discounts.schema.json.

Task tools

save_discount_code

Access: Write · Kind: task · Toolset: core · Hints: idempotent

Create a discount code, or update the one with this code or id. Updating takes only the fields to change; creating needs the whole body (code, title, aliased_codes, value_kind percent|amount with value_percent/value_amount, usage_limit, start_at, ends_at, status — null where there is none), and a missing field comes back as an error before anything is written. Makes one write, so it is all-or-nothing. Returns { id, created }.

Try: “Make a 15% code SPRING15 that ends on 31 May.”

Input schema
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "description": "Update this discount code. Omit to update the code with exactly body.code, or create it.",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "connectionId": {
      "description": "Place the code on this store connection (list_workspace_connections).",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "body": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255,
          "pattern": "^\\S+$"
        },
        "aliased_codes": {
          "maxItems": 1000,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "code": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255,
                "pattern": "^\\S+$"
              }
            },
            "required": [
              "code"
            ]
          }
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        },
        "display_name": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 255
            },
            {
              "type": "null"
            }
          ]
        },
        "value_kind": {
          "type": "string",
          "enum": [
            "percent",
            "amount"
          ]
        },
        "value_percent": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0,
              "maximum": 100
            },
            {
              "type": "null"
            }
          ]
        },
        "value_amount": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0,
              "maximum": 5000
            },
            {
              "type": "null"
            }
          ]
        },
        "usage_limit": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 999999
            },
            {
              "type": "null"
            }
          ]
        },
        "start_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "ends_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "one_time_purchase": {
          "default": false,
          "type": "boolean"
        },
        "status": {
          "type": "string",
          "enum": [
            "EXPIRED",
            "DRAFT",
            "SCHEDULED",
            "ACTIVE"
          ]
        },
        "is_public": {
          "type": "boolean"
        },
        "public_tier": {
          "type": "string",
          "enum": [
            "BASIC",
            "QUICK",
            "ENHANCED"
          ]
        },
        "origin": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        },
        "tags": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "additionalProperties": {
            "type": "string",
            "enum": [
              "default",
              "gray",
              "brown",
              "orange",
              "yellow",
              "green",
              "blue",
              "purple",
              "pink",
              "red"
            ]
          }
        },
        "placements": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "connectionId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "child": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              }
            },
            "required": [
              "connectionId"
            ]
          }
        }
      },
      "description": "Discount columns: code, title, value_kind with value_percent or value_amount, status, start_at, ends_at, usage_limit, combine flags."
    }
  },
  "required": [
    "body"
  ]
}

Operation tools

ToolOperationAccessToolsetHintsWhat it does
add_discount_placementsAddDiscountPlacementsWritediscountsPlace discount codes on a store or email connection; the codes are pushed to the provider.
bulk_remove_tag_from_workspace_discountsBulkRemoveTagFromWorkspaceDiscountsWritediscountsdestructiveRemove a tag from every discount code in the workspace. Irreversible.
bulk_rename_tag_across_workspace_discountsBulkRenameTagAcrossWorkspaceDiscountsWritediscountsRename a tag on every discount code in the workspace.
bulk_sync_discount_codesBulkSyncDiscountCodesWritediscountsRe-push the selected discount codes to their providers.
bulk_update_discount_code_statusBulkUpdateDiscountCodeStatusWritediscountsSet the status of many discount codes at once; each code is clamped to what it allows.
create_discount_codeCreateDiscountCodeWritediscountsCreate a discount code and, with connectionId, place it on that store.
delete_discount_codeDeleteDiscountCodeWritediscountsdestructiveDelete a discount code here and at its providers. Irreversible.
get_discount_campaignsDiscountCampaignsReaddiscountsread-only, idempotentList the campaigns a discount code is linked to.
get_discount_changesDiscountChangesReaddiscountsread-only, idempotentPage through a discount code's change history and provider sync state.
get_discount_code_alias_existsDiscountCodeAliasExistsReaddiscountsread-only, idempotentCheck whether codes are already used as a code or alias in this workspace.
get_discount_code_form_responsesDiscountCodeFormResponsesReaddiscountsread-only, idempotentForm responses that used one discount code.
get_discount_code_ordersDiscountCodeOrdersReaddiscountsread-only, idempotentPage through orders that used one discount code, with revenue totals.
get_discount_code_order_seriesDiscountCodeOrderSeriesReaddiscountsread-only, idempotentDaily order count and revenue series for one discount code.
get_discount_code_partnersDiscountCodePartnersReaddiscountsread-only, idempotentThe partner one discount code belongs to.
get_discount_code_response_seriesDiscountCodeResponseSeriesReaddiscountsread-only, idempotentDaily form-response series for one discount code, total and attributed.
get_discount_codes_aggregates_filteredDiscountCodesAggregatesFilteredReaddiscountsread-only, idempotentTotals across the discount codes matching a filter: count, usage and value.
list_discount_codesDiscountCodesListReadcoreread-only, idempotentList discount codes with filter, sort and offset paging: code, value, status, usage and tags. Totals and detail are off unless requested: set withTotal to true to include them.
get_discount_code_tag_facetsDiscountCodeTagFacetsReaddiscountsread-only, idempotentList discount tags with their colour and usage count.
get_discountDiscountDetailReadcoreread-only, idempotentGet one discount code by id with orders, revenue, partner, placements and incentive rules.
get_discount_placements_by_codeDiscountPlacementsByCodeReaddiscountsread-only, idempotentList where one discount code is placed (store, email platform) and each placement's sync state.
get_discount_placement_targetsDiscountPlacementTargetsReaddiscountsread-only, idempotentList the products and collections a discount code's placements target.
remove_discount_placementRemoveDiscountPlacementWritediscountsdestructiveRemove a discount placement and delete it at the provider. Irreversible.
resync_discount_placementResyncDiscountPlacementWritediscountsRe-queue a discount placement's push to its provider.
search_placement_targetsSearchPlacementTargetsReaddiscountsread-only, idempotentSearch a store connection's products or collections to target with a discount.
set_discount_tag_colorSetDiscountTagColorWritediscountsidempotentSet a discount tag's colour.
set_placement_targetsSetPlacementTargetsWritediscountsidempotentReplace the products and collections a discount placement targets.
sync_all_discount_codesSyncAllDiscountCodesWritediscountsRe-push every discount code to its providers.
update_discount_codeUpdateDiscountCodeWritediscountsUpdate a discount code and push the change to its placements.
update_discount_placement_childUpdateDiscountPlacementChildWritediscountsEdit the provider-specific fields of one discount placement.
withdraw_discount_placementWithdrawDiscountPlacementWritediscountsWithdraw a discount placement without deleting the code.

For AI agents: a markdown index of this site is at /llms.txt, and every page is available as markdown by adding .md to its URL.