import { z } from 'zod';
import { defineTool } from '../defineTool.js';
export function buildReadMemoryTool(store) {
    return defineTool({
        name: 'read_memory',
        description: 'Read the full content of a specific memory by its ID.',
        inputSchema: z.object({
            id: z.string().describe('Memory ID (mem_xxx format)'),
        }),
        category: 'analysis',
        permissions: [],
        readOnly: true,
        destructive: false,
        concurrencySafe: true,
        async execute({ id }) {
            const memoryId = id;
            const content = await store.get(memoryId);
            if (!content) {
                return {
                    success: false,
                    output: `Memory ${id} not found.`,
                    error: `Memory ${id} not found`,
                };
            }
            return {
                success: true,
                output: content.content,
                data: {
                    id: content.id,
                    format: content.format,
                    metadata: content.metadata,
                },
            };
        },
    });
}
//# sourceMappingURL=read.js.map