manage_watchlist
List, add, or remove companies on your watchlist to receive alerts when tracked companies have new events.
Instructions
Add, remove, or list companies on your watchlist. Tracked companies generate alerts when they have new events.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action: 'list' to view, 'add' to track, 'remove' to untrack | |
| domains | No | Company domains for add/remove (e.g., ['stripe.com', 'github.com']) |
Implementation Reference
- src/index.ts:127-148 (registration)Registration of the manage_watchlist tool in the ListToolsRequestSchema handler, defining name, description, and inputSchema with action (list/add/remove) and domains parameters.
{ name: "manage_watchlist", description: "Add, remove, or list companies on your watchlist. Tracked companies generate " + "alerts when they have new events.", inputSchema: { type: "object" as const, properties: { action: { type: "string", enum: ["list", "add", "remove"], description: "Action: 'list' to view, 'add' to track, 'remove' to untrack", }, domains: { type: "array", items: { type: "string" }, description: "Company domains for add/remove (e.g., ['stripe.com', 'github.com'])", }, }, required: ["action"], }, }, - src/index.ts:254-288 (handler)Handler for manage_watchlist tool calls: dispatches on action ('list' -> GET /watchlist, 'add' -> POST /watchlist, 'remove' -> DELETE /watchlist) and returns formatted results.
case "manage_watchlist": { const action = (args as any).action; const domains = (args as any).domains; if (action === "list") { const data = await apiRequest("GET", "/watchlist"); const companies = data.companies || []; if (companies.length === 0) { return textResult("Your watchlist is empty. Add companies with the 'add' action."); } const list = companies .map((c: any) => `- ${c.name || c.domain} (${c.domain})${c.matched ? "" : " [pending match]"}`) .join("\n"); return textResult(`Watchlist (${data.total}/${data.limit} slots used):\n\n${list}`); } if (!domains || domains.length === 0) { return textResult("Please provide domains to add or remove."); } if (action === "add") { const data = await apiRequest("POST", "/watchlist", { domains }); return textResult( `Added ${data.added} companies. Already tracked: ${data.already_tracked}. ` + `Not found: ${data.not_found}. Total tracked: ${data.total_tracked}.` ); } if (action === "remove") { const data = await apiRequest("DELETE", "/watchlist", { domains }); return textResult(`Removed ${data.removed} companies. Total tracked: ${data.total_tracked}.`); } return textResult("Invalid action. Use 'list', 'add', or 'remove'."); } - src/index.ts:132-147 (schema)Input schema for manage_watchlist: action (enum: list/add/remove) required, domains (array of strings) optional.
inputSchema: { type: "object" as const, properties: { action: { type: "string", enum: ["list", "add", "remove"], description: "Action: 'list' to view, 'add' to track, 'remove' to untrack", }, domains: { type: "array", items: { type: "string" }, description: "Company domains for add/remove (e.g., ['stripe.com', 'github.com'])", }, }, required: ["action"], },