Skip to main content
Glama

hac_storefront_autofix

Fix SAP Composable Storefront headless readiness by injecting BaseSite URL patterns, permitting CORS origins, verifying OAuth2 credentials, and flushing Region Cache.

Instructions

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')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
langNozh
site_idNopowertools-spa
storefront_urlNohttp://localhost:4200

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the exact artifacts mutated (BaseSite.urlPatterns, CORS allowedOrigins, OAuth2 client credentials, Region Cache flush), which signals persistent config writes and a cache side effect. It omits prerequisites such as required admin/HAC authorization, idempotency, and reversibility, keeping it short of a 5.

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 with the purpose followed by a scannable bullet list of effects and a compact Args block. Every line earns its place, though the Args section partially duplicates the schema's property titles.

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?

An output schema exists, so return values need no explanation, and the description covers the mutation surface for this compound repair tool. The remaining gap is authorization/prerequisite context for a multi-step write operation with no annotations.

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

Parameters4/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, and it does: it maps site_id to a BaseSite UID, storefront_url to a frontend URL origin, and supplies concrete example values plus the accepted lang values ('zh' or 'en'), effectively adding the enum the schema lacks. It does not note that all three are optional/defaulted.

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 specific verb (automated repair) and resource (Composable Storefront/Spartacus headless readiness), then enumerates the four concrete mutations it performs. An agent can distinguish it from hac_spartacus_doctor (diagnose) and hac_storefront_app_config (configuration) without opening any schema.

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

Usage Guidelines3/5

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

Usage is implied by 'one-click automated repair for ... readiness issues', giving a clear triggering condition. However, it names no alternatives or exclusions, so the agent must infer when to prefer hac_spartacus_doctor first or hac_cache_clear separately.

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