save_prompt
Save learning questions or notes from AI sessions to track progress and facilitate metacognition. Automatically captures or manually stores prompts for later review and analysis.
Instructions
학습 관련 질문이나 메모를 저장합니다. 사용 방법:
자동 저장: AI가 사용자의 학습 관련 질문을 인식하여 자동으로 저장
수동 저장: 사용자가 "이거 저장해줘", "'질문내용' 저장해줘"라고 요청하면 저장 예시: "N+1 쿼리가 뭐야? 저장해줘" 또는 "방금 질문 저장해줘"
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | 저장할 질문 또는 메모 내용 |
Implementation Reference
- src/server.ts:75-86 (handler)The savePrompt function implements the core logic for saving a prompt, including classifying its type and writing to a JSON file.
function savePrompt(date: string, prompt: string): QuestionType { ensureDirectories(); const prompts = loadPrompts(date); const type = classifyQuestion(prompt); prompts.push({ prompt, timestamp: new Date().toISOString(), type, }); fs.writeFileSync(getPromptFilePath(date), JSON.stringify(prompts, null, 2)); return type; } - src/server.ts:120-138 (registration)The 'save_prompt' tool is registered on the McpServer using the server.tool method.
server.tool( "save_prompt", `학습 관련 질문이나 메모를 저장합니다. 사용 방법: 1. 자동 저장: AI가 사용자의 학습 관련 질문을 인식하여 자동으로 저장 2. 수동 저장: 사용자가 "이거 저장해줘", "'질문내용' 저장해줘"라고 요청하면 저장 예시: "N+1 쿼리가 뭐야? 저장해줘" 또는 "방금 질문 저장해줘"`, { prompt: z.string().describe("저장할 질문 또는 메모 내용"), }, async ({ prompt }) => { const today = getToday(); const type = savePrompt(today, prompt); const typeDesc = TYPE_DESCRIPTIONS[type]; return { content: [{ type: "text", text: `저장됨 (${typeDesc})` }], }; } );