Skip to main content
Glama

hac_scaffold_greenfield_site

Scaffold a complete greenfield SAP Commerce site with BaseStore, ProductCatalog, OCC headless URLs, OAuth clients, and optional B2B org hierarchy to launch a new B2B or B2C storefront.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelNoB2B
site_idYes
currencyNoUSD
languagesNo
site_nameYes
source_urlNo
setup_b2b_orgNo
monthly_budgetNo
content_catalogNo
storefront_originNohttp://localhost:4200
approval_thresholdNo
delivery_countriesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden; it discloses the concrete side effects (creates BaseSite, BaseStore, Catalogs, OAuth clients, optional B2B org hierarchy) and the mandatory downstream orchestration. It omits idempotency/re-run behavior and any auth or permission prerequisites (e.g., whether hac_sso_login must precede it), leaving a gap for a 12-param mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded summary, warning callout, numbered pipeline, then args — a clean structure. It is long, and the closing 'Everything else is automatic / Do NOT ask the user' pair is mildly redundant with the pipeline block, but each section carries actionable content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 12-parameter, no-annotation orchestration tool with an output schema (so return values needn't be described), the definition covers purpose, inputs, and downstream sequence thoroughly. It stops short of stating prerequisites like SSO/auth and conflict handling on re-scaffold, which would complete the picture.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate fully and it does: the Args block documents all 12 parameters with meaning, examples ('apac-beverages', 'HKD', ['zh_TW','en']) and conditional logic (setup_b2b_org only when channel='B2B'; source_url triggers auto-invocation of hac_ingest_external_storefront).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a precise verb+resource: 'Scaffolds a complete greenfield SAP Commerce site, BaseStore, ProductCatalog, OCC headless URL patterns, OAuth clients, and optional B2B organization hierarchy.' The 'greenfield' qualifier and enumerated artifacts distinguish it from siblings like hac_b2b_scaffold_org and hac_storefront_cms_scaffold.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly frames itself as 'STEP 1 of a mandatory 7-step pipeline' triggered by 'build a site from scratch' / '从零建站', names the exact inputs the user must supply, and routes to the correct sibling tools for each subsequent step. An agent knows both when to invoke it and what must follow.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.