Developer Preview — This project is in active development. APIs may change. Provide feedback
Skip to content

sfnext_get_guidelines

Returns critical architecture rules, coding standards, and best practices for building Storefront Next applications with React Server Components.

Note: 🚧 This MCP tool is for Storefront Next. Storefront Next is part of a closed pilot and isn't available for general use.

Overview

The sfnext_get_guidelines tool provides essential development guidance for Storefront Next. It:

  1. Returns comprehensive guidelines by default (quick-reference plus key sections).
  2. Supports retrieving specific topic sections on demand.
  3. Loads content from markdown files covering architecture, data fetching, components, testing, and more.

Important: This tool is the essential first step for Storefront Next development. Use it before writing any code to understand non-negotiable patterns for React Server Components, data loading, and framework constraints.

This tool is part of the STOREFRONTNEXT toolset and is auto-enabled for Storefront Next projects (detected by @salesforce/storefront-next* dependencies).

Parameters

ParameterTypeRequiredDefaultDescription
sectionsstring[]No['quick-reference', 'data-fetching', 'components', 'testing']Optional array of specific sections to retrieve. If not specified, returns comprehensive guidelines. Pass an empty array to return an empty string.

Available Sections

SectionTopics Covered
quick-referenceCritical rules, architecture principles, quick patterns
data-fetchingServer-only data loading (no client loaders), synchronous loaders for streaming, data fetching patterns
state-managementState management patterns
authAuthentication and session management
configConfiguration system
i18ni18n patterns and internationalization
componentsComponent best practices
stylingTailwind CSS 4, Shadcn/ui, styling guidelines
page-designerPage Designer integration
performancePerformance optimization
testingTesting strategies
extensionsFramework extensions
pitfallsCommon pitfalls to avoid

Usage Examples

Default (Comprehensive Guidelines)

Get the default comprehensive set (quick-reference, data-fetching, components, testing):

Use the MCP tool to get Storefront Next development guidelines before I start coding.

Single Section

Retrieve a specific topic:

Use the MCP tool to get Storefront Next guidelines for data-fetching patterns.

Combine related sections in one call:

Use the MCP tool to get Storefront Next guidelines for data-fetching, components, and performance.

All Sections

Retrieve all available sections:

Use the MCP tool to get all Storefront Next development guidelines.

Output

Returns text content with guidelines for the requested section(s):

  • Single section: Returns content directly (no separators or instructions).
  • Multiple sections: Returns content with --- separators between sections, prefixed with instructions to display full content without summarization.

The returned content includes:

  • Critical rules and best practices
  • Code examples (correct ✅ and incorrect ❌ patterns)
  • Quick reference snippets
  • Framework-specific patterns for React Server Components

See Also

Released under the Apache-2.0 License.