mcp-decisive
Version:
MCP server for WRAP decision-making framework with structured output
31 lines • 1.25 kB
TypeScript
import type { OptionsView, OptionsReadError, CurrentOptionsQueryResult } from './types.js';
/**
* Get Current Options Query
*
* Retrieves the current options from storage and transforms them into
* a read-optimized view. Returns null when no options are defined (not an error).
*
* @returns Promise<Result<OptionsView | null, OptionsReadError>>
* - Ok(OptionsView) when options exist
* - Ok(null) when no options are defined
* - Err(OptionsReadError) when actual errors occur (file system, data corruption)
*/
export declare const getCurrentOptions: () => Promise<CurrentOptionsQueryResult>;
/**
* Convert OptionsView to serializable format for MCP responses
*
* This function converts the domain value objects to plain strings
* suitable for JSON serialization and MCP tool responses.
*/
export declare const serializeOptionsView: (optionsView: OptionsView) => {
options: {
supplementaryInfo?: string | undefined;
id: import("../../term/option.js").OptionId;
text: import("../../term/option.js").OptionText;
}[];
};
/**
* Convert OptionsReadError to user-friendly message
*/
export declare const formatOptionsReadError: (error: OptionsReadError) => string;
//# sourceMappingURL=index.d.ts.map