@breaknorm_hu/mcp-server 0.2.0 → 0.2.1
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.
- package/dist/index.js +23 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -85,7 +85,7 @@ var tools = [
|
|
|
85
85
|
searchToken: z.string().optional().describe("Required for page 2+, from page 1 response")
|
|
86
86
|
}),
|
|
87
87
|
handler: async (client, args) => {
|
|
88
|
-
|
|
88
|
+
const result = await client.get("/leads/search", {
|
|
89
89
|
q: str(args.q),
|
|
90
90
|
naicsCodes: arrayParam(args.naicsCodes),
|
|
91
91
|
industry: arrayParam(args.industry),
|
|
@@ -107,6 +107,28 @@ var tools = [
|
|
|
107
107
|
page: str(args.page),
|
|
108
108
|
searchToken: str(args.searchToken)
|
|
109
109
|
});
|
|
110
|
+
const r = result;
|
|
111
|
+
const leads = (r.data || []).map((lead) => ({
|
|
112
|
+
id: lead.id,
|
|
113
|
+
name: `${lead.firstName} ${lead.lastName}`,
|
|
114
|
+
title: lead.title,
|
|
115
|
+
seniority: lead.seniority,
|
|
116
|
+
email: lead.revealedEmail || (lead.hasEmail ? "available" : null),
|
|
117
|
+
phone: lead.revealedPhone || (lead.hasPhone ? "available" : null),
|
|
118
|
+
company: lead.companyName,
|
|
119
|
+
companyId: lead.companyId,
|
|
120
|
+
industry: lead.industry,
|
|
121
|
+
city: lead.city,
|
|
122
|
+
employees: lead.employeeCount,
|
|
123
|
+
revenue: lead.annualRevenue
|
|
124
|
+
}));
|
|
125
|
+
return {
|
|
126
|
+
leads,
|
|
127
|
+
total: r.pagination?.total,
|
|
128
|
+
page: r.pagination?.page,
|
|
129
|
+
hasMore: r.pagination?.hasMore,
|
|
130
|
+
searchToken: r.pagination?.searchToken
|
|
131
|
+
};
|
|
110
132
|
}
|
|
111
133
|
},
|
|
112
134
|
{
|