get_recent_prompts
Retrieve recent user prompts from LLM sessions to review study history, analyze question types, and track learning progress for metacognitive reflection.
Instructions
최근 며칠간의 질문들을 조회합니다.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | 조회할 일수 (기본값: 7) |
Implementation Reference
- src/server.ts:198-233 (handler)The handler implementation for the `get_recent_prompts` tool in `src/server.ts`. It takes an optional `days` argument and returns a summary of prompts stored in the last N days.
"get_recent_prompts", "최근 며칠간의 질문들을 조회합니다.", { days: z.number().optional().describe("조회할 일수 (기본값: 7)"), }, async ({ days = 7 }) => { ensureDirectories(); const results: { date: string; count: number }[] = []; for (let i = 0; i < days; i++) { const date = new Date(); date.setDate(date.getDate() - i); const dateStr = date.toISOString().split("T")[0]; const prompts = loadPrompts(dateStr); if (prompts.length > 0) { results.push({ date: dateStr, count: prompts.length }); } } if (results.length === 0) { return { content: [{ type: "text", text: `최근 ${days}일간 저장된 질문이 없습니다.` }], }; } const list = results .map((r) => `${r.date}: ${r.count}개 질문`) .join("\n"); const total = results.reduce((sum, r) => sum + r.count, 0); return { content: [{ type: "text", text: `최근 ${days}일간 학습 기록\n\n${list}\n\n총 ${total}개 질문` }], }; } );