Skip to main content
Glama
taurgis

SFCC Development MCP Server

by taurgis

get_available_best_practice_guides

Discover available SFCC best practice guides for cartridge creation, hooks, controllers, and custom endpoints to implement Salesforce B2C Commerce Cloud features effectively.

Instructions

Get a list of all available SFCC best practice and how-to guides. Use this first to discover what guidance is available before implementing any SFCC features. Essential for understanding what best practice resources exist for cartridge creation, hooks, controllers, and custom endpoints

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler configuration defining the exec function for 'get_available_best_practice_guides' which delegates to SFCCBestPracticesClient.getAvailableGuides()
    get_available_best_practice_guides: {
      defaults: (args: ToolArguments) => args,
      validate: (_args: ToolArguments, _toolName: string) => {
        // No validation needed for list operation
      },
      exec: async (_args: ToolArguments, context: ToolExecutionContext) => {
        const client = context.bestPracticesClient as SFCCBestPracticesClient;
        return client.getAvailableGuides();
      },
      logMessage: (_args: ToolArguments) => 'List guides',
    },
  • Tool schema definition including name, description, and empty input schema (no parameters required)
    {
      name: 'get_available_best_practice_guides',
      description: 'Get a list of all available SFCC best practice and how-to guides. Use this first to discover what guidance is available before implementing any SFCC features. Essential for understanding what best practice resources exist for cartridge creation, hooks, controllers, and custom endpoints',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Core implementation of getAvailableGuides() in SFCCBestPracticesClient, returning a hardcoded list of available best practice guides with caching
    async getAvailableGuides(): Promise<Array<{name: string; title: string; description: string}>> {
      const cacheKey = 'best-practices:available-guides';
      const cached = this.cache.getSearchResults(cacheKey);
      if (cached) {return cached;}
    
      const guides = [
        {
          name: 'cartridge_creation',
          title: 'Cartridge Creation Best Practices',
          description: 'Instructions and best practices for creating, configuring, and deploying custom SFRA cartridges',
        },
        {
          name: 'isml_templates',
          title: 'ISML Templates Best Practices',
          description: 'Comprehensive best practices for developing ISML templates within the SFRA framework, including security, performance, and maintainability guidelines',
        },
        {
          name: 'job_framework',
          title: 'Job Framework Best Practices',
          description: 'Comprehensive guide for developing custom jobs in the SFCC Job Framework, covering both task-oriented and chunk-oriented approaches with performance optimization and debugging strategies',
        },
        {
          name: 'localserviceregistry',
          title: 'LocalServiceRegistry Best Practices',
          description: 'Comprehensive guide for creating server-to-server integrations in SFCC using dw.svc.LocalServiceRegistry, including configuration patterns, callback implementation, OAuth flows, and reusable service module patterns',
        },
        {
          name: 'ocapi_hooks',
          title: 'OCAPI Hooks Best Practices',
          description: 'Best practices for implementing OCAPI hooks in Salesforce B2C Commerce Cloud',
        },
        {
          name: 'scapi_hooks',
          title: 'SCAPI Hooks Best Practices',
          description: 'Essential best practices for implementing SCAPI hooks with AI development assistance',
        },
        {
          name: 'scapi_custom_endpoint',
          title: 'Custom SCAPI Endpoint Best Practices',
          description: 'Best practices for creating custom SCAPI endpoints in B2C Commerce Cloud',
        },
        {
          name: 'sfra_controllers',
          title: 'SFRA Controllers Best Practices',
          description: 'Best practices and code patterns for developing SFRA controllers',
        },
        {
          name: 'sfra_models',
          title: 'SFRA Models Best Practices',
          description: 'Best practices for developing SFRA models in Salesforce B2C Commerce Cloud',
        },
        {
          name: 'sfra_client_side_js',
          title: 'SFRA Client-Side JavaScript Best Practices',
          description: 'Comprehensive patterns for architecting, extending, validating, and optimizing client-side JavaScript in SFRA storefronts using jQuery',
        },
        {
          name: 'sfra_scss',
          title: 'SFRA SCSS Best Practices',
          description: 'Implementation-focused SCSS override strategies for SFRA storefronts covering cartridge overlays, theming tokens, responsive mixins, and plugin extension guardrails',
        },
        {
          name: 'performance',
          title: 'Performance and Stability Best Practices',
          description: 'Comprehensive performance optimization strategies, coding standards, and stability guidelines for SFCC development including caching, index-friendly APIs, and job development',
        },
        {
          name: 'security',
          title: 'Security Best Practices',
          description: 'Comprehensive security best practices for SFCC development covering SFRA Controllers, OCAPI/SCAPI Hooks, and Custom SCAPI Endpoints with OWASP compliance guidelines',
        },
      ];
    
      this.cache.setSearchResults(cacheKey, guides);
      return guides;
    }
  • BestPracticesToolHandler registers all best practices tools including 'get_available_best_practice_guides' by checking tool names and providing the tool config and client context for execution
    /**
     * Handler for SFCC best practices tools using config-driven dispatch
     * Provides access to development guides, security recommendations, and hook references
     */
    export class BestPracticesToolHandler extends BaseToolHandler<BestPracticeToolName> {
      private bestPracticesClient: SFCCBestPracticesClient | null = null;
    
      constructor(context: HandlerContext, subLoggerName: string) {
        super(context, subLoggerName);
      }
    
      protected async onInitialize(): Promise<void> {
        if (!this.bestPracticesClient) {
          this.bestPracticesClient = new SFCCBestPracticesClient();
          this.logger.debug('Best practices client initialized');
        }
      }
    
      protected async onDispose(): Promise<void> {
        this.bestPracticesClient = null;
        this.logger.debug('Best practices client disposed');
      }
    
      canHandle(toolName: string): boolean {
        return BEST_PRACTICE_TOOL_NAMES_SET.has(toolName as BestPracticeToolName);
      }
    
      protected getToolNameSet(): Set<BestPracticeToolName> {
        return BEST_PRACTICE_TOOL_NAMES_SET;
      }
    
      protected getToolConfig(): Record<string, GenericToolSpec<ToolArguments, any>> {
        return BEST_PRACTICES_TOOL_CONFIG;
      }
    
      protected async createExecutionContext(): Promise<ToolExecutionContext> {
        if (!this.bestPracticesClient) {
          throw new Error('Best practices client not initialized');
        }
    
        return {
          handlerContext: this.context,
          logger: this.logger,
          bestPracticesClient: this.bestPracticesClient,
        };
      }
    }
Behavior3/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 describes the tool's behavior as retrieving a list for discovery purposes, which is clear. However, it lacks details on behavioral traits like response format, pagination, rate limits, or error handling. For a read-only tool with no annotations, this is adequate but leaves gaps.

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

Conciseness5/5

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

The description is front-loaded with the core purpose in the first sentence, followed by usage guidance. Every sentence adds value without redundancy, and it is appropriately sized for the tool's complexity. There is no wasted text.

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?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is largely complete for its purpose. It explains what the tool does and when to use it. However, without an output schema, it could benefit from mentioning the return format (e.g., list of guide titles or metadata), but this is a minor gap.

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?

The tool has 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description appropriately does not discuss parameters, focusing instead on the tool's purpose and usage. A baseline of 4 is applied for zero parameters, as it avoids unnecessary details.

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?

The description clearly states the specific action ('Get a list') and resource ('all available SFCC best practice and how-to guides'), distinguishing it from siblings like get_best_practice_guide (which retrieves a specific guide) and search_best_practices (which searches within guides). It explicitly mentions the scope of resources (cartridge creation, hooks, controllers, custom endpoints).

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?

The description provides explicit guidance on when to use this tool ('Use this first to discover what guidance is available before implementing any SFCC features') and its purpose ('Essential for understanding what best practice resources exist'). It distinguishes it from siblings by implying this is for discovery rather than retrieval or search of specific content.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/taurgis/sfcc-dev-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server