Skip to main content
Glama
taurgis

SFCC Development MCP Server

by taurgis

get_sfcc_class_documentation

Retrieve in-depth SFCC class documentation, including examples and detailed descriptions, to gain comprehensive insights when basic class information is insufficient. Ideal for SFCC developers seeking full context for enhanced understanding.

Instructions

Get the complete raw documentation for an SFCC class. Use this when you need comprehensive details about a class including examples, detailed descriptions, and full context. Best for in-depth understanding when the basic class info isn't sufficient.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
classNameYesThe SFCC class name

Implementation Reference

  • Handler configuration for the get_sfcc_class_documentation tool, including validation and execution logic that fetches raw class documentation via SFCCDocumentationClient
    get_sfcc_class_documentation: { defaults: (args: ToolArguments) => args, validate: (args: ToolArguments, toolName: string) => { ValidationHelpers.validateArguments(args, CommonValidations.requiredString('className'), toolName); }, exec: async (args: ToolArguments, context: ToolExecutionContext) => { const client = context.docsClient as SFCCDocumentationClient; const result = await client.getClassDocumentation(args.className as string); if (!result) { throw new Error(`Documentation for class "${args.className}" not found`); } return result; }, logMessage: (args: ToolArguments) => `Raw doc ${args.className}`, },
  • Tool schema definition with input schema, description, and parameters for get_sfcc_class_documentation
    { name: 'get_sfcc_class_documentation', description: "Get the complete raw documentation for an SFCC class. Use this when you need comprehensive details about a class including examples, detailed descriptions, and full context. Best for in-depth understanding when the basic class info isn't sufficient.", inputSchema: { type: 'object', properties: { className: { type: 'string', description: 'The SFCC class name', }, }, required: ['className'], }, },
  • Registration of all tool handlers in the MCP server, including DocsToolHandler which handles get_sfcc_class_documentation
    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'), ];
  • Registration of SFCC documentation tools (including get_sfcc_class_documentation schema) in the ListTools handler
    tools.push(...SFCC_DOCUMENTATION_TOOLS); tools.push(...BEST_PRACTICES_TOOLS); tools.push(...SFRA_DOCUMENTATION_TOOLS); tools.push(...CARTRIDGE_GENERATION_TOOLS); // Conditional tools based on available capabilities if (this.capabilities.canAccessLogs) { tools.push(...LOG_TOOLS); tools.push(...JOB_LOG_TOOLS); } if (this.capabilities.canAccessOCAPI) { tools.push(...SYSTEM_OBJECT_TOOLS); tools.push(...CODE_VERSION_TOOLS); } return { tools }; });
  • Core helper method in SFCCDocumentationClient that retrieves raw Markdown documentation content for a given SFCC class, used by the tool handler
    async getClassDocumentation(className: string): Promise<string | null> { await this.initialize(); // Check cache first const normalizedClassName = ClassNameResolver.normalizeClassName(className); const cacheKey = `content:${normalizedClassName}`; const cachedContent = this.cacheManager.getFileContent(cacheKey); if (cachedContent !== undefined) { return cachedContent || null; } // Resolve class name with fallback logic const resolved = ClassNameResolver.resolveClassName(normalizedClassName, this.classCache); const content = resolved ? resolved.info.content : null; // Cache the result (including null results to avoid repeated lookups) this.cacheManager.setFileContent(cacheKey, content ?? ''); return content; }

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