Skip to main content
Glama
taurgis

SFCC Development MCP Server

by taurgis

get_sfra_documents_by_category

Retrieve SFRA documentation filtered by functional categories like core classes, product models, order/cart functionality, customer management, pricing, or store models to explore related documentation and understand functional groupings.

Instructions

Get SFRA documents filtered by category. Use this to explore documents in specific functional areas like core SFRA classes, product models, order/cart functionality, customer management, pricing, or store models. Perfect for discovering related documentation and understanding functional groupings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryYesCategory to filter by: core (Server, Request, Response, etc.), product (product models), order (cart, billing, shipping), customer (account, address), pricing (price models), store (store models), other (utilities)

Implementation Reference

  • The tool handler configuration defining validation, defaults, execution logic (delegates to SFRAClient), and logging for get_sfra_documents_by_category.
    get_sfra_documents_by_category: {
      defaults: (args: ToolArguments) => args,
      validate: (args: ToolArguments, toolName: string) => {
        ValidationHelpers.validateArguments(args, CommonValidations.requiredString('category'), toolName);
      },
      exec: async (args: ToolArguments, context: ToolExecutionContext) => {
        const client = context.sfraClient as SFRAClient;
        return client.getDocumentsByCategory(args.category as string);
      },
      logMessage: (args: ToolArguments) => `SFRA docs by category ${args.category}`,
    },
  • MCP tool schema definition with inputSchema specifying the required 'category' parameter and its enum values.
    {
      name: 'get_sfra_documents_by_category',
      description: 'Get SFRA documents filtered by category. Use this to explore documents in specific functional areas like core SFRA classes, product models, order/cart functionality, customer management, pricing, or store models. Perfect for discovering related documentation and understanding functional groupings.',
      inputSchema: {
        type: 'object',
        properties: {
          category: {
            type: 'string',
            enum: ['core', 'product', 'order', 'customer', 'pricing', 'store', 'other'],
            description: 'Category to filter by: core (Server, Request, Response, etc.), product (product models), order (cart, billing, shipping), customer (account, address), pricing (price models), store (store models), other (utilities)',
          },
        },
        required: ['category'],
      },
    },
  • Registration of all tool handlers including SFRAToolHandler (line 103) which handles get_sfra_documents_by_category and other SFRA tools.
    this.handlers = [
      new LogToolHandler(context, 'Log'),
      new JobLogToolHandler(context, 'JobLog'),
      new DocsToolHandler(context, 'Docs'),
      new BestPracticesToolHandler(context, 'BestPractices'),
      new SFRAToolHandler(context, 'SFRA'),
      new SystemObjectToolHandler(context, 'SystemObjects'),
      new CodeVersionToolHandler(context, 'CodeVersions'),
      new CartridgeToolHandler(context, 'Cartridge'),
    ];
  • Helper method in SFRAClient that implements the core filtering logic by category from available documents.
    async getDocumentsByCategory(category: string): Promise<SFRADocumentSummary[]> {
      const allDocuments = await this.getAvailableDocuments();
      return allDocuments.filter(doc => doc.category === category);
    }
  • SFRA tool handler class that manages SFRAClient and dispatches to tool configs based on tool name.
    export class SFRAToolHandler extends BaseToolHandler<SFRAToolName> {
      private sfraClient: SFRAClient | null = null;
    
      constructor(context: HandlerContext, subLoggerName: string) {
        super(context, subLoggerName);
      }
    
      protected async onInitialize(): Promise<void> {
        if (!this.sfraClient) {
          this.sfraClient = new SFRAClient();
          this.logger.debug('SFRA client initialized');
        }
      }
    
      protected async onDispose(): Promise<void> {
        this.sfraClient = null;
        this.logger.debug('SFRA client disposed');
      }
    
      canHandle(toolName: string): boolean {
        return SFRA_TOOL_NAMES_SET.has(toolName as SFRAToolName);
      }
    
      protected getToolNameSet(): Set<SFRAToolName> {
        return SFRA_TOOL_NAMES_SET;
      }
    
      protected getToolConfig(): Record<string, GenericToolSpec<ToolArguments, any>> {
        return SFRA_TOOL_CONFIG;
      }
    
      protected async createExecutionContext(): Promise<ToolExecutionContext> {
        if (!this.sfraClient) {
          throw new Error('SFRA client not initialized');
        }
    
        return {
          handlerContext: this.context,
          logger: this.logger,
          sfraClient: this.sfraClient,
        };
      }
    }
Behavior2/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 of behavioral disclosure. While it mentions the tool 'gets' documents (implying a read operation), it does not disclose any behavioral traits such as rate limits, authentication needs, pagination, or what the return format looks like. For a tool with no annotation coverage, this leaves significant gaps in understanding how it behaves.

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 appropriately sized and front-loaded, with two sentences that efficiently convey purpose and usage without waste. Every sentence earns its place by providing essential information about the tool's function and context.

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

Completeness3/5

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

Given the tool has no annotations, no output schema, and a simple single parameter with full schema coverage, the description is adequate but incomplete. It covers purpose and usage well but lacks details on behavioral aspects like return values or operational constraints, which are important for a tool with no structured data to compensate.

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

Parameters3/5

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

The schema description coverage is 100%, with the parameter 'category' fully documented in the input schema including its enum values and descriptions. The description adds minimal value beyond the schema by mentioning examples of functional areas, but does not provide additional syntax, format details, or constraints. Baseline score of 3 is appropriate as the schema does the heavy lifting.

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 tool's purpose with specific verb ('Get') and resource ('SFRA documents'), and distinguishes it from siblings by specifying filtering by category. It explicitly mentions functional areas like core SFRA classes, product models, etc., making the purpose highly specific and differentiated.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool ('to explore documents in specific functional areas' and 'for discovering related documentation and understanding functional groupings'), but does not explicitly mention when not to use it or name alternative tools. It implies usage for category-based exploration without stating exclusions.

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