sfcc-dev-mcp
Version:
MCP server for Salesforce B2C Commerce Cloud development assistance including logs, debugging, and development tools
39 lines • 1.74 kB
TypeScript
import { ToolArguments } from '../core/handlers/base-handler.js';
import { SFCCLogClient } from '../clients/log-client.js';
/**
* Configuration interface for tool dispatch
*/
export interface ToolSpec<T = any> {
validate?: (args: ToolArguments, toolName: string) => void;
defaults?: (args: ToolArguments) => Record<string, any>;
exec: (args: ToolArguments, client: SFCCLogClient) => Promise<T>;
logMessage: (args: ToolArguments) => string;
}
/**
* Validation utilities for log tools
*/
export declare class LogToolValidators {
static validateLogLevel(level: string, toolName: string): void;
static validateLimit(limit: number | undefined, toolName: string): void;
static validateMaxBytes(maxBytes: number | undefined, toolName: string): void;
static validateFilename(filename: string, toolName: string): void;
}
/**
* Message formatting utilities for log tools
*/
export declare class LogMessageFormatter {
static formatLatestLogs(level: string, limit: number, date?: string): string;
static formatSummarizeLogs(date?: string): string;
static formatSearchLogs(pattern: string, logLevel?: string, limit?: number, _date?: string): string;
static formatListLogFiles(): string;
static formatGetLogFileContents(filename: string, maxBytes?: number, tailOnly?: boolean): string;
static formatJobLogMessage(operation: string, params: Record<string, any>): string;
}
/**
* Utility functions for argument processing
*/
export declare class LogToolUtils {
static applyDefaults(spec: ToolSpec, args: ToolArguments): ToolArguments;
static createValidatedArgs(spec: ToolSpec, args: ToolArguments, toolName: string): ToolArguments;
}
//# sourceMappingURL=log-tool-utils.d.ts.map