/** * MCP tools for accessing ServiceNow metadata resources (API specs, snippets, instructions) * and checking authentication status */ import { ResourceLoader, ResourceType } from '../utils/resourceLoader.js'; import { CLICommand, CommandArgument, CommandResult } from '../utils/types.js'; /** * Base class for resource access commands */ export declare abstract class BaseResourceCommand implements CLICommand { abstract name: string; abstract description: string; abstract resourceType: ResourceType; protected resourceLoader: ResourceLoader; constructor(); /** * Resource commands don't use command processors */ getCommandProcessor(): undefined; arguments: CommandArgument[]; /** * Execute the resource command * @param args Command arguments * @returns Command result */ execute(args: Record): Promise; /** * Template method for subclasses to implement core execution logic * Override this instead of execute() to benefit from base error handling */ protected doExecute(args: Record): Promise; /** * Validate command arguments * @param args Command arguments * @throws Error if validation fails */ protected validateArgs(args: Record): void; } /** * Command for accessing API specifications * When called without metadataType, lists all available metadata types */ export declare class GetApiSpecCommand extends BaseResourceCommand { name: string; description: string; resourceType: ResourceType; arguments: CommandArgument[]; /** * Override doExecute to add listing functionality when no metadataType is provided */ protected doExecute(args: Record): Promise; /** * Override validateArgs since metadataType is now optional */ protected validateArgs(_args: Record): void; } /** * Command for accessing code snippets */ export declare class GetSnippetCommand extends BaseResourceCommand { name: string; description: string; resourceType: ResourceType; /** * Override doExecute to add snippet listing functionality */ protected doExecute(args: Record): Promise; } /** * Command for accessing instructions */ export declare class GetInstructCommand extends BaseResourceCommand { name: string; description: string; resourceType: ResourceType; } /** * Command for checking current authentication status * Returns the cached auth validation result from the session */ export declare class CheckAuthStatusCommand implements CLICommand { name: string; description: string; arguments: CommandArgument[]; /** * This command doesn't use a command processor */ getCommandProcessor(): undefined; /** * Execute the command to check auth status * @returns Command result with auth status information */ execute(): Promise; } //# sourceMappingURL=resourceTools.d.ts.map