Skip to main content
Glama
taurgis

SFCC Development MCP Server

by taurgis

search_sfcc_methods

Find SFCC methods by name to locate classes or discover similar operations across the platform's API documentation.

Instructions

Search for methods across all SFCC classes by method name. Use this when you know the method name but not which class it belongs to, or when looking for similar methods across different classes. Helpful for discovering all available methods that perform similar operations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodNameYesMethod name to search for. Only use one word at a time (e.g., "get", "create", "update"). Combining multiple words or looking for multiple methods at the same time is not supported.

Implementation Reference

  • The tool configuration defining the handler (exec function), validation, defaults, and logging for 'search_sfcc_methods'. The exec function extracts the methodName argument and calls SFCCDocumentationClient.searchMethods.
    search_sfcc_methods: {
      defaults: (args: ToolArguments) => args,
      validate: (args: ToolArguments, toolName: string) => {
        ValidationHelpers.validateArguments(args, CommonValidations.requiredString('methodName'), toolName);
      },
      exec: async (args: ToolArguments, context: ToolExecutionContext) => {
        const client = context.docsClient as SFCCDocumentationClient;
        return client.searchMethods(args.methodName as string);
      },
      logMessage: (args: ToolArguments) => `Search methods ${args.methodName}`,
    },
  • Core implementation of method search: initializes docs, checks cache, iterates over all classes, parses details, finds matching methods by name (case-insensitive substring match), caches results.
    async searchMethods(methodName: string): Promise<{ className: string; method: SFCCMethod }[]> {
      await this.initialize();
    
      // Check cache first
      const cacheKey = `search:methods:${methodName.toLowerCase()}`;
      const cachedResult = this.cacheManager.getMethodSearch(cacheKey);
      if (cachedResult) {
        return cachedResult;
      }
    
      const results: { className: string; method: SFCCMethod }[] = [];
    
      for (const [fullClassName] of this.classCache) {
        const details = await this.getClassDetails(fullClassName);
        const methods = details?.methods ?? [];
        for (const method of methods) {
          if (method.name.toLowerCase().includes(methodName.toLowerCase())) {
            results.push({
              className: fullClassName,
              method,
            });
          }
        }
      }
    
      // Cache the search results
      this.cacheManager.setMethodSearch(cacheKey, results);
      return results;
    }
  • Defines the input schema, description, and metadata for the 'search_sfcc_methods' tool used in MCP tool listing.
    {
      name: 'search_sfcc_methods',
      description: 'Search for methods across all SFCC classes by method name. Use this when you know the method name but not which class it belongs to, or when looking for similar methods across different classes. Helpful for discovering all available methods that perform similar operations.',
      inputSchema: {
        type: 'object',
        properties: {
          methodName: {
            type: 'string',
            description: 'Method name to search for. Only use one word at a time (e.g., "get", "create", "update"). Combining multiple words or looking for multiple methods at the same time is not supported.',
          },
        },
        required: ['methodName'],
      },
    },
  • Registers the DocsToolHandler instance, which handles the 'search_sfcc_methods' tool (among other documentation tools) by delegating to tool-specific configs.
    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'),
    ];
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains the search scope ('across all SFCC classes') and purpose ('discovering all available methods'), but lacks details on output format, pagination, error handling, or performance characteristics. The description adds some context but doesn't fully compensate for the absence of annotations.

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 efficiently structured in three sentences: the core purpose, usage guidelines, and additional context. Each sentence adds distinct value without redundancy. It's front-loaded with the main functionality and appropriately sized for a single-parameter search tool.

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's moderate complexity (search across classes), no annotations, and no output schema, the description is adequate but has gaps. It explains what the tool does and when to use it, but doesn't describe the return format, result limitations, or error conditions. For a search tool with no structured output documentation, this leaves some important context unspecified.

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?

Schema description coverage is 100%, so the schema already documents the single parameter 'methodName' with its constraints. The description adds value by explaining the search context ('across all SFCC classes') and use cases, but doesn't provide additional parameter semantics beyond what's in the schema. With 0 parameters beyond the documented one, a baseline of 4 is appropriate.

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: 'Search for methods across all SFCC classes by method name.' It specifies the verb ('search'), resource ('methods across all SFCC classes'), and scope ('by method name'), distinguishing it from siblings like 'search_sfcc_classes' or 'get_sfcc_class_documentation' that focus on classes or documentation rather than method discovery.

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 when you know the method name but not which class it belongs to, or when looking for similar methods across different classes.' It also clarifies the alternative scenario ('Helpful for discovering all available methods that perform similar operations'), making it clear this is for cross-class method discovery rather than class-level searches.

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