search_profile
Search personal profile content including bio, skills, projects, and social links to find specific keywords or information across your digital identity.
Instructions
Search across the entire personal profile for a keyword or phrase. Searches through: name, bio, job titles, companies, skill names, project names, article titles, book titles, social links, FAQ answers, and more. Returns matching fields with their location in the profile.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Keyword to search for (e.g. 'TypeScript', 'open-source', 'running') |
Implementation Reference
- src/loader.ts:175-195 (handler)The core logic for searching the profile data.
export function searchProfile(data: Record<string, unknown>, query: string): string[] { const results: string[] = []; const lowerQuery = query.toLowerCase(); function searchObj(obj: unknown, path: string): void { if (typeof obj === "string") { if (obj.toLowerCase().includes(lowerQuery)) { results.push(`${path}: ${obj}`); } } else if (Array.isArray(obj)) { obj.forEach((item, i) => searchObj(item, `${path}[${i}]`)); } else if (obj !== null && typeof obj === "object") { for (const [key, value] of Object.entries(obj as Record<string, unknown>)) { searchObj(value, path ? `${path}.${key}` : key); } } } searchObj(data, ""); return results; } - src/server.ts:119-141 (registration)Registration of the search_profile tool in the MCP server.
server.registerTool( "search_profile", { title: "Search Profile \u2014 Find Skills, Projects, Experience", description: "Search across the entire personal profile for a keyword or phrase. " + "Searches through: name, bio, job titles, companies, skill names, project names, article titles, book titles, social links, FAQ answers, and more. " + "Returns matching fields with their location in the profile.", inputSchema: z.object({ query: z.string().describe("Keyword to search for (e.g. 'TypeScript', 'open-source', 'running')"), }), annotations: { readOnlyHint: true }, }, async ({ query }) => { const results = searchProfile(profile.data, query); const text = results.length > 0 ? `Found ${results.length} match(es) for "${query}":\n\n${results.join("\n")}` : `No matches found for "${query}".`; return { content: [{ type: "text" as const, text }], };