Get Profile Summary
get_profileRetrieve a complete personal profile summary with contact information, background, and key statistics. Access all essential personal data in one request.
Instructions
Get a complete profile summary including contact info, about myself, summary, and key stats
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes |
Implementation Reference
- api/mcp.ts:192-216 (handler)The handler function that executes the 'get_profile' tool logic. It reads contact.json and resume.md from a GitHub repo, extracts the Summary section from markdown, and returns a ProfileResult object with name, email, phone, location, links, and summary.
// Tool: Get Profile Summary server.registerTool( "get_profile", { title: "Get Profile Summary", description: "Get a complete profile summary including contact info, summary, and key stats", outputSchema: textContentOutputSchema, }, async () => { const contact = await readJsonFile<ContactData>("profile/contact.json"); const resume = await readMarkdownFile("profile/resume.md"); const summaryMatch = resume.match(/## Summary\n\n([\s\S]*?)(?=\n##|$)/); const summary = summaryMatch ? summaryMatch[1].trim() : ""; const profile: ProfileResult = { name: contact.name, email: contact.email, phone: contact.phone, location: contact.location, links: contact.links, summary, }; return { content: [{ type: "text", text: JSON.stringify(profile, null, 2) }] }; } ); - api/mcp.ts:193-216 (registration)The tool registration call using server.registerTool with the name 'get_profile'. This is where the tool is registered in the MCP server.
server.registerTool( "get_profile", { title: "Get Profile Summary", description: "Get a complete profile summary including contact info, summary, and key stats", outputSchema: textContentOutputSchema, }, async () => { const contact = await readJsonFile<ContactData>("profile/contact.json"); const resume = await readMarkdownFile("profile/resume.md"); const summaryMatch = resume.match(/## Summary\n\n([\s\S]*?)(?=\n##|$)/); const summary = summaryMatch ? summaryMatch[1].trim() : ""; const profile: ProfileResult = { name: contact.name, email: contact.email, phone: contact.phone, location: contact.location, links: contact.links, summary, }; return { content: [{ type: "text", text: JSON.stringify(profile, null, 2) }] }; } ); - src/types.ts:116-124 (schema)The ProfileResult interface defines the shape of the data returned by the get_profile tool, including name, email, phone, location, links, summary, and about_me.
export interface ProfileResult { name: string; email: string; phone: string; location: string; links: Record<string, string>; summary: string; about_me: AboutMeData; } - api/mcp.ts:50-55 (schema)The textContentOutputSchema used as the outputSchema for the get_profile tool, defining the common response format.
const textContentOutputSchema = z.object({ content: z.array( z.object({ type: z.literal("text"), text: z.string(), }) - api/mcp.ts:40-43 (helper)Helper function readJsonFile used by the handler to fetch and parse JSON data from GitHub.
async function readJsonFile<T>(relativePath: string): Promise<T> { const content = await fetchFromGitHub(relativePath); return JSON.parse(content) as T; }