/** * Feedback Tool * * MCP tool for submitting and managing structured feedback about MCP tools and operations. * Uses local-first storage with future API sync capability. */ import { Tool } from '@modelcontextprotocol/sdk/types.js'; import { ConsolidatedToolArgs, OperationHandler } from './types.js'; /** * Feedback categories */ export type FeedbackCategory = 'bug' | 'feature_request' | 'usability' | 'documentation' | 'performance'; /** * Feedback severity levels */ export type FeedbackSeverity = 'critical' | 'high' | 'medium' | 'low'; /** * Feedback entry stored in local storage */ export interface FeedbackEntry { /** Unique feedback ID */ id: string; /** Feedback category */ category: FeedbackCategory; /** Brief summary of the feedback */ summary: string; /** Severity level */ severity: FeedbackSeverity; /** Which MCP tool this relates to (optional) */ tool?: string; /** Specific operation within the tool (optional) */ toolOperation?: string; /** Extended description (optional) */ details?: string; /** Expected behavior (optional) */ expected?: string; /** Actual behavior (optional) */ actual?: string; /** Error message if bug (optional) */ errorMessage?: string; /** Related ticket ID (optional) */ ticketId?: string; /** Timestamp when created */ createdAt: string; /** User ID who submitted */ userId: string; } /** * Index entry for fast listing */ export interface FeedbackIndexEntry { id: string; category: FeedbackCategory; severity: FeedbackSeverity; summary: string; tool?: string; createdAt: string; } /** * Index file structure */ export interface FeedbackIndex { entries: FeedbackIndexEntry[]; lastUpdated: string; } export declare const FEEDBACK_CATEGORIES: FeedbackCategory[]; export declare const FEEDBACK_SEVERITIES: FeedbackSeverity[]; /** * Get the feedback storage directory */ export declare function getFeedbackDir(): string; /** * Get the entries directory */ export declare function getEntriesDir(): string; /** * Get the index file path */ export declare function getIndexPath(): string; /** * Ensure storage directories exist */ export declare function ensureStorageExists(): void; /** * Generate a unique feedback ID */ export declare function generateFeedbackId(): string; /** * Read the feedback index */ export declare function readIndex(): FeedbackIndex; /** * Write the feedback index */ export declare function writeIndex(index: FeedbackIndex): void; /** * Read a feedback entry by ID */ export declare function readEntry(feedbackId: string): FeedbackEntry | null; /** * Write a feedback entry */ export declare function writeEntry(entry: FeedbackEntry): void; export declare const feedbackTool: Tool; export declare function createFeedbackOperations(): Record; /** * Create the feedback handler using operation router */ export declare function createFeedbackHandler(): (args: ConsolidatedToolArgs, userId: string) => Promise; //# sourceMappingURL=feedback.d.ts.map