import { z } from '@frontmcp/lazy-zod';
import { Tool, ToolContext } from '@frontmcp/sdk';

import { notesStore } from '../data/notes.store';

const inputSchema = {};
const outputSchema = z.object({ success: z.boolean() });

@Tool({
  name: 'notes-reset',
  description: 'Clear all notes from the store (for testing)',
  inputSchema,
  outputSchema,
})
export default class NotesResetTool extends ToolContext {
  async execute(_input: z.infer<z.ZodObject<typeof inputSchema>>): Promise<z.infer<typeof outputSchema>> {
    notesStore.clear();
    return { success: true };
  }
}
