get_context
Retrieve professional background information including experience, skills, resume preferences, project learnings, and company interests for project planning and context understanding.
Instructions
Get Chen's full personal context: experience, skills, resume preferences, learnings, and interested companies. Use when starting a new project or when you need to understand Chen's background and preferences.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| section | No | Optional: 'all' | 'experience' | 'skills' | 'preferences' | 'learnings' | 'companies'. Default: all. |
Implementation Reference
- src/index.ts:102-131 (handler)The handler logic for the 'get_context' tool, which fetches data using getFullContext and filters based on the 'section' argument.
if (name === "get_context") { const section = (safeArgs.section as string) || "all"; const context = await getFullContext(); let output: unknown; if (section === "all") { output = context; } else if (section === "experience") { output = context.experience; } else if (section === "skills") { output = context.skills; } else if (section === "preferences") { output = context.preferences; } else if (section === "learnings") { output = context.learnings; } else if (section === "companies") { output = context.interestedCompanies; } else { output = context; } return { content: [ { type: "text", text: JSON.stringify(output, null, 2), }, ], }; } - src/index.ts:31-46 (registration)The registration of the 'get_context' tool in the ListToolsRequestSchema handler.
{ name: "get_context", description: "Get Chen's full personal context: experience, skills, resume preferences, learnings, and interested companies. Use when starting a new project or when you need to understand Chen's background and preferences.", inputSchema: { type: "object", properties: { section: { type: "string", description: "Optional: 'all' | 'experience' | 'skills' | 'preferences' | 'learnings' | 'companies'. Default: all.", enum: ["all", "experience", "skills", "preferences", "learnings", "companies"], }, }, }, }, - src/storage/context-store.ts:81-98 (helper)The helper function 'getFullContext' that actually retrieves and aggregates the data for the 'get_context' tool.
export async function getFullContext(): Promise<ContextData> { const [preferences, experience, skills, learnings, interestedCompanies] = await Promise.all([ loadJson<Preferences>("preferences.json", {}), loadJson("experience.json", {}), loadJson("skills.json", {}), loadJson<Learning[]>("learnings.json", []), loadJson<InterestedCompany[]>("interested_companies.json", []), ]); return { preferences, experience, skills, learnings, interestedCompanies, updatedAt: new Date().toISOString(), }; }