add_interested_company
Add companies to track for job applications or collaboration opportunities, including roles, sectors, and notes for career planning.
Instructions
Add a company Chen is interested in applying to or working with.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Company name | |
| sector | No | Optional: industry sector | |
| notes | No | Optional: notes | |
| rolesOfInterest | No | Optional: roles of interest |
Implementation Reference
- src/storage/context-store.ts:127-133 (handler)The actual implementation of addInterestedCompany, which loads the interested companies from a JSON file, checks for duplicates, and saves the updated list.
export async function addInterestedCompany(company: InterestedCompany): Promise<void> { const companies = await loadJson<InterestedCompany[]>("interested_companies.json", []); if (!companies.some((c) => c.name.toLowerCase() === company.name.toLowerCase())) { companies.push(company); await saveJson("interested_companies.json", companies); } } - src/storage/context-store.ts:34-40 (schema)Type definition for InterestedCompany which defines the structure of the input required for the tool.
export interface InterestedCompany { name: string; sector?: string; notes?: string; rolesOfInterest?: string[]; lastChecked?: string; } - src/index.ts:75-92 (registration)The MCP tool definition and registration for add_interested_company in the server's listTools response.
name: "add_interested_company", description: "Add a company Chen is interested in applying to or working with.", inputSchema: { type: "object", properties: { name: { type: "string", description: "Company name" }, sector: { type: "string", description: "Optional: industry sector" }, notes: { type: "string", description: "Optional: notes" }, rolesOfInterest: { type: "array", items: { type: "string" }, description: "Optional: roles of interest", }, }, required: ["name"], }, }, - src/index.ts:182-204 (handler)The MCP tool request handler block in src/index.ts that parses arguments and calls the addInterestedCompany function.
if (name === "add_interested_company") { const companyName = safeArgs.name as string; if (!companyName) { return { content: [{ type: "text", text: "Error: name is required" }], isError: true, }; } await addInterestedCompany({ name: companyName, sector: safeArgs.sector as string | undefined, notes: safeArgs.notes as string | undefined, rolesOfInterest: safeArgs.rolesOfInterest as string[] | undefined, }); return { content: [ { type: "text", text: `Added interested company: ${companyName}`, }, ], }; }