SparkLayer MCP by usefulapi
Read customers, prices, stock and orders, and update customers and stock in SparkLayer.
Sollte ich dies verwenden
Qualität und Sicherheit
Befunde (7)
- LOWin sparklayer_list_customer_addresses
- LOWin sparklayer_list_company_sections
- LOWin sparklayer_list_customer_groups
- LOWin sparklayer_list_global_settings
- LOWin sparklayer_list_shipping_methods
- LOWin sparklayer_list_price_list_prices
- LOWin sparklayer_list_stock_locations
Basierend auf einer automatisierten Analyse der Tool-Definitionen und der Einhaltung des Protokolls.
Kontextkosten
Dies ist die ungefähre Anzahl der Tokens, die jedes Mal verbraucht werden, wenn die Tools des Servers in den Kontext eines Modells geladen werden. Höhere Werte verringern die Aufmerksamkeit, die für andere Aufgaben verfügbar ist.
Installieren
Installation mit einem Klick
Fügen Sie dies Ihrer Datei `claude_desktop_config.json` hinzu:
{
"mcpServers": {
"sparklayer": {
"url": "https://sparklayer.usefulapi.io/mcp"
}
}
}Remote-Endpunkte
https://sparklayer.usefulapi.io/mcpstreamable-httpWas es kann
Tool-Inventar
Tools (25)
🟢sparklayer_list_customer_roles
List the customer roles of the site. Good first call before creating or updating customers. SparkLayer API: GET /api/v2/customer-roles.
Eingabe-Schema
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sparklayer_get_customer(lookupBy, identifier)
Get one customer by SparkLayer id, platform id or email: group, role, price lists, status and default addresses. SparkLayer API: GET /api/v2/customers/{lookupBy}/{identifier}.
Eingabe-Schema
{
"type": "object",
"properties": {
"lookupBy": {
"type": "string",
"enum": [
"sparklayer",
"platform",
"email"
],
"description": "Which identifier you pass: the SparkLayer id, the platform (store) id, or the email address."
},
"identifier": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "The customer identifier, of the kind set by lookupBy."
}
},
"required": [
"lookupBy",
"identifier"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴sparklayer_upsert_customer(lookupBy, identifier, customer)
WRITE: create a customer, or replace an existing one. The body must hold the identifier from the URL (external_id for platform, email for email, id for a SparkLayer UUID) and the required fields external_id, email, first_name, last_name, status, group and role. Replacing a customer can change its prices and access. SparkLayer API: PUT /api/v2/customers/{lookupBy}/{identifier}.
Eingabe-Schema
{
"type": "object",
"properties": {
"lookupBy": {
"type": "string",
"enum": [
"sparklayer",
"platform",
"email"
],
"description": "Which identifier you pass: the SparkLayer id, the platform (store) id, or the email address."
},
"identifier": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "The customer identifier, of the kind set by lookupBy."
},
"customer": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {},
"description": "The customer body, as the SparkLayer CustomerPutRequest schema defines it."
}
},
"required": [
"lookupBy",
"identifier",
"customer"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sparklayer_list_customer_addresses(lookupBy, identifier)
List the delivery and billing addresses of one customer. SparkLayer API: GET /api/v2/customers/{lookupBy}/{identifier}/addresses.
Eingabe-Schema
{
"type": "object",
"properties": {
"lookupBy": {
"type": "string",
"enum": [
"sparklayer",
"platform",
"email"
],
"description": "Which identifier you pass: the SparkLayer id, the platform (store) id, or the email address."
},
"identifier": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "The customer identifier, of the kind set by lookupBy."
}
},
"required": [
"lookupBy",
"identifier"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sparklayer_list_shopping_lists(lookupBy, identifier, section_id)
List the shopping lists of one customer, optionally for one section. SparkLayer API: GET /api/v2/customers/{lookupBy}/{identifier}/shopping-lists.
Eingabe-Schema
{
"type": "object",
"properties": {
"lookupBy": {
"type": "string",
"enum": [
"sparklayer",
"platform",
"email"
],
"description": "Which identifier you pass: the SparkLayer id, the platform (store) id, or the email address."
},
"identifier": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "The customer identifier, of the kind set by lookupBy."
},
"section_id": {
"description": "With a section, also returns the customer's own lists that belong to no location.",
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"lookupBy",
"identifier"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sparklayer_list_companies(page, page_size, search_term, sales_agent_group)
List the B2B companies of the site, with search and a sales-agent filter. Paged: use page and page_size. SparkLayer API: GET /api/v2/companies.
Eingabe-Schema
{
"type": "object",
"properties": {
"page": {
"description": "Page number (starts at 1).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"page_size": {
"description": "Items per page (up to 250).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 250
},
"search_term": {
"description": "Free text to search company names.",
"type": "string",
"maxLength": 200
},
"sales_agent_group": {
"description": "Only companies of this sales-agent group.",
"type": "string",
"maxLength": 200
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sparklayer_get_company(lookupBy, identifier, include_archived)
Get one company by SparkLayer id, platform id or integration id, with its settings. SparkLayer API: GET /api/v2/companies/{lookupBy}/{identifier}.
Eingabe-Schema
{
"type": "object",
"properties": {
"lookupBy": {
"type": "string",
"enum": [
"sparklayer",
"platform",
"integration"
],
"description": "Which identifier you pass: the SparkLayer id, the platform id, or the integration id."
},
"identifier": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "The company identifier, of the kind set by lookupBy."
},
"include_archived": {
"description": "true = include archived companies.",
"type": "boolean"
}
},
"required": [
"lookupBy",
"identifier"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sparklayer_list_company_sections(lookupBy, identifier, leafOnly, include_archived)
List the sections (sub-accounts, buying departments) of one company. SparkLayer API: GET /api/v2/companies/{lookupBy}/{identifier}/sections.
Eingabe-Schema
{
"type": "object",
"properties": {
"lookupBy": {
"type": "string",
"enum": [
"sparklayer",
"platform",
"integration"
],
"description": "Which identifier you pass: the SparkLayer id, the platform id, or the integration id."
},
"identifier": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "The company identifier, of the kind set by lookupBy."
},
"leafOnly": {
"description": "true = only the sections that have no child sections.",
"type": "boolean"
},
"include_archived": {
"description": "true = include archived sections.",
"type": "boolean"
}
},
"required": [
"lookupBy",
"identifier"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sparklayer_list_customer_groups
List every customer group of the site, with its parent group. SparkLayer API: GET /api/v1/customer-groups.
Eingabe-Schema
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sparklayer_list_discounts
List the discounts of the site that are not deleted: rules, priorities and the customer groups they apply to. SparkLayer API: GET /api/v1/discounts.
Eingabe-Schema
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sparklayer_get_discount(discount_id)
Get one discount by its UUID, with its rules and customer groups. SparkLayer API: GET /api/v1/discounts/{id}.
Eingabe-Schema
{
"type": "object",
"properties": {
"discount_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "A SparkLayer UUID."
}
},
"required": [
"discount_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sparklayer_list_global_settings
List the global settings of the site as key and value pairs (for example minimum order rules). SparkLayer API: GET /api/v1/settings.
Eingabe-Schema
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sparklayer_get_cart(cart_id)
Get one cart by its UUID: line items, addresses, totals and status. SparkLayer API: GET /api/v1/carts/{id}.
Eingabe-Schema
{
"type": "object",
"properties": {
"cart_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "A SparkLayer UUID."
}
},
"required": [
"cart_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sparklayer_list_shipping_methods
List the shipping methods of the site, with their locations, groups and price bands. SparkLayer API: GET /api/v2/shipping-methods.
Eingabe-Schema
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sparklayer_list_price_lists(page, page_size, order_by, source)
List the price lists of the site (custom, platform or integration), with currency and adjustment rules. Paged: use page and page_size. SparkLayer API: GET /api/v2/price-lists.
Eingabe-Schema
{
"type": "object",
"properties": {
"page": {
"description": "Page number (starts at 1).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"page_size": {
"description": "Items per page (up to 250).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 250
},
"order_by": {
"description": "Field to sort by, as the SparkLayer API defines it.",
"type": "string",
"maxLength": 100
},
"source": {
"description": "Only price lists from this source.",
"type": "string",
"enum": [
"custom",
"integration",
"platform"
]
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sparklayer_get_price_list(slug)
Get one price list by its slug: currency, source and adjustment rules. SparkLayer API: GET /api/v1/price-lists/{slug}.
Eingabe-Schema
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "The price list slug, for example b2b_gb_gbp_123."
}
},
"required": [
"slug"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sparklayer_list_price_list_prices(slug, offset, limit)
List the prices stored on one price list (one entry per SKU and quantity break), in pages. Prices that the list's rules derive are not included. Returns total and the rows at offset; use offset to page through a long list. SparkLayer API: GET /api/v1/price-lists/{slug}/pricing.
Eingabe-Schema
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "The price list slug."
},
"offset": {
"description": "Rows to skip (default 0).",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"limit": {
"description": "Rows to return (default 200, up to 500).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 500
}
},
"required": [
"slug"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sparklayer_get_sku_prices(sku)
Get the prices of one product SKU in every price list that holds it. SparkLayer API: GET /api/v1/pricing/{sku}.
Eingabe-Schema
{
"type": "object",
"properties": {
"sku": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "The product SKU (products are matched by SKU). A slash is allowed."
}
},
"required": [
"sku"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sparklayer_list_purchases(limit, offset, order_by, order_direction, status, ...)
List orders, quotes and carts of the site, with filters for status, customer and last-updated dates. Paged by limit and offset: stop when a page has fewer results than limit. SparkLayer API: GET /api/v1/purchases.
Eingabe-Schema
{
"type": "object",
"properties": {
"limit": {
"description": "Results per page (up to 500).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 500
},
"offset": {
"description": "Results to skip.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"order_by": {
"type": "string",
"enum": [
"created_at",
"updated_at",
"placed_at",
"calculated_submitted_at",
"shipping_requested_date",
"last_message_at",
"awaiting_reply_since"
]
},
"order_direction": {
"type": "string",
"enum": [
"asc",
"desc"
]
},
"status": {
"description": "Only purchases in this status.",
"type": "string",
"enum": [
"incoming",
"processing",
"shipped",
"part_shipped",
"cancelled",
"returned",
"part_returned",
"varied"
]
},
"search": {
"description": "Free text search.",
"type": "string",
"maxLength": 200
},
"customer_sparklayer_id": {
"description": "Only purchases of this customer (SparkLayer customer id).",
"type": "string",
"maxLength": 200
},
"updated_from": {
"description": "Only purchases last updated on or after this date (yyyy-mm-dd or ISO 8601).",
"type": "string",
"maxLength": 40
},
"updated_to": {
"description": "Only purchases last updated on or before this date (yyyy-mm-dd or ISO 8601).",
"type": "string",
"maxLength": 40
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sparklayer_get_purchase(lookupBy, identifier)
Get one purchase (order, quote or cart) by one of its identifiers: lines, addresses, totals and status. SparkLayer API: GET /api/v1/purchases/{lookupBy}/{identifier}.
Eingabe-Schema
{
"type": "object",
"properties": {
"lookupBy": {
"type": "string",
"enum": [
"sparklayer",
"platform",
"internal",
"visible"
],
"description": "Which purchase identifier you pass."
},
"identifier": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "The purchase identifier, of the kind set by lookupBy."
}
},
"required": [
"lookupBy",
"identifier"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sparklayer_get_store_currency
Get the currency code of the store. SparkLayer API: GET /api/v1/store-currency.
Eingabe-Schema
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sparklayer_get_stock_levels(skus, stock_location_ids, all_stock_locations)
Read the stock levels of up to many SKUs, in all stock locations or in the given ones. Uses POST only to send the SKU list; it changes nothing. SparkLayer API: POST /api/v1/batch-fetch-stock.
Eingabe-Schema
{
"type": "object",
"properties": {
"skus": {
"minItems": 1,
"maxItems": 200,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": "The product SKUs to read (up to 200)."
},
"stock_location_ids": {
"description": "Only these stock locations.",
"maxItems": 100,
"type": "array",
"items": {
"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)$",
"description": "A SparkLayer UUID."
}
},
"all_stock_locations": {
"description": "true = all stock locations (default when no location is given).",
"type": "boolean"
}
},
"required": [
"skus"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sparklayer_list_stock_locations
List the stock locations (warehouses, shops) of the site. SparkLayer API: GET /api/v1/stock-locations.
Eingabe-Schema
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴sparklayer_update_stock_levels(updates)
WRITE: set the stock level of SKUs in stock locations. Each level replaces the current value, so a repeat call with the same values changes nothing more. SparkLayer API: POST /api/v1/batch-update-stock.
Eingabe-Schema
{
"type": "object",
"properties": {
"updates": {
"minItems": 1,
"maxItems": 500,
"type": "array",
"items": {
"type": "object",
"properties": {
"stock_location_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "A SparkLayer UUID."
},
"sku": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"stock_level": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "The new stock level (replaces the old value)."
},
"restock_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"min_stock_level": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"stock_location_id",
"sku",
"stock_level"
]
},
"description": "The stock levels to set (up to 500 per call)."
}
},
"required": [
"updates"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sparklayer_get_sync_status(integration, data_type)
Get the last full and partial sync times, success flag and error count of one integration and data type. SparkLayer API: GET /api/v1/sync-log/{integration}/{data_type}.
Eingabe-Schema
{
"type": "object",
"properties": {
"integration": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "The integration name, as the integration registered it."
},
"data_type": {
"type": "string",
"enum": [
"products",
"customers",
"merchant",
"purchases",
"pricing",
"accountancy",
"companies",
"company_location",
"company_contact"
]
}
},
"required": [
"integration",
"data_type"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}Community
Nachweis