Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
HAC_URLNoThe target SAP Commerce Cloud instance URL (e.g. https://localhost:9002).
HAC_PASSNoThe password for SAP Commerce Cloud HAC authentication (e.g. nimda).
HAC_USERNoThe username for SAP Commerce Cloud HAC authentication (e.g. admin).
PYTHONUNBUFFEREDNoPython unbuffered output setting (e.g. 1).

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

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
hac_configureC

Configures the target SAP Commerce HAC instance and credentials.

hac_statusA

Checks the current status and authentication of the configured HAC connection.

hac_sso_loginA

Launches a headed browser window for the user to complete SAP internal SSO authentication.

hac_flexsearchC

Executes a FlexibleSearch SQL query on the SAP Commerce database.

hac_impex_importC

Imports an ImpEx script into the SAP Commerce instance. Automatically archives successful scripts to script library.

hac_groovy_executeC

Executes a Groovy script in the HAC Scripting Console. Automatically archives successful scripts to script library.

hac_scaffold_greenfield_siteA

Scaffolds a complete greenfield SAP Commerce site, BaseStore, ProductCatalog, OCC headless URL patterns, OAuth clients, and optional B2B organization hierarchy.

⚠️ IMPORTANT — Full Zero-to-Live Pipeline Orchestration: When a user asks to "build a site from scratch" or "从零建站", this tool is only STEP 1 of a mandatory 7-step pipeline. After calling this tool, the AI agent MUST automatically continue executing ALL remaining steps WITHOUT waiting for further user instructions:

Step 1: hac_scaffold_greenfield_site → Create BaseSite, BaseStore, Catalogs, OAuth Step 2: hac_ingest_external_storefront → If source_url is provided, crawl the website to extract product categories, product names, descriptions, prices, images, and attributes, then auto-generate and import ImpEx Step 3: hac_impex_import → (If user provides CSV/Excel/ImpEx instead of URL) Step 4: hac_groovy_execute → Bind product images from CDN/S3/crawled URLs Step 5: hac_catalog_sync → Sync ProductCatalog from Staged to Online Step 6: hac_solr_reindex → Full Solr reindex to make products searchable Step 7: hac_spartacus_doctor + hac_storefront_autofix → Diagnose and auto-heal the headless Spartacus storefront (CORS, OAuth, OCC URL patterns)

The user should only need to provide:

  • Customer name (site_name)

  • B2B or B2C (channel)

  • Currencies and languages

  • The customer's existing website URL (source_url) — optional, for product crawling

Everything else is automatic. Do NOT ask the user to manually specify each step.

Args: site_id: Unique site identifier (e.g. 'apac-beverages') site_name: Human-readable site name (e.g. 'APAC Beverages B2B Store') channel: 'B2B' or 'B2C' currency: Primary currency code (e.g. 'HKD', 'USD', 'CNY') languages: List of language codes (e.g. ['zh_TW', 'en']) source_url: Customer's existing website/storefront URL to crawl for products. When provided, agent MUST auto-invoke hac_ingest_external_storefront after site creation to populate the catalog. storefront_origin: Spartacus frontend origin for CORS configuration content_catalog: Custom content catalog ID (auto-generated if omitted) delivery_countries: List of delivery country codes setup_b2b_org: Whether to scaffold B2B org hierarchy (only when channel='B2B') monthly_budget: B2B cost center monthly budget amount approval_threshold: B2B order approval threshold amount

hac_site_listC

Lists all CMSSites in the SAP Commerce instance with their BaseStore, ProductCatalog, ContentCatalogs, Languages, Currencies, and active status. Essential for enterprise multi-brand group governance.

hac_spartacus_doctorC

Performs a full headless readiness health check for a Spartacus storefront and Commerce Cloud BaseSite.

hac_b2b_scaffold_orgC

Scaffolds a complete, realistic B2B organization hierarchy with units, cost centers, budgets, permissions, and demo users.

hac_b2b_org_doctorC

Diagnoses a B2B user's organizational context (Unit, Cost Center, Budget, Approvers, Permissions) with language-aligned output.

hac_solr_reindexB

Triggers an immediate in-process Solr index build (FULL or UPDATE) bypassing cronjob queue delays.

hac_solr_statusA

Queries Solr search configurations and recent indexer cronjobs.

hac_catalog_syncC

Triggers synchronization from source catalog version to target catalog version.

hac_cache_clearA

Clears the Hybris Region Cache in real time to ensure modified data and CMS pages reflect immediately.

hac_check_i18n_completenessC

Scans for missing localized names/descriptions in target languages.

hac_ingest_external_storefrontA

Crawls an external storefront (Shopify, WooCommerce, Magento, or any public e-commerce site), extracts product catalog structure, product names, descriptions, prices, images, and attributes, normalizes them into SAP Commerce ImpEx format, imports them into the target ProductCatalog, syncs to Online, and reindexes Solr.

This is STEP 2 of the zero-to-live pipeline (automatically invoked after hac_scaffold_greenfield_site when the user provides a source_url).

After this tool completes, the agent should continue with:

  • hac_catalog_sync (if sync_online=False was set)

  • hac_solr_reindex (if reindex_solr=False was set)

  • hac_spartacus_doctor + hac_storefront_autofix (headless self-healing)

Args: site_url: The customer's existing website URL to crawl (e.g. 'https://shop.example.com') catalog_id: Target ProductCatalog ID to import products into max_products: Maximum number of products to extract (default 20) convert_to_b2b_cases: Convert product models to B2B unit-of-measure (cases/pallets) target_currency: Currency code for imported prices sync_online: Auto-sync Staged→Online after import (default True) reindex_solr: Auto-trigger full Solr reindex after import (default True)

hac_library_listB

Lists and searches verified successful scripts (ImpEx and Groovy) stored in the unified script library.

Args: script_type: Filter by 'impex' or 'groovy' (optional) category: Filter by category (e.g. 'b2b_organization', 'search_solr', 'cache_ops') client: Filter by customer/client name (optional) query: Search keyword across script names, tags, descriptions (optional)

hac_library_getB

Retrieves the complete content and metadata of a verified script from the unified script library.

Args: script_id: Unique identifier of the script (e.g. 'impex_20260911_115440_b2b_org_medical_mindray')

hac_self_improveA

Self-evolves the MCP by updating one of its own Python modules. Automatically creates a backup, runs syntax checks and full regression test suite. Rolls back immediately if tests fail.

Args: target_file: Relative filename within MCP directory (e.g. 'site_scaffolder.py', 'b2b_org_helper.py') description: Summary of the improvement, fix, or capability being added updated_code: Complete updated Python code for the target module

hac_self_diagnoseA

Runs a self-health audit on the SAP-Commerce-MCP server: checks regression test suite, counts archived scripts in unified library, and reviews learned best-practice rules.

hac_record_learningA

Records a newly discovered error pattern, solution, or best practice into the MCP's persistent knowledge base.

Args: pattern_name: Short title for the rule/pattern (e.g. 'B2BCostCenter Type Code') problem: Description of the obstacle, error, or symptom encountered solution: Exact fix, workaround, or ImpEx/Groovy snippet that solves it tags: Categorization tags (e.g. ['b2b', 'impex'])

hac_promotion_scaffoldA

Scaffolds, configures, and publishes a PromotionSourceRule in the SAP Commerce Drools Rule Engine.

Args: rule_code: Unique code for the promotion rule (e.g. 'promo_summer_sale_100') name: Business title/name of the promotion promo_type: Promotion pattern: - 'ORDER_THRESHOLD_DISCOUNT': Order threshold discount (spend X get fixed discount or percentage off) - 'ORDER_THRESHOLD_FREE_GIFT': Spend X get free gift SKU - 'BUNDLE_FREE_GIFT': Multi-product bundle (A+B+C) gets free gift - 'PRODUCT_DISCOUNT': Specific product percentage or fixed discount - 'POTENTIAL_MESSAGE': Upsell hint when cart has not reached threshold threshold_amount: Minimum cart total threshold (e.g. 500.0) currency: Currency code (e.g. 'USD', 'CNY', 'HKD', 'EUR') discount_amount: Fixed discount amount (e.g. 50.0) discount_percentage: Percentage discount (e.g. 10.0 for 10% off) qualifying_products: List of qualifying product codes (SKUs) gift_product: SKU of the free gift product gift_quantity: Quantity of the free gift product (default 1) target_rule_code: Target rule code to check execution for POTENTIAL_MESSAGE message_fired: User notification message when promotion executes promo_group: Target PromotionGroup identifier (default 'powertoolsPromoGrp') priority: Rule execution priority (default 150) compile_immediately: If True, triggers Drools rules-module compilation immediately (default True) lang: Output language ('zh' for Chinese, 'en' for English)

hac_promotion_listB

Lists and monitors active and draft PromotionSourceRules in SAP Commerce Cloud.

Args: promo_group: Filter by PromotionGroup identifier (optional) status: Filter by status ('PUBLISHED', 'UNPUBLISHED', 'MODIFIED', 'ALL') lang: Output language ('zh' or 'en')

hac_storefront_cms_scaffoldB

Scaffolds, customizes, and publishes CMS layout components for Composable Storefront (Spartacus).

Args: content_catalog: Target CMS Content Catalog (default 'powertools-spaContentCatalog') product_catalog: Target Product Catalog (default 'powertoolsProductCatalog') hero_title: Title text for the Hero announcement featured_products: List of product SKUs for the 'What's New' product carousel bestseller_products: List of product SKUs for the 'Bestsellers' product carousel banner_configs: List of banner dicts, each with 'uid', 'imageUrl', and optional 'urlLink' sync_online: If True, triggers synchronization from Staged to Online catalog (default True) clear_cache: If True, flushes Region Cache so changes reflect on storefront immediately (default True) lang: Output language ('zh' or 'en')

hac_storefront_autofixA

One-click automated repair for Composable Storefront (Spartacus) headless readiness issues:

  • Injects matching frontend origin regex into BaseSite.urlPatterns

  • Dynamically permits frontend origin in CORS (corsfilter.commercewebservices.allowedOrigins)

  • Verifies OAuth2 client credentials

  • Flushes Region Cache for real-time frontend routing

Args: site_id: Target BaseSite UID (e.g. 'powertools-spa') storefront_url: Frontend URL Origin (e.g. 'http://localhost:4200' or 'https://localhost:4200') lang: Output language ('zh' or 'en')

hac_storefront_app_configB

Inspects and aligns the local Composable Storefront Angular workspace configuration:

  • Synchronizes backend OCC CX_BASE_URL in .env-cmdrc

  • Aligns baseSite and multi-language routing in spartacus-b2b-configuration.providers.ts

  • Verifies B2B/B2C mode flags

Args: storefront_dir: Path to local Spartacus storefront repository backend_url: Target Commerce Cloud backend OCC URL (default 'https://localhost:9002') base_site: Target BaseSite UID (default 'powertools-spa') b2b_mode: Whether B2B mode is enabled (default True) lang: Output language ('zh' or 'en')

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.3/5.0

Scored across 27 tools

Disambiguation4/5

Most tools have clearly distinct purposes (e.g., hac_impex_import vs hac_groovy_execute) and are well differentiated by resource and action. A few pairs like hac_catalog_sync and hac_solr_reindex are distinct, but hac_self_diagnose and hac_self_improve both act on the MCP itself and could be confused; hac_storefront_autofix and hac_storefront_app_config are related but one repairs backend whereas the other aligns local config, with descriptions clarifying the difference. Overall, an agent can typically select the correct tool, though some boundaries require careful reading.

Naming Consistency5/5

All tool names consistently use the 'hac_' prefix followed by a snake_case verb_noun or noun pattern (e.g., hac_impex_import, hac_solr_reindex, hac_b2b_scaffold_org). The convention is predictable throughout, with no mixing of camelCase or alternative verb styles.

Tool Count3/5

27 tools is on the higher side for a single server, especially given the broad domain spanning HAC connection, scripting, catalog management, B2B, storefront, and self-improvement. While each tool appears to serve a distinct function, the count is borderline heavy and could lead to cognitive overload or misselection for an agent.

Completeness4/5

The tool set covers a broad lifecycle: connection setup (hac_configure, hac_status), scripting (hac_impex_import, hac_groovy_execute), site scaffolding (hac_scaffold_greenfield_site), catalog sync (hac_catalog_sync), Solr management (hac_solr_reindex, hac_solr_status), B2B operations (hac_b2b_scaffold_org, hac_b2b_org_doctor), promotions, storefront repair, and even self-improvement. Minor gaps exist, such as dedicated CRUD for catalog items or user management, but core workflows are well supported with minimal dead ends.

Maintenance

ActivityMaintained
ResponsivenessNo issues