@coldiq/mcp 5.4.2 → 5.4.4
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/ai-ark-mapping.d.ts +97 -0
- package/dist/ai-ark-mapping.d.ts.map +1 -0
- package/dist/ai-ark-mapping.js +162 -0
- package/dist/ai-ark-mapping.js.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/provider-availability.d.ts.map +1 -1
- package/dist/provider-availability.js +4 -0
- package/dist/provider-availability.js.map +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +5 -52
- package/dist/registry.js.map +1 -1
- package/dist/tools/get-website-visitors.d.ts +26 -0
- package/dist/tools/get-website-visitors.d.ts.map +1 -0
- package/dist/tools/get-website-visitors.js +73 -0
- package/dist/tools/get-website-visitors.js.map +1 -0
- package/dist/utils/provider-resolver.js +2 -2
- package/dist/utils/provider-resolver.js.map +1 -1
- package/package.json +1 -1
- package/src/ai-ark-mapping.ts +175 -0
- package/src/index.ts +11 -0
- package/src/provider-availability.ts +4 -0
- package/src/registry.ts +10 -54
- package/src/tools/get-website-visitors.ts +74 -0
- package/src/utils/provider-resolver.ts +2 -2
- package/tests/provider-availability.test.ts +21 -0
- package/tests/registry-find-people.test.ts +33 -7
- package/tests/registry-search-companies.test.ts +36 -9
- package/tests/registry.test.ts +8 -9
- package/tests/tools/visitor-id-tools.test.ts +108 -0
- package/tests/version.test.ts +14 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const getWebsiteVisitorsName = "get_website_visitors";
|
|
3
|
+
export declare const getWebsiteVisitorsDescription: string;
|
|
4
|
+
export declare const getWebsiteVisitorsSchema: {
|
|
5
|
+
website_id: z.ZodNumber;
|
|
6
|
+
type: z.ZodEnum<["people", "companies"]>;
|
|
7
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
9
|
+
email: z.ZodOptional<z.ZodString>;
|
|
10
|
+
account_id: z.ZodOptional<z.ZodString>;
|
|
11
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
12
|
+
};
|
|
13
|
+
export declare function getWebsiteVisitorsHandler(input: Record<string, unknown>): Promise<{
|
|
14
|
+
content: {
|
|
15
|
+
type: "text";
|
|
16
|
+
text: string;
|
|
17
|
+
}[];
|
|
18
|
+
isError: boolean;
|
|
19
|
+
} | {
|
|
20
|
+
content: {
|
|
21
|
+
type: "text";
|
|
22
|
+
text: string;
|
|
23
|
+
}[];
|
|
24
|
+
isError?: undefined;
|
|
25
|
+
}>;
|
|
26
|
+
//# sourceMappingURL=get-website-visitors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-website-visitors.d.ts","sourceRoot":"","sources":["../../src/tools/get-website-visitors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,sBAAsB,yBAAyB,CAAA;AAE5D,eAAO,MAAM,6BAA6B,QAGwI,CAAA;AAElL,eAAO,MAAM,wBAAwB;;;;;;;;CA4BpC,CAAA;AAED,wBAAsB,yBAAyB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;GAiC7E"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { callApi } from '../client.js';
|
|
3
|
+
export const getWebsiteVisitorsName = 'get_website_visitors';
|
|
4
|
+
export const getWebsiteVisitorsDescription = 'Read the leads ColdIQ Visitor ID identified on one of your websites — the people who visited (with verified work email, title and LinkedIn where available) or the companies they belong to (with firmographics). ' +
|
|
5
|
+
'Use `type: "people"` for enriched contacts and `type: "companies"` for enriched accounts. To find `website_id`, call the free `GET /visitor-id/websites` endpoint through call_endpoint (api "visitor-id"). ' +
|
|
6
|
+
'Results are paginated: pass the `cursor` from the previous response to fetch the next page. Free — identifications are billed when they are delivered, not when you read them.';
|
|
7
|
+
export const getWebsiteVisitorsSchema = {
|
|
8
|
+
website_id: z
|
|
9
|
+
.number()
|
|
10
|
+
.int()
|
|
11
|
+
.describe('The tracked website to read leads from, as returned by GET /visitor-id/websites.'),
|
|
12
|
+
type: z
|
|
13
|
+
.enum(['people', 'companies'])
|
|
14
|
+
.describe('"people" returns identified contacts (email, title, LinkedIn); "companies" returns identified accounts (firmographics).'),
|
|
15
|
+
limit: z
|
|
16
|
+
.number()
|
|
17
|
+
.int()
|
|
18
|
+
.min(1)
|
|
19
|
+
.max(100)
|
|
20
|
+
.optional()
|
|
21
|
+
.describe('Records per page (1–100). Default is the identification engine\'s own default.'),
|
|
22
|
+
cursor: z.string().optional().describe('Pagination cursor from the previous response.'),
|
|
23
|
+
email: z
|
|
24
|
+
.string()
|
|
25
|
+
.optional()
|
|
26
|
+
.describe('people only — return the identified person with this email address.'),
|
|
27
|
+
account_id: z
|
|
28
|
+
.string()
|
|
29
|
+
.optional()
|
|
30
|
+
.describe('people only — return only the people identified at this company (account id from a "companies" result).'),
|
|
31
|
+
domain: z
|
|
32
|
+
.string()
|
|
33
|
+
.optional()
|
|
34
|
+
.describe('companies only — return the identified company with this domain.'),
|
|
35
|
+
};
|
|
36
|
+
export async function getWebsiteVisitorsHandler(input) {
|
|
37
|
+
const websiteId = input.website_id;
|
|
38
|
+
const type = input.type;
|
|
39
|
+
const isPeople = type === 'people';
|
|
40
|
+
const path = `/visitor-id/websites/${websiteId}/${isPeople ? 'contacts' : 'accounts'}`;
|
|
41
|
+
const query = {};
|
|
42
|
+
if (input.limit !== undefined)
|
|
43
|
+
query.limit = String(input.limit);
|
|
44
|
+
if (input.cursor)
|
|
45
|
+
query.cursor = String(input.cursor);
|
|
46
|
+
if (isPeople) {
|
|
47
|
+
if (input.email)
|
|
48
|
+
query.email = String(input.email);
|
|
49
|
+
if (input.account_id)
|
|
50
|
+
query.account_id = String(input.account_id);
|
|
51
|
+
}
|
|
52
|
+
else if (input.domain) {
|
|
53
|
+
query.domain = String(input.domain);
|
|
54
|
+
}
|
|
55
|
+
const res = await callApi('GET', path, undefined, query);
|
|
56
|
+
if (!res.ok) {
|
|
57
|
+
return {
|
|
58
|
+
content: [
|
|
59
|
+
{
|
|
60
|
+
type: 'text',
|
|
61
|
+
text: JSON.stringify({
|
|
62
|
+
error: `Failed to read identified ${isPeople ? 'people' : 'companies'}`,
|
|
63
|
+
status: res.status,
|
|
64
|
+
data: res.data,
|
|
65
|
+
}),
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
isError: true,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
return { content: [{ type: 'text', text: JSON.stringify({ data: res.data }) }] };
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=get-website-visitors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-website-visitors.js","sourceRoot":"","sources":["../../src/tools/get-website-visitors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,MAAM,CAAC,MAAM,sBAAsB,GAAG,sBAAsB,CAAA;AAE5D,MAAM,CAAC,MAAM,6BAA6B,GACxC,oNAAoN;IACpN,8MAA8M;IAC9M,gLAAgL,CAAA;AAElL,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,GAAG,EAAE;SACL,QAAQ,CAAC,kFAAkF,CAAC;IAC/F,IAAI,EAAE,CAAC;SACJ,IAAI,CAAC,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;SAC7B,QAAQ,CAAC,yHAAyH,CAAC;IACtI,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,GAAG,CAAC;SACR,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IACnE,CAAC;SAAM,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;QACxB,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IACrC,CAAC;IAED,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,CAAA;IACxD,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;QACZ,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;wBACnB,KAAK,EAAE,6BAA6B,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,WAAW,EAAE;wBACvE,MAAM,EAAE,GAAG,CAAC,MAAM;wBAClB,IAAI,EAAE,GAAG,CAAC,IAAI;qBACf,CAAC;iBACH;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAA;IACH,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAA;AAC3F,CAAC"}
|
|
@@ -130,14 +130,14 @@ const GATED_DESCRIPTIONS = {
|
|
|
130
130
|
'linkupapi-fundraising': { kind: 'requires', fields: 'funding filters and keywords or industries' },
|
|
131
131
|
'linkupapi-hiring': { kind: 'requires', fields: 'is_hiring: true' },
|
|
132
132
|
'prospeo-search-company': { kind: 'requires', fields: 'keywords, industries, or countries' },
|
|
133
|
-
'ai-ark-companies': { kind: 'requires', fields: 'keywords, industries, or
|
|
133
|
+
'ai-ark-companies': { kind: 'requires', fields: 'keywords, industries, countries, similar_to_domains, funding_stages, or employee range' },
|
|
134
134
|
},
|
|
135
135
|
// -------------------------------------------------------------------------
|
|
136
136
|
find_people: {
|
|
137
137
|
'linkupapi-search-profiles': { kind: 'incompatible_with', fields: 'company_linkedin_urls or company_domains (this provider only works without company filters)' },
|
|
138
138
|
'sumble-people-find': { kind: 'requires', fields: 'company_domains or company_linkedin_urls, and job_titles or seniorities' },
|
|
139
139
|
'prospeo-search-person': { kind: 'requires', fields: 'job_titles or company_domains' },
|
|
140
|
-
'ai-ark-people': { kind: 'requires', fields: 'job_titles, seniorities, or
|
|
140
|
+
'ai-ark-people': { kind: 'requires', fields: 'job_titles, seniorities, keywords, locations, or company identifiers' },
|
|
141
141
|
'findymail-search-employees': { kind: 'requires', fields: 'company_domains and job_titles' },
|
|
142
142
|
'fullenrich-people-search': { kind: 'requires', fields: 'company_domains (upstream does not accept LinkedIn URL filters)' },
|
|
143
143
|
pdl: { kind: 'requires', fields: 'company_domains, company_linkedin_urls, job_titles, or seniorities' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-resolver.js","sourceRoot":"","sources":["../../src/utils/provider-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAEzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAEvC,+EAA+E;AAC/E,4EAA4E;AAC5E,6EAA6E;AAC7E,yEAAyE;AACzE,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,WAAW;IACX,WAAW;IACX,SAAS;IACT,qBAAqB;IACrB,qBAAqB;IACrB,SAAS;IACT,MAAM;CACP,CAAA;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,gCAAgC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAA;AAE/F,MAAM,UAAU,yBAAyB,CAAC,UAAsC;IAC9E,IAAI,UAAU,KAAK,aAAa;QAAE,OAAO,qBAAqB,CAAA;IAC9D,OAAO,yBAAyB,CAAC,UAAwB,CAAC,CAAA;AAC5D,C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C,UAAsB,EAAE,UAAkB;IACpE,OAAO,kBAAkB,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,gBAAgB,CAAA;AACzE,CAAC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
// Standalone-package mirror of src/router/ai-ark-mapping.ts.
|
|
2
|
+
import { z } from 'zod'
|
|
3
|
+
|
|
4
|
+
const AI_ARK_FUNDING_STAGES = new Set([
|
|
5
|
+
'PRE_SEED', 'SEED', 'SERIES_A', 'SERIES_B', 'SERIES_C', 'SERIES_D', 'SERIES_E',
|
|
6
|
+
'SERIES_F', 'SERIES_G', 'SERIES_H', 'SERIES_I', 'SERIES_J', 'VENTURE_ROUND',
|
|
7
|
+
'ANGEL', 'PRIVATE_EQUITY', 'DEBT_FINANCING', 'CONVERTIBLE_NOTE', 'GRANT',
|
|
8
|
+
'CORPORATE_ROUND', 'EQUITY_CROWDFUNDING', 'PRODUCT_CROWDFUNDING',
|
|
9
|
+
'SECONDARY_MARKET', 'POST_IPO_EQUITY', 'POST_IPO_DEBT', 'POST_IPO_SECONDARY',
|
|
10
|
+
'NON_EQUITY_ASSISTANCE', 'INITIAL_COIN_OFFERING', 'UNDISCLOSED',
|
|
11
|
+
'SERIES_UNKNOWN', 'FUNDING_ROUND',
|
|
12
|
+
])
|
|
13
|
+
|
|
14
|
+
const AI_ARK_SENIORITY_ALIASES = new Map(Object.entries({
|
|
15
|
+
founder: 'founder', owner: 'owner', partner: 'partner',
|
|
16
|
+
c_suite: 'c_suite', c_level: 'c_suite', executive: 'c_suite',
|
|
17
|
+
vp: 'vp', vice_president: 'vp', director: 'director', head: 'head',
|
|
18
|
+
manager: 'manager', senior: 'senior', mid_level: 'mid-level',
|
|
19
|
+
individual_contributor: 'mid-level', entry: 'entry', entry_level: 'entry', intern: 'intern',
|
|
20
|
+
} as const))
|
|
21
|
+
|
|
22
|
+
const StringListSchema = z.array(z.string()).default([])
|
|
23
|
+
const AiArkLookalikeDomainsSchema = z.array(z.string()).max(5).default([])
|
|
24
|
+
|
|
25
|
+
const CompanySearchInputSchema = z.object({
|
|
26
|
+
keywords: StringListSchema,
|
|
27
|
+
industries: StringListSchema,
|
|
28
|
+
countries: StringListSchema,
|
|
29
|
+
similar_to_domains: AiArkLookalikeDomainsSchema,
|
|
30
|
+
funding_stages: StringListSchema,
|
|
31
|
+
min_employees: z.number().optional(),
|
|
32
|
+
max_employees: z.number().optional(),
|
|
33
|
+
limit: z.number().int().positive().default(10),
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
const PeopleSearchInputSchema = z.object({
|
|
37
|
+
job_titles: StringListSchema,
|
|
38
|
+
seniorities: StringListSchema,
|
|
39
|
+
keywords: StringListSchema,
|
|
40
|
+
locations: StringListSchema,
|
|
41
|
+
company_domains: StringListSchema,
|
|
42
|
+
company_linkedin_urls: StringListSchema,
|
|
43
|
+
limit: z.number().int().positive().default(10),
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
function toAiArkFundingStage(stage: string): string | undefined {
|
|
47
|
+
const normalized = stage.trim().toUpperCase().replace(/[^A-Z0-9]+/g, '_').replace(/^_|_$/g, '')
|
|
48
|
+
return AI_ARK_FUNDING_STAGES.has(normalized) ? normalized : undefined
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function toAiArkSeniority(value: string): string | undefined {
|
|
52
|
+
const normalized = value.trim().toLowerCase().replace(/[\s-]+/g, '_')
|
|
53
|
+
return AI_ARK_SENIORITY_ALIASES.get(normalized)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function isAiArkCompanySearchApplicable<Input extends object>(input: Input): boolean {
|
|
57
|
+
const parsed = CompanySearchInputSchema.safeParse(input)
|
|
58
|
+
if (!parsed.success) return false
|
|
59
|
+
const value = parsed.data
|
|
60
|
+
return value.keywords.length > 0
|
|
61
|
+
|| value.industries.length > 0
|
|
62
|
+
|| value.countries.length > 0
|
|
63
|
+
|| value.similar_to_domains.length > 0
|
|
64
|
+
|| value.funding_stages.some((stage) => toAiArkFundingStage(stage) !== undefined)
|
|
65
|
+
|| value.min_employees !== undefined
|
|
66
|
+
|| value.max_employees !== undefined
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function mapAiArkCompanySearchParams<Input extends object>(
|
|
70
|
+
input: Input,
|
|
71
|
+
countryNameOf: (countryCode: string) => string,
|
|
72
|
+
) {
|
|
73
|
+
const value = CompanySearchInputSchema.parse(input)
|
|
74
|
+
const fundingStages = value.funding_stages
|
|
75
|
+
.map(toAiArkFundingStage)
|
|
76
|
+
.filter((stage): stage is string => stage !== undefined)
|
|
77
|
+
|
|
78
|
+
return {
|
|
79
|
+
body: {
|
|
80
|
+
...(value.similar_to_domains.length > 0 && { lookalikeDomains: value.similar_to_domains }),
|
|
81
|
+
account: {
|
|
82
|
+
...(value.industries.length > 0 && {
|
|
83
|
+
industries: { any: { include: { mode: 'WORD', content: value.industries } } },
|
|
84
|
+
}),
|
|
85
|
+
...(value.keywords.length > 0 && {
|
|
86
|
+
keyword: {
|
|
87
|
+
any: {
|
|
88
|
+
include: {
|
|
89
|
+
sources: [
|
|
90
|
+
{ mode: 'SMART', source: 'NAME' },
|
|
91
|
+
{ mode: 'SMART', source: 'KEYWORD' },
|
|
92
|
+
{ mode: 'SMART', source: 'DESCRIPTION' },
|
|
93
|
+
{ mode: 'SMART', source: 'SEO' },
|
|
94
|
+
],
|
|
95
|
+
content: value.keywords,
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
}),
|
|
100
|
+
...(value.countries.length > 0 && {
|
|
101
|
+
location: { any: { include: value.countries.map(countryNameOf) } },
|
|
102
|
+
}),
|
|
103
|
+
...((value.min_employees !== undefined || value.max_employees !== undefined) && {
|
|
104
|
+
employeeSize: {
|
|
105
|
+
type: 'RANGE',
|
|
106
|
+
range: [{ start: value.min_employees, end: value.max_employees }],
|
|
107
|
+
},
|
|
108
|
+
}),
|
|
109
|
+
...(fundingStages.length > 0 && { funding: { type: fundingStages } }),
|
|
110
|
+
},
|
|
111
|
+
size: Math.min(value.limit, 100),
|
|
112
|
+
},
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function isAiArkPeopleSearchApplicable<Input extends object>(input: Input): boolean {
|
|
117
|
+
const parsed = PeopleSearchInputSchema.safeParse(input)
|
|
118
|
+
if (!parsed.success) return false
|
|
119
|
+
const value = parsed.data
|
|
120
|
+
return value.job_titles.length > 0
|
|
121
|
+
|| value.seniorities.some((seniority) => toAiArkSeniority(seniority) !== undefined)
|
|
122
|
+
|| value.keywords.length > 0
|
|
123
|
+
|| value.locations.length > 0
|
|
124
|
+
|| value.company_domains.length > 0
|
|
125
|
+
|| value.company_linkedin_urls.length > 0
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function mapAiArkPeopleSearchParams<Input extends object>(input: Input) {
|
|
129
|
+
const value = PeopleSearchInputSchema.parse(input)
|
|
130
|
+
const seniorities = value.seniorities
|
|
131
|
+
.map(toAiArkSeniority)
|
|
132
|
+
.filter((seniority): seniority is string => seniority !== undefined)
|
|
133
|
+
|
|
134
|
+
return {
|
|
135
|
+
body: {
|
|
136
|
+
...((value.company_domains.length > 0 || value.company_linkedin_urls.length > 0) && {
|
|
137
|
+
account: {
|
|
138
|
+
...(value.company_domains.length > 0 && {
|
|
139
|
+
domain: { any: { include: value.company_domains } },
|
|
140
|
+
}),
|
|
141
|
+
...(value.company_linkedin_urls.length > 0 && {
|
|
142
|
+
linkedin: { any: { include: value.company_linkedin_urls } },
|
|
143
|
+
}),
|
|
144
|
+
},
|
|
145
|
+
}),
|
|
146
|
+
contact: {
|
|
147
|
+
...(value.job_titles.length > 0 && {
|
|
148
|
+
experience: {
|
|
149
|
+
latest: {
|
|
150
|
+
title: { any: { include: { mode: 'SMART', content: value.job_titles } } },
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
}),
|
|
154
|
+
...(seniorities.length > 0 && { seniority: { any: { include: seniorities } } }),
|
|
155
|
+
...(value.locations.length > 0 && {
|
|
156
|
+
location: { any: { include: value.locations } },
|
|
157
|
+
}),
|
|
158
|
+
...(value.keywords.length > 0 && {
|
|
159
|
+
keyword: {
|
|
160
|
+
any: {
|
|
161
|
+
include: {
|
|
162
|
+
sources: [
|
|
163
|
+
{ mode: 'SMART', source: 'HEADLINE' },
|
|
164
|
+
{ mode: 'SMART', source: 'SUMMARY' },
|
|
165
|
+
],
|
|
166
|
+
content: value.keywords,
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
}),
|
|
171
|
+
},
|
|
172
|
+
size: Math.min(value.limit, 100),
|
|
173
|
+
},
|
|
174
|
+
}
|
|
175
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -171,6 +171,13 @@ import {
|
|
|
171
171
|
getPlaceReviewsHandler,
|
|
172
172
|
} from './tools/get-place-reviews.js'
|
|
173
173
|
|
|
174
|
+
import {
|
|
175
|
+
getWebsiteVisitorsName,
|
|
176
|
+
getWebsiteVisitorsDescription,
|
|
177
|
+
getWebsiteVisitorsSchema,
|
|
178
|
+
getWebsiteVisitorsHandler,
|
|
179
|
+
} from './tools/get-website-visitors.js'
|
|
180
|
+
|
|
174
181
|
import {
|
|
175
182
|
listDataSourcesName,
|
|
176
183
|
listDataSourcesDescription,
|
|
@@ -247,6 +254,10 @@ server.tool(listSkillsName, listSkillsDescription, listSkillsSchema, listSkillsH
|
|
|
247
254
|
server.tool(loadSkillName, loadSkillDescription, loadSkillSchema, loadSkillHandler)
|
|
248
255
|
server.tool(extractPostEngagementName, withKnowledgeFirstRequirement(extractPostEngagementDescription), extractPostEngagementSchema, extractPostEngagementHandler)
|
|
249
256
|
server.tool(getPlaceReviewsName, withKnowledgeFirstRequirement(getPlaceReviewsDescription), getPlaceReviewsSchema, getPlaceReviewsHandler)
|
|
257
|
+
// ColdIQ Visitor ID: read the leads identified on the account's own websites.
|
|
258
|
+
// Listing the websites themselves needs no tool — search_endpoints/call_endpoint
|
|
259
|
+
// already reach GET /visitor-id/websites.
|
|
260
|
+
server.tool(getWebsiteVisitorsName, withKnowledgeFirstRequirement(getWebsiteVisitorsDescription), getWebsiteVisitorsSchema, getWebsiteVisitorsHandler)
|
|
250
261
|
// Generic endpoint discovery + invoke: reach any integrated provider without a dedicated tool.
|
|
251
262
|
server.tool(searchEndpointsName, withKnowledgeFirstRequirement(searchEndpointsDescription), searchEndpointsSchema, searchEndpointsHandler)
|
|
252
263
|
server.tool(getEndpointDetailsName, withKnowledgeFirstRequirement(getEndpointDetailsDescription), getEndpointDetailsSchema, getEndpointDetailsHandler)
|
|
@@ -6,11 +6,15 @@
|
|
|
6
6
|
* configured and testable while public routing and tool schemas omit them.
|
|
7
7
|
*/
|
|
8
8
|
const DISABLED_PROVIDERS = new Set([
|
|
9
|
+
'blitzapi',
|
|
9
10
|
'companyenrich',
|
|
10
11
|
'people-data-labs',
|
|
11
12
|
])
|
|
12
13
|
|
|
13
14
|
const PROVIDER_ALIASES: Record<string, string> = {
|
|
15
|
+
blitz: 'blitzapi',
|
|
16
|
+
'blitz-api': 'blitzapi',
|
|
17
|
+
'blitzapi-reverse-email': 'blitzapi',
|
|
14
18
|
'company-enrich': 'companyenrich',
|
|
15
19
|
'companyenrich-props': 'companyenrich',
|
|
16
20
|
pdl: 'people-data-labs',
|
package/src/registry.ts
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
// ---------------------------------------------------------------------------
|
|
4
4
|
|
|
5
5
|
import { isProviderEnabled } from './provider-availability.js'
|
|
6
|
+
import {
|
|
7
|
+
isAiArkCompanySearchApplicable,
|
|
8
|
+
isAiArkPeopleSearchApplicable,
|
|
9
|
+
mapAiArkCompanySearchParams,
|
|
10
|
+
mapAiArkPeopleSearchParams,
|
|
11
|
+
} from './ai-ark-mapping.js'
|
|
6
12
|
|
|
7
13
|
export interface AsyncConfig {
|
|
8
14
|
/** Build the poll endpoint path from the ID returned by the create call */
|
|
@@ -1069,37 +1075,8 @@ const searchCompaniesProviders: ProviderEntry[] = [
|
|
|
1069
1075
|
endpoint: '/ai-ark/companies',
|
|
1070
1076
|
method: 'POST',
|
|
1071
1077
|
priority: 18,
|
|
1072
|
-
isApplicable:
|
|
1073
|
-
|
|
1074
|
-
isNonEmptyArray(input.industries) ||
|
|
1075
|
-
isNonEmptyArray(input.countries),
|
|
1076
|
-
mapParams: (input) => ({
|
|
1077
|
-
body: {
|
|
1078
|
-
account: {
|
|
1079
|
-
...(isNonEmptyArray(input.industries) && {
|
|
1080
|
-
industries: { any: { include: input.industries } },
|
|
1081
|
-
}),
|
|
1082
|
-
...(isNonEmptyArray(input.countries) && {
|
|
1083
|
-
location: { any: { include: (input.countries as string[]).map(isoCountryToName) } },
|
|
1084
|
-
}),
|
|
1085
|
-
...((input.min_employees !== undefined || input.max_employees !== undefined) && {
|
|
1086
|
-
employeeSize: {
|
|
1087
|
-
type: 'RANGE',
|
|
1088
|
-
range: [{ start: input.min_employees, end: input.max_employees }],
|
|
1089
|
-
},
|
|
1090
|
-
}),
|
|
1091
|
-
...(isNonEmptyArray(input.funding_stages) && {
|
|
1092
|
-
funding: { stage: { include: input.funding_stages } },
|
|
1093
|
-
}),
|
|
1094
|
-
},
|
|
1095
|
-
...(isNonEmptyArray(input.keywords) && {
|
|
1096
|
-
contact: {
|
|
1097
|
-
keywordsInProfile: { any: { include: input.keywords } },
|
|
1098
|
-
},
|
|
1099
|
-
}),
|
|
1100
|
-
size: Math.min((input.limit as number | undefined) ?? 10, 100),
|
|
1101
|
-
},
|
|
1102
|
-
}),
|
|
1078
|
+
isApplicable: isAiArkCompanySearchApplicable,
|
|
1079
|
+
mapParams: (input) => mapAiArkCompanySearchParams(input, isoCountryToName),
|
|
1103
1080
|
hasResult: (data) => {
|
|
1104
1081
|
const d = data as Record<string, unknown>
|
|
1105
1082
|
return isNonEmptyArray(d.content)
|
|
@@ -1518,29 +1495,8 @@ const findPeopleProviders: ProviderEntry[] = [
|
|
|
1518
1495
|
endpoint: '/ai-ark/people',
|
|
1519
1496
|
method: 'POST',
|
|
1520
1497
|
priority: 8,
|
|
1521
|
-
isApplicable:
|
|
1522
|
-
|
|
1523
|
-
isNonEmptyArray(input.seniorities) ||
|
|
1524
|
-
isNonEmptyArray(input.keywords),
|
|
1525
|
-
mapParams: (input) => ({
|
|
1526
|
-
body: {
|
|
1527
|
-
contact: {
|
|
1528
|
-
...(isNonEmptyArray(input.job_titles) && {
|
|
1529
|
-
departmentAndFunction: { any: { include: input.job_titles } },
|
|
1530
|
-
}),
|
|
1531
|
-
...(isNonEmptyArray(input.seniorities) && {
|
|
1532
|
-
seniority: { any: { include: input.seniorities } },
|
|
1533
|
-
}),
|
|
1534
|
-
...(isNonEmptyArray(input.locations) && {
|
|
1535
|
-
location: { any: { include: input.locations } },
|
|
1536
|
-
}),
|
|
1537
|
-
...(isNonEmptyArray(input.keywords) && {
|
|
1538
|
-
keywordsInProfile: { any: { include: input.keywords } },
|
|
1539
|
-
}),
|
|
1540
|
-
},
|
|
1541
|
-
size: Math.min((input.limit as number | undefined) ?? 10, 100),
|
|
1542
|
-
},
|
|
1543
|
-
}),
|
|
1498
|
+
isApplicable: isAiArkPeopleSearchApplicable,
|
|
1499
|
+
mapParams: mapAiArkPeopleSearchParams,
|
|
1544
1500
|
hasResult: (data) => {
|
|
1545
1501
|
const d = data as Record<string, unknown>
|
|
1546
1502
|
return isNonEmptyArray(d.content)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
import { callApi } from '../client.js'
|
|
3
|
+
|
|
4
|
+
export const getWebsiteVisitorsName = 'get_website_visitors'
|
|
5
|
+
|
|
6
|
+
export const getWebsiteVisitorsDescription =
|
|
7
|
+
'Read the leads ColdIQ Visitor ID identified on one of your websites — the people who visited (with verified work email, title and LinkedIn where available) or the companies they belong to (with firmographics). ' +
|
|
8
|
+
'Use `type: "people"` for enriched contacts and `type: "companies"` for enriched accounts. To find `website_id`, call the free `GET /visitor-id/websites` endpoint through call_endpoint (api "visitor-id"). ' +
|
|
9
|
+
'Results are paginated: pass the `cursor` from the previous response to fetch the next page. Free — identifications are billed when they are delivered, not when you read them.'
|
|
10
|
+
|
|
11
|
+
export const getWebsiteVisitorsSchema = {
|
|
12
|
+
website_id: z
|
|
13
|
+
.number()
|
|
14
|
+
.int()
|
|
15
|
+
.describe('The tracked website to read leads from, as returned by GET /visitor-id/websites.'),
|
|
16
|
+
type: z
|
|
17
|
+
.enum(['people', 'companies'])
|
|
18
|
+
.describe('"people" returns identified contacts (email, title, LinkedIn); "companies" returns identified accounts (firmographics).'),
|
|
19
|
+
limit: z
|
|
20
|
+
.number()
|
|
21
|
+
.int()
|
|
22
|
+
.min(1)
|
|
23
|
+
.max(100)
|
|
24
|
+
.optional()
|
|
25
|
+
.describe('Records per page (1–100). Default is the identification engine\'s own default.'),
|
|
26
|
+
cursor: z.string().optional().describe('Pagination cursor from the previous response.'),
|
|
27
|
+
email: z
|
|
28
|
+
.string()
|
|
29
|
+
.optional()
|
|
30
|
+
.describe('people only — return the identified person with this email address.'),
|
|
31
|
+
account_id: z
|
|
32
|
+
.string()
|
|
33
|
+
.optional()
|
|
34
|
+
.describe('people only — return only the people identified at this company (account id from a "companies" result).'),
|
|
35
|
+
domain: z
|
|
36
|
+
.string()
|
|
37
|
+
.optional()
|
|
38
|
+
.describe('companies only — return the identified company with this domain.'),
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export async function getWebsiteVisitorsHandler(input: Record<string, unknown>) {
|
|
42
|
+
const websiteId = input.website_id as number
|
|
43
|
+
const type = input.type as 'people' | 'companies'
|
|
44
|
+
const isPeople = type === 'people'
|
|
45
|
+
const path = `/visitor-id/websites/${websiteId}/${isPeople ? 'contacts' : 'accounts'}`
|
|
46
|
+
|
|
47
|
+
const query: Record<string, string> = {}
|
|
48
|
+
if (input.limit !== undefined) query.limit = String(input.limit)
|
|
49
|
+
if (input.cursor) query.cursor = String(input.cursor)
|
|
50
|
+
if (isPeople) {
|
|
51
|
+
if (input.email) query.email = String(input.email)
|
|
52
|
+
if (input.account_id) query.account_id = String(input.account_id)
|
|
53
|
+
} else if (input.domain) {
|
|
54
|
+
query.domain = String(input.domain)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const res = await callApi('GET', path, undefined, query)
|
|
58
|
+
if (!res.ok) {
|
|
59
|
+
return {
|
|
60
|
+
content: [
|
|
61
|
+
{
|
|
62
|
+
type: 'text' as const,
|
|
63
|
+
text: JSON.stringify({
|
|
64
|
+
error: `Failed to read identified ${isPeople ? 'people' : 'companies'}`,
|
|
65
|
+
status: res.status,
|
|
66
|
+
data: res.data,
|
|
67
|
+
}),
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
isError: true,
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return { content: [{ type: 'text' as const, text: JSON.stringify({ data: res.data }) }] }
|
|
74
|
+
}
|
|
@@ -202,14 +202,14 @@ const GATED_DESCRIPTIONS: Partial<Record<Capability, Partial<Record<string, Gate
|
|
|
202
202
|
'linkupapi-fundraising': { kind: 'requires', fields: 'funding filters and keywords or industries' },
|
|
203
203
|
'linkupapi-hiring': { kind: 'requires', fields: 'is_hiring: true' },
|
|
204
204
|
'prospeo-search-company': { kind: 'requires', fields: 'keywords, industries, or countries' },
|
|
205
|
-
'ai-ark-companies': { kind: 'requires', fields: 'keywords, industries, or
|
|
205
|
+
'ai-ark-companies': { kind: 'requires', fields: 'keywords, industries, countries, similar_to_domains, funding_stages, or employee range' },
|
|
206
206
|
},
|
|
207
207
|
// -------------------------------------------------------------------------
|
|
208
208
|
find_people: {
|
|
209
209
|
'linkupapi-search-profiles': { kind: 'incompatible_with', fields: 'company_linkedin_urls or company_domains (this provider only works without company filters)' },
|
|
210
210
|
'sumble-people-find': { kind: 'requires', fields: 'company_domains or company_linkedin_urls, and job_titles or seniorities' },
|
|
211
211
|
'prospeo-search-person': { kind: 'requires', fields: 'job_titles or company_domains' },
|
|
212
|
-
'ai-ark-people': { kind: 'requires', fields: 'job_titles, seniorities, or
|
|
212
|
+
'ai-ark-people': { kind: 'requires', fields: 'job_titles, seniorities, keywords, locations, or company identifiers' },
|
|
213
213
|
'findymail-search-employees': { kind: 'requires', fields: 'company_domains and job_titles' },
|
|
214
214
|
'fullenrich-people-search': { kind: 'requires', fields: 'company_domains (upstream does not accept LinkedIn URL filters)' },
|
|
215
215
|
pdl: { kind: 'requires', fields: 'company_domains, company_linkedin_urls, job_titles, or seniorities' },
|
|
@@ -2,10 +2,13 @@ import { describe, expect, it } from 'vitest'
|
|
|
2
2
|
import { isProviderEnabled as isWorkerProviderEnabled } from '../../src/lib/provider-availability.js'
|
|
3
3
|
import { isProviderEnabled } from '../src/provider-availability.js'
|
|
4
4
|
import { getConfiguredProviders, getProviders, type Capability } from '../src/registry.js'
|
|
5
|
+
import { enrichCompanySchema } from '../src/tools/enrich-company.js'
|
|
6
|
+
import { enrichPersonSchema } from '../src/tools/enrich-person.js'
|
|
5
7
|
import { findEmailSchema } from '../src/tools/find-email.js'
|
|
6
8
|
import { findEmailsSchema } from '../src/tools/find-emails.js'
|
|
7
9
|
import { findEmailsBulkSchema } from '../src/tools/find-emails-bulk.js'
|
|
8
10
|
import { getEndpointDetailsSchema } from '../src/tools/get-endpoint-details.js'
|
|
11
|
+
import { searchCompaniesSchema } from '../src/tools/search-companies.js'
|
|
9
12
|
import { listDataSourcesHandler } from '../src/tools/list-data-sources.js'
|
|
10
13
|
import {
|
|
11
14
|
FIND_EMAILS_PROVIDERS,
|
|
@@ -36,6 +39,12 @@ const CAPABILITIES: Capability[] = [
|
|
|
36
39
|
describe('standalone MCP provider availability', () => {
|
|
37
40
|
it('mirrors every disabled-provider alias from the Worker policy', () => {
|
|
38
41
|
for (const alias of [
|
|
42
|
+
'blitzapi',
|
|
43
|
+
'BlitzAPI',
|
|
44
|
+
'Blitz API',
|
|
45
|
+
'Blitz',
|
|
46
|
+
'blitzapi-reverse-email',
|
|
47
|
+
'blitzapi_reverse_email',
|
|
39
48
|
'companyenrich',
|
|
40
49
|
'CompanyEnrich',
|
|
41
50
|
'Company Enrich',
|
|
@@ -58,12 +67,17 @@ describe('standalone MCP provider availability', () => {
|
|
|
58
67
|
expect(getConfiguredProviders('find_people').some((provider) => provider.id === 'pdl')).toBe(true)
|
|
59
68
|
expect(getConfiguredProviders('search_companies').some((provider) => provider.id === 'companyenrich')).toBe(true)
|
|
60
69
|
expect(getConfiguredProviders('enrich_company').some((provider) => provider.id === 'companyenrich_props')).toBe(true)
|
|
70
|
+
expect(getConfiguredProviders('search_companies').some((provider) => provider.id === 'blitzapi')).toBe(true)
|
|
71
|
+
expect(getConfiguredProviders('enrich_company').some((provider) => provider.id === 'blitzapi')).toBe(true)
|
|
72
|
+
expect(getConfiguredProviders('enrich_person').some((provider) => provider.id === 'blitzapi-reverse-email')).toBe(true)
|
|
61
73
|
|
|
62
74
|
for (const capability of CAPABILITIES) {
|
|
63
75
|
expect(getProviders(capability).every((provider) => isProviderEnabled(provider.id))).toBe(true)
|
|
64
76
|
}
|
|
65
77
|
expect(FIND_EMAILS_PROVIDERS.every(isProviderEnabled)).toBe(true)
|
|
66
78
|
expect(getProvidersForCapability('find_people')).not.toContain('pdl')
|
|
79
|
+
expect(getProvidersForCapability('search_companies')).not.toContain('blitzapi')
|
|
80
|
+
expect(getProvidersForCapability('enrich_person')).not.toContain('blitzapi-reverse-email')
|
|
67
81
|
})
|
|
68
82
|
|
|
69
83
|
it('rejects an explicit disabled-provider pin without advertising it as available', () => {
|
|
@@ -72,6 +86,9 @@ describe('standalone MCP provider availability', () => {
|
|
|
72
86
|
['find_emails', 'pdl-person-enrich'],
|
|
73
87
|
['search_companies', 'companyenrich'],
|
|
74
88
|
['enrich_company', 'companyenrich_props'],
|
|
89
|
+
['search_companies', 'blitzapi'],
|
|
90
|
+
['enrich_company', 'blitzapi'],
|
|
91
|
+
['enrich_person', 'blitzapi-reverse-email'],
|
|
75
92
|
] as const) {
|
|
76
93
|
const result = resolvePreferredProviders(capability, {}, [provider])
|
|
77
94
|
expect(result.ok).toBe(false)
|
|
@@ -92,11 +109,15 @@ describe('standalone MCP provider availability', () => {
|
|
|
92
109
|
findEmailsSchema.max_credits.description,
|
|
93
110
|
findEmailsBulkSchema.max_credits.description,
|
|
94
111
|
getEndpointDetailsSchema.api.description,
|
|
112
|
+
searchCompaniesSchema.use_providers.description,
|
|
113
|
+
enrichCompanySchema.use_providers.description,
|
|
114
|
+
enrichPersonSchema.use_providers.description,
|
|
95
115
|
].join('\n').toLowerCase()
|
|
96
116
|
|
|
97
117
|
expect(publicMetadata).not.toContain('people data labs')
|
|
98
118
|
expect(publicMetadata).not.toMatch(/\bpdl\b/)
|
|
99
119
|
expect(publicMetadata).not.toContain('companyenrich')
|
|
100
120
|
expect(publicMetadata).not.toContain('/companyenrich')
|
|
121
|
+
expect(publicMetadata).not.toMatch(/\bblitz(api)?\b/)
|
|
101
122
|
})
|
|
102
123
|
})
|