Skip to main content
Glama
taurgis

SFCC Development MCP Server

by taurgis

get_sfcc_class_documentation

Retrieve comprehensive SFCC class documentation including examples and detailed descriptions to support in-depth development 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

  • Core handler function in SFCCDocumentationClient that implements the tool logic: initializes, caches, resolves class name, and returns raw markdown documentation content.
    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; }
  • Tool schema definition including name, description, and inputSchema with required 'className' parameter.
    { 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'], }, },
  • MCP server registration where SFCC_DOCUMENTATION_TOOLS (including this tool's schema) is added to the list of available tools.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => { const tools = []; // Always available tools 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 }; });
  • Tool configuration defining validation, defaults, execution (delegates to client), and logging for the handler.
    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}`, },
  • Registration of the DocsToolHandler which handles execution for documentation tools including 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'), ];

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