@breaknorm_hu/mcp-server 0.2.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +68 -24
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -59,6 +59,56 @@ function str(val) {
59
59
  return String(val);
60
60
  }
61
61
  var tools = [
62
+ // ── PRIMARY TOOL — use this for everything ──
63
+ {
64
+ name: "find_leads",
65
+ description: "THE main tool. Finds leads (contacts + company data) in one call. Accepts natural language industry description \u2014 no need to call suggest_industry_codes first! Can also include cost estimate for reveals. Request up to 500 results at once.",
66
+ schema: z.object({
67
+ industryDescription: z.string().optional().describe("Natural language: e.g. 'marketing \xFCgyn\xF6ks\xE9gek', 'IT szolg\xE1ltat\xF3k'. Server converts to NAICS codes automatically."),
68
+ naicsCodes: z.array(z.string()).optional().describe("If you already have NAICS codes from a previous call, pass them here to skip AI generation"),
69
+ q: z.string().optional().describe("Free text search (name, title, company)"),
70
+ title: z.string().optional().describe("Job title keyword: '\xFCgyvezet\u0151', 'CEO', 'igazgat\xF3'"),
71
+ seniority: z.array(z.string()).optional().describe("c_level, vp, director, manager, head, senior, founder, partner, managing_director"),
72
+ department: z.array(z.string()).optional().describe("sales, marketing, it, hr, finance, engineering, c_suite"),
73
+ city: z.array(z.string()).optional().describe("City names"),
74
+ employee_min: z.number().int().optional().describe("Min company employees"),
75
+ employee_max: z.number().int().optional().describe("Max company employees"),
76
+ revenue_min: z.number().optional().describe("Min annual revenue HUF"),
77
+ revenue_max: z.number().optional().describe("Max annual revenue HUF"),
78
+ has_email: z.enum(["yes", "maybe", "no"]).optional().describe("Email availability filter"),
79
+ has_phone: z.enum(["yes", "maybe", "no"]).optional(),
80
+ includeEstimate: z.boolean().default(true).optional().describe("Include reveal cost estimate in response (default: true)"),
81
+ revealType: z.enum(["email", "phone", "all"]).default("email").optional().describe("For estimate: what to reveal"),
82
+ limit: z.number().int().min(1).max(500).default(100).optional().describe("Results to return (max 500, default 100)"),
83
+ page: z.number().int().default(1).optional(),
84
+ searchToken: z.string().optional().describe("For page 2+, from previous response")
85
+ }),
86
+ handler: async (client, args) => {
87
+ const result = await client.post("/leads/find", {
88
+ industryDescription: args.industryDescription,
89
+ naicsCodes: args.naicsCodes,
90
+ q: args.q,
91
+ title: args.title,
92
+ seniority: args.seniority,
93
+ department: args.department,
94
+ city: args.city,
95
+ employee_min: args.employee_min,
96
+ employee_max: args.employee_max,
97
+ revenue_min: args.revenue_min,
98
+ revenue_max: args.revenue_max,
99
+ has_email: args.has_email,
100
+ has_phone: args.has_phone,
101
+ includeEstimate: args.includeEstimate ?? true,
102
+ revealType: args.revealType || "email",
103
+ limit: args.limit || 100,
104
+ page: args.page || 1,
105
+ searchToken: args.searchToken
106
+ });
107
+ const d = result.data;
108
+ return d;
109
+ }
110
+ },
111
+ // ── ADVANCED: direct search (for pagination with existing NAICS codes) ──
62
112
  {
63
113
  name: "search_leads",
64
114
  description: "Search for leads (contacts + company data in one result). This is THE main search tool. Returns contacts with their company info. Use suggest_industry_codes FIRST to get NAICS codes, then pass them here. You can request up to 500 results at once (no need to paginate for small queries). NEVER search by company name one by one!",
@@ -310,33 +360,27 @@ var SERVER_NAME = "breaknorm";
310
360
  var SERVER_VERSION = "0.1.0";
311
361
  var INSTRUCTIONS = `Breaknorm MCP Server \u2014 B2B contact database for the Hungarian market.
312
362
 
313
- CRITICAL RULES:
314
-
315
- 1. USE search_leads FOR EVERYTHING \u2014 it returns contacts WITH company data in one call.
316
- You can request up to 500 results at once (limit: 500). No need to paginate for most queries!
317
-
318
- 2. NEVER search by company name one by one! Use filters:
319
- Wrong: search_leads(q: "Company A"), search_leads(q: "Company B"), ...
320
- Right: suggest_industry_codes("marketing") \u2192 search_leads(naicsCodes: [...], seniority: ["c_level"], limit: 200)
363
+ USE find_leads FOR EVERYTHING. It does everything in ONE call:
364
+ - Converts industry description to NAICS codes automatically (no need for separate calls)
365
+ - Searches contacts WITH company data
366
+ - Includes cost estimate for reveals
367
+ - Returns up to 500 results at once
321
368
 
322
- 3. INDUSTRY SEARCH \u2014 always use NAICS codes:
323
- a. suggest_industry_codes("rekl\xE1m \xE9s m\xE9dia \xFCgyn\xF6ks\xE9gek") \u2192 get NAICS codes ONCE
324
- b. search_leads(naicsCodes: [codes], employee_min: 5, seniority: ["c_level"], limit: 200)
325
- c. If you need more pages, reuse the SAME naicsCodes \u2014 NEVER call suggest_industry_codes again!
369
+ WORKFLOW (only 2 steps!):
370
+ 1. find_leads(industryDescription: "marketing \xFCgyn\xF6ks\xE9gek", seniority: ["c_level"], has_email: "yes", limit: 100, includeEstimate: true)
371
+ \u2192 Returns leads + cost estimate in ONE call
372
+ 2. User approves \u2192 bulk_reveal_contacts(contactIds: [...], type: "email")
373
+ \u2192 Done!
326
374
 
327
- 4. WORKFLOW for building a lead list:
328
- a. get_credits \u2014 check balance
329
- b. suggest_industry_codes \u2014 get NAICS codes (ONCE!)
330
- c. search_leads \u2014 find leads with all filters, up to 500 at once
331
- d. estimate_cost \u2014 calculate reveal cost
332
- e. [Wait for user approval of the cost]
333
- f. bulk_reveal_contacts \u2014 get emails (up to 1000 at once)
334
- g. create_list + add_contacts_to_list \u2014 organize
335
- h. export_list \u2014 CSV export
375
+ For page 2+: use the naicsCodesUsed + searchToken from the first response.
376
+ Pass naicsCodes instead of industryDescription to skip AI generation on subsequent pages.
336
377
 
337
- 5. Before ANY paid operation (reveal, scoring), call estimate_cost and get user approval.
338
- 6. Credit costs: email=1, phone=10, both=11, ICP scoring=1 per company.
339
- 7. Search is FREE. Bulk operations are async \u2014 poll with check_job_status.`;
378
+ RULES:
379
+ - NEVER search by company name one by one
380
+ - find_leads handles NAICS generation internally \u2014 don't call suggest_industry_codes separately
381
+ - Always includeEstimate: true so you can show the cost to the user
382
+ - Before reveal, ALWAYS show the cost and ask for user approval
383
+ - Credit costs: email=1, phone=10, both=11 per contact`;
340
384
  async function main() {
341
385
  const apiKey = process.env.BREAKNORM_API_KEY;
342
386
  if (!apiKey) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breaknorm_hu/mcp-server",
3
- "version": "0.2.1",
3
+ "version": "1.0.0",
4
4
  "description": "Breaknorm MCP Server — AI agent interface for B2B contact database",
5
5
  "type": "module",
6
6
  "bin": {