@coldiq/mcp 5.4.7 → 5.4.8

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 CHANGED
@@ -39,6 +39,8 @@ import { getSessionUsageName, getSessionUsageDescription, getSessionUsageSchema,
39
39
  import { extractPostEngagementName, extractPostEngagementDescription, extractPostEngagementSchema, extractPostEngagementHandler, } from './tools/extract-post-engagement.js';
40
40
  import { getPlaceReviewsName, getPlaceReviewsDescription, getPlaceReviewsSchema, getPlaceReviewsHandler, } from './tools/get-place-reviews.js';
41
41
  import { getWebsiteVisitorsName, getWebsiteVisitorsDescription, getWebsiteVisitorsSchema, getWebsiteVisitorsHandler, } from './tools/get-website-visitors.js';
42
+ import { setupWebsiteVisitorsName, setupWebsiteVisitorsDescription, setupWebsiteVisitorsSchema, setupWebsiteVisitorsHandler, } from './tools/setup-website-visitors.js';
43
+ import { listWebsiteVisitorsSitesName, listWebsiteVisitorsSitesDescription, listWebsiteVisitorsSitesSchema, listWebsiteVisitorsSitesHandler, } from './tools/list-website-visitors-sites.js';
42
44
  import { listDataSourcesName, listDataSourcesDescription, listDataSourcesSchema, listDataSourcesHandler, } from './tools/list-data-sources.js';
43
45
  import { listSkillsName, listSkillsDescription, listSkillsSchema, listSkillsHandler, } from './tools/list-skills.js';
44
46
  import { loadSkillName, loadSkillDescription, loadSkillSchema, loadSkillHandler, } from './tools/load-skill.js';
@@ -99,9 +101,11 @@ registerPublicTool(listSkillsName, listSkillsDescription, listSkillsSchema, list
99
101
  registerPublicTool(loadSkillName, loadSkillDescription, loadSkillSchema, loadSkillHandler);
100
102
  registerPublicTool(extractPostEngagementName, withKnowledgeFirstRequirement(extractPostEngagementDescription), extractPostEngagementSchema, extractPostEngagementHandler);
101
103
  registerPublicTool(getPlaceReviewsName, withKnowledgeFirstRequirement(getPlaceReviewsDescription), getPlaceReviewsSchema, getPlaceReviewsHandler);
102
- // ColdIQ Visitor ID: read the leads identified on the account's own websites.
103
- // Listing the websites themselves needs no tool search_endpoints/call_endpoint
104
- // already reach GET /visitor-id/websites.
104
+ // ColdIQ Visitor ID: set up a tracked website (one pixel per domain), list the
105
+ // account's websites (with install state + usage), read the leads identified on them.
106
+ // All three are free; identifications are billed when delivered.
107
+ registerPublicTool(setupWebsiteVisitorsName, withKnowledgeFirstRequirement(setupWebsiteVisitorsDescription), setupWebsiteVisitorsSchema, setupWebsiteVisitorsHandler);
108
+ registerPublicTool(listWebsiteVisitorsSitesName, withKnowledgeFirstRequirement(listWebsiteVisitorsSitesDescription), listWebsiteVisitorsSitesSchema, listWebsiteVisitorsSitesHandler);
105
109
  registerPublicTool(getWebsiteVisitorsName, withKnowledgeFirstRequirement(getWebsiteVisitorsDescription), getWebsiteVisitorsSchema, getWebsiteVisitorsHandler);
106
110
  // Generic endpoint discovery + invoke: reach any integrated provider without a dedicated tool.
107
111
  registerPublicTool(searchEndpointsName, withKnowledgeFirstRequirement(searchEndpointsDescription), searchEndpointsSchema, searchEndpointsHandler);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAqB,MAAM,yCAAyC,CAAA;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAA;AAChF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAA;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,qBA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kB,CAAC,wBAAwB,EAAE,6BAA6B,CAAC,+BAA+B,CAAC,EAAE,0BAA0B,EAAE,2BAA2B,CAAC,CAAA;AACrK,kBAAkB,CAAC,4BAA4B,EAAE,6BAA6B,CAAC,mCAAmC,CAAC,EAAE,8BAA8B,EAAE,+BAA+B,CAAC,CAAA;AACrL,kBAAkB,CAAC,sBAAsB,EAAE,6BAA6B,CAAC,6BAA6B,CAAC,EAAE,wBAAwB,EAAE,yBAAyB,CAAC,CAAA;AAC7J,+FAA+F;AAC/F,kBAAkB,CAAC,mBAAmB,EAAE,6BAA6B,CAAC,0BAA0B,CAAC,EAAE,qBAAqB,EAAE,sBAAsB,CAAC,CAAA;AACjJ,kBAAkB,CAAC,sBAAsB,EAAE,6BAA6B,CAAC,6BAA6B,CAAC,EAAE,wBAAwB,EAAE,yBAAyB,CAAC,CAAA;AAC7J,kBAAkB,CAAC,gBAAgB,EAAE,6BAA6B,CAAC,uBAAuB,CAAC,EAAE,kBAAkB,EAAE,mBAAmB,CAAC,CAAA;AAErI,8BAA8B;AAC9B,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAA;AAC5C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA"}
@@ -2,13 +2,13 @@ import { z } from 'zod';
2
2
  import { callApi } from '../client.js';
3
3
  export const getWebsiteVisitorsName = 'get_website_visitors';
4
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"). ' +
5
+ 'Use `type: "people"` for enriched contacts and `type: "companies"` for enriched accounts. To find `website_id`, call `list_website_visitors_sites`; to add a site, call `setup_website_visitors`. ' +
6
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
7
  export const getWebsiteVisitorsSchema = {
8
8
  website_id: z
9
9
  .number()
10
10
  .int()
11
- .describe('The tracked website to read leads from, as returned by GET /visitor-id/websites.'),
11
+ .describe('The tracked website to read leads from, as returned by `list_website_visitors_sites`.'),
12
12
  type: z
13
13
  .enum(['people', 'companies'])
14
14
  .describe('"people" returns identified contacts (email, title, LinkedIn); "companies" returns identified accounts (firmographics).'),
@@ -1 +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,QAAQ,EAAE;SACV,QAAQ,CAAC,gFAAgF,CAAC;IAC7F,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+CAA+C,CAAC;IACvF,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,qEAAqE,CAAC;IAClF,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,QAAQ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C,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"}
@@ -0,0 +1,19 @@
1
+ import { z } from 'zod';
2
+ export declare const listWebsiteVisitorsSitesName = "list_website_visitors_sites";
3
+ export declare const listWebsiteVisitorsSitesDescription: string;
4
+ export declare const listWebsiteVisitorsSitesSchema: {
5
+ website_id: z.ZodOptional<z.ZodNumber>;
6
+ };
7
+ export declare function listWebsiteVisitorsSitesHandler(input: Record<string, unknown>): Promise<{
8
+ content: {
9
+ type: "text";
10
+ text: string;
11
+ }[];
12
+ isError: boolean;
13
+ } | {
14
+ content: {
15
+ type: "text";
16
+ text: string;
17
+ }[];
18
+ }>;
19
+ //# sourceMappingURL=list-website-visitors-sites.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-website-visitors-sites.d.ts","sourceRoot":"","sources":["../../src/tools/list-website-visitors-sites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,4BAA4B,gCAAgC,CAAA;AAEzE,eAAO,MAAM,mCAAmC,QAImE,CAAA;AAEnH,eAAO,MAAM,8BAA8B;;CAM1C,CAAA;AASD,wBAAsB,+BAA+B,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;GAsBnF"}
@@ -0,0 +1,43 @@
1
+ import { z } from 'zod';
2
+ import { callApi } from '../client.js';
3
+ export const listWebsiteVisitorsSitesName = 'list_website_visitors_sites';
4
+ export const listWebsiteVisitorsSitesDescription = 'List the websites ColdIQ Visitor ID tracks for this account — each with its `id`, `domain`, `status`, whether it is `identifying` right now, and its `monthly_limit` (credits, companies, people, used_credits). ' +
5
+ 'Pass `website_id` to get one website in full (pixel `embed_html` and `install` state; `install` null = state unknown, re-check later) together with its usage this period (people and companies identified, what it cost, and the live `credits_per_person` / `credits_per_company` — a person costs 6× a company; always quote these live values, never numbers from memory) — returned as `{ website, usage }`; when the usage read fails, `usage` is null and `usage_error` carries the status and message. ' +
6
+ 'Free. Use the `id` as `website_id` in `get_website_visitors`; add a new site with `setup_website_visitors` (a 409 there whose message mentions a deactivated workspace means the domain is held by a deactivated workspace — do not retry, tell the user to contact ColdIQ support; any other 409 means the domain is already in this list — reuse it). ' +
7
+ 'Any write (POST/PATCH/PUT/DELETE) returns 403 for a workspace member key — ask the workspace owner or an admin.';
8
+ export const listWebsiteVisitorsSitesSchema = {
9
+ website_id: z
10
+ .number()
11
+ .int()
12
+ .optional()
13
+ .describe('Return this one website with its install state and usage instead of the list.'),
14
+ };
15
+ function failure(error, status, data) {
16
+ return {
17
+ content: [{ type: 'text', text: JSON.stringify({ error, status, data }) }],
18
+ isError: true,
19
+ };
20
+ }
21
+ export async function listWebsiteVisitorsSitesHandler(input) {
22
+ if (input.website_id === undefined) {
23
+ const res = await callApi('GET', '/visitor-id/websites');
24
+ if (!res.ok)
25
+ return failure('Failed to list tracked websites', res.status, res.data);
26
+ return { content: [{ type: 'text', text: JSON.stringify({ data: res.data }) }] };
27
+ }
28
+ const websiteId = input.website_id;
29
+ const [website, usage] = await Promise.all([
30
+ callApi('GET', `/visitor-id/websites/${websiteId}`),
31
+ callApi('GET', `/visitor-id/websites/${websiteId}/usage`),
32
+ ]);
33
+ if (!website.ok)
34
+ return failure('Failed to read tracked website', website.status, website.data);
35
+ // A failed usage read must not discard the website the caller asked for: the pixel
36
+ // and install state stay useful on their own, so the usage gap is reported next to
37
+ // them instead of replacing them.
38
+ const data = usage.ok
39
+ ? { website: website.data, usage: usage.data }
40
+ : { website: website.data, usage: null, usage_error: { status: usage.status, data: usage.data } };
41
+ return { content: [{ type: 'text', text: JSON.stringify({ data }) }] };
42
+ }
43
+ //# sourceMappingURL=list-website-visitors-sites.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-website-visitors-sites.js","sourceRoot":"","sources":["../../src/tools/list-website-visitors-sites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,MAAM,CAAC,MAAM,4BAA4B,GAAG,6BAA6B,CAAA;AAEzE,MAAM,CAAC,MAAM,mCAAmC,GAC9C,mNAAmN;IACnN,ifAAif;IACjf,0VAA0V;IAC1V,iHAAiH,CAAA;AAEnH,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,GAAG,EAAE;SACL,QAAQ,EAAE;SACV,QAAQ,CAAC,+EAA+E,CAAC;CAC7F,CAAA;AAED,SAAS,OAAO,CAAC,KAAa,EAAE,MAAc,EAAE,IAAa;IAC3D,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,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O,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,CAAA;IAEnG,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAA;AACjF,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ export declare const setupWebsiteVisitorsName = "setup_website_visitors";
3
+ export declare const setupWebsiteVisitorsDescription: string;
4
+ export declare const setupWebsiteVisitorsSchema: {
5
+ domain: z.ZodString;
6
+ name: z.ZodOptional<z.ZodString>;
7
+ };
8
+ export declare function setupWebsiteVisitorsHandler(input: Record<string, unknown>): Promise<{
9
+ content: {
10
+ type: "text";
11
+ text: string;
12
+ }[];
13
+ isError: boolean;
14
+ } | {
15
+ content: {
16
+ type: "text";
17
+ text: string;
18
+ }[];
19
+ isError?: undefined;
20
+ }>;
21
+ //# sourceMappingURL=setup-website-visitors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup-website-visitors.d.ts","sourceRoot":"","sources":["../../src/tools/setup-website-visitors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,wBAAwB,2BAA2B,CAAA;AAEhE,eAAO,MAAM,+BAA+B,QAOyB,CAAA;AAErE,eAAO,MAAM,0BAA0B;;;CAMtC,CAAA;AAED,wBAAsB,2BAA2B,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;GAiB/E"}
@@ -0,0 +1,36 @@
1
+ import { z } from 'zod';
2
+ import { callApi } from '../client.js';
3
+ export const setupWebsiteVisitorsName = 'setup_website_visitors';
4
+ export const setupWebsiteVisitorsDescription = 'Set up ColdIQ Visitor ID on a website the user owns: creates the tracked website for a domain and returns it with the ready-to-paste tracking pixel (`embed_html`, `script_url`) and its install state (`install.is_installed`). ' +
5
+ '`install` can be null: that means the install state is unknown — re-check later, never report "not installed" from null. ' +
6
+ 'One pixel per domain: a 409 whose message mentions a deactivated workspace = the domain is held by a deactivated workspace — do not retry, tell the user to contact ColdIQ support; any other 409 = a pixel already exists for this domain — call `list_website_visitors_sites` and reuse it. ' +
7
+ 'Any write (POST/PATCH/PUT/DELETE) returns 403 for a workspace member key — ask the workspace owner or an admin. ' +
8
+ 'Setup and reads are free. Identifications are billed once the pixel is live, within the site\'s monthly limit; a person costs 6× a company. ' +
9
+ 'Always quote the live `credits_per_person` / `credits_per_company` from `list_website_visitors_sites` with a `website_id`, never numbers from memory. ' +
10
+ 'Read the identified leads afterwards with `get_website_visitors`.';
11
+ export const setupWebsiteVisitorsSchema = {
12
+ domain: z
13
+ .string()
14
+ .min(1)
15
+ .describe('Website domain the tracking pixel will identify visitors for, e.g. "coldiq.com".'),
16
+ name: z.string().optional().describe('Display name for the website (defaults to the domain).'),
17
+ };
18
+ export async function setupWebsiteVisitorsHandler(input) {
19
+ const body = { domain: String(input.domain) };
20
+ if (input.name)
21
+ body.name = String(input.name);
22
+ const res = await callApi('POST', '/visitor-id/websites', body);
23
+ if (!res.ok) {
24
+ return {
25
+ content: [
26
+ {
27
+ type: 'text',
28
+ text: JSON.stringify({ error: 'Failed to set up website visitor identification', status: res.status, data: res.data }),
29
+ },
30
+ ],
31
+ isError: true,
32
+ };
33
+ }
34
+ return { content: [{ type: 'text', text: JSON.stringify({ data: res.data }) }] };
35
+ }
36
+ //# sourceMappingURL=setup-website-visitors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup-website-visitors.js","sourceRoot":"","sources":["../../src/tools/setup-website-visitors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,M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,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAA;AAC3F,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coldiq/mcp",
3
- "version": "5.4.7",
3
+ "version": "5.4.8",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
package/src/index.ts CHANGED
@@ -179,6 +179,20 @@ import {
179
179
  getWebsiteVisitorsHandler,
180
180
  } from './tools/get-website-visitors.js'
181
181
 
182
+ import {
183
+ setupWebsiteVisitorsName,
184
+ setupWebsiteVisitorsDescription,
185
+ setupWebsiteVisitorsSchema,
186
+ setupWebsiteVisitorsHandler,
187
+ } from './tools/setup-website-visitors.js'
188
+
189
+ import {
190
+ listWebsiteVisitorsSitesName,
191
+ listWebsiteVisitorsSitesDescription,
192
+ listWebsiteVisitorsSitesSchema,
193
+ listWebsiteVisitorsSitesHandler,
194
+ } from './tools/list-website-visitors-sites.js'
195
+
182
196
  import {
183
197
  listDataSourcesName,
184
198
  listDataSourcesDescription,
@@ -268,9 +282,11 @@ registerPublicTool(listSkillsName, listSkillsDescription, listSkillsSchema, list
268
282
  registerPublicTool(loadSkillName, loadSkillDescription, loadSkillSchema, loadSkillHandler)
269
283
  registerPublicTool(extractPostEngagementName, withKnowledgeFirstRequirement(extractPostEngagementDescription), extractPostEngagementSchema, extractPostEngagementHandler)
270
284
  registerPublicTool(getPlaceReviewsName, withKnowledgeFirstRequirement(getPlaceReviewsDescription), getPlaceReviewsSchema, getPlaceReviewsHandler)
271
- // ColdIQ Visitor ID: read the leads identified on the account's own websites.
272
- // Listing the websites themselves needs no tool search_endpoints/call_endpoint
273
- // already reach GET /visitor-id/websites.
285
+ // ColdIQ Visitor ID: set up a tracked website (one pixel per domain), list the
286
+ // account's websites (with install state + usage), read the leads identified on them.
287
+ // All three are free; identifications are billed when delivered.
288
+ registerPublicTool(setupWebsiteVisitorsName, withKnowledgeFirstRequirement(setupWebsiteVisitorsDescription), setupWebsiteVisitorsSchema, setupWebsiteVisitorsHandler)
289
+ registerPublicTool(listWebsiteVisitorsSitesName, withKnowledgeFirstRequirement(listWebsiteVisitorsSitesDescription), listWebsiteVisitorsSitesSchema, listWebsiteVisitorsSitesHandler)
274
290
  registerPublicTool(getWebsiteVisitorsName, withKnowledgeFirstRequirement(getWebsiteVisitorsDescription), getWebsiteVisitorsSchema, getWebsiteVisitorsHandler)
275
291
  // Generic endpoint discovery + invoke: reach any integrated provider without a dedicated tool.
276
292
  registerPublicTool(searchEndpointsName, withKnowledgeFirstRequirement(searchEndpointsDescription), searchEndpointsSchema, searchEndpointsHandler)
@@ -5,14 +5,14 @@ export const getWebsiteVisitorsName = 'get_website_visitors'
5
5
 
6
6
  export const getWebsiteVisitorsDescription =
7
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"). ' +
8
+ 'Use `type: "people"` for enriched contacts and `type: "companies"` for enriched accounts. To find `website_id`, call `list_website_visitors_sites`; to add a site, call `setup_website_visitors`. ' +
9
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
10
 
11
11
  export const getWebsiteVisitorsSchema = {
12
12
  website_id: z
13
13
  .number()
14
14
  .int()
15
- .describe('The tracked website to read leads from, as returned by GET /visitor-id/websites.'),
15
+ .describe('The tracked website to read leads from, as returned by `list_website_visitors_sites`.'),
16
16
  type: z
17
17
  .enum(['people', 'companies'])
18
18
  .describe('"people" returns identified contacts (email, title, LinkedIn); "companies" returns identified accounts (firmographics).'),
@@ -0,0 +1,49 @@
1
+ import { z } from 'zod'
2
+ import { callApi } from '../client.js'
3
+
4
+ export const listWebsiteVisitorsSitesName = 'list_website_visitors_sites'
5
+
6
+ export const listWebsiteVisitorsSitesDescription =
7
+ 'List the websites ColdIQ Visitor ID tracks for this account — each with its `id`, `domain`, `status`, whether it is `identifying` right now, and its `monthly_limit` (credits, companies, people, used_credits). ' +
8
+ 'Pass `website_id` to get one website in full (pixel `embed_html` and `install` state; `install` null = state unknown, re-check later) together with its usage this period (people and companies identified, what it cost, and the live `credits_per_person` / `credits_per_company` — a person costs 6× a company; always quote these live values, never numbers from memory) — returned as `{ website, usage }`; when the usage read fails, `usage` is null and `usage_error` carries the status and message. ' +
9
+ 'Free. Use the `id` as `website_id` in `get_website_visitors`; add a new site with `setup_website_visitors` (a 409 there whose message mentions a deactivated workspace means the domain is held by a deactivated workspace — do not retry, tell the user to contact ColdIQ support; any other 409 means the domain is already in this list — reuse it). ' +
10
+ 'Any write (POST/PATCH/PUT/DELETE) returns 403 for a workspace member key — ask the workspace owner or an admin.'
11
+
12
+ export const listWebsiteVisitorsSitesSchema = {
13
+ website_id: z
14
+ .number()
15
+ .int()
16
+ .optional()
17
+ .describe('Return this one website with its install state and usage instead of the list.'),
18
+ }
19
+
20
+ function failure(error: string, status: number, data: unknown) {
21
+ return {
22
+ content: [{ type: 'text' as const, text: JSON.stringify({ error, status, data }) }],
23
+ isError: true,
24
+ }
25
+ }
26
+
27
+ export async function listWebsiteVisitorsSitesHandler(input: Record<string, unknown>) {
28
+ if (input.website_id === undefined) {
29
+ const res = await callApi('GET', '/visitor-id/websites')
30
+ if (!res.ok) return failure('Failed to list tracked websites', res.status, res.data)
31
+ return { content: [{ type: 'text' as const, text: JSON.stringify({ data: res.data }) }] }
32
+ }
33
+
34
+ const websiteId = input.website_id as number
35
+ const [website, usage] = await Promise.all([
36
+ callApi('GET', `/visitor-id/websites/${websiteId}`),
37
+ callApi('GET', `/visitor-id/websites/${websiteId}/usage`),
38
+ ])
39
+ if (!website.ok) return failure('Failed to read tracked website', website.status, website.data)
40
+
41
+ // A failed usage read must not discard the website the caller asked for: the pixel
42
+ // and install state stay useful on their own, so the usage gap is reported next to
43
+ // them instead of replacing them.
44
+ const data = usage.ok
45
+ ? { website: website.data, usage: usage.data }
46
+ : { website: website.data, usage: null, usage_error: { status: usage.status, data: usage.data } }
47
+
48
+ return { content: [{ type: 'text' as const, text: JSON.stringify({ data }) }] }
49
+ }
@@ -0,0 +1,40 @@
1
+ import { z } from 'zod'
2
+ import { callApi } from '../client.js'
3
+
4
+ export const setupWebsiteVisitorsName = 'setup_website_visitors'
5
+
6
+ export const setupWebsiteVisitorsDescription =
7
+ 'Set up ColdIQ Visitor ID on a website the user owns: creates the tracked website for a domain and returns it with the ready-to-paste tracking pixel (`embed_html`, `script_url`) and its install state (`install.is_installed`). ' +
8
+ '`install` can be null: that means the install state is unknown — re-check later, never report "not installed" from null. ' +
9
+ 'One pixel per domain: a 409 whose message mentions a deactivated workspace = the domain is held by a deactivated workspace — do not retry, tell the user to contact ColdIQ support; any other 409 = a pixel already exists for this domain — call `list_website_visitors_sites` and reuse it. ' +
10
+ 'Any write (POST/PATCH/PUT/DELETE) returns 403 for a workspace member key — ask the workspace owner or an admin. ' +
11
+ 'Setup and reads are free. Identifications are billed once the pixel is live, within the site\'s monthly limit; a person costs 6× a company. ' +
12
+ 'Always quote the live `credits_per_person` / `credits_per_company` from `list_website_visitors_sites` with a `website_id`, never numbers from memory. ' +
13
+ 'Read the identified leads afterwards with `get_website_visitors`.'
14
+
15
+ export const setupWebsiteVisitorsSchema = {
16
+ domain: z
17
+ .string()
18
+ .min(1)
19
+ .describe('Website domain the tracking pixel will identify visitors for, e.g. "coldiq.com".'),
20
+ name: z.string().optional().describe('Display name for the website (defaults to the domain).'),
21
+ }
22
+
23
+ export async function setupWebsiteVisitorsHandler(input: Record<string, unknown>) {
24
+ const body: Record<string, unknown> = { domain: String(input.domain) }
25
+ if (input.name) body.name = String(input.name)
26
+
27
+ const res = await callApi('POST', '/visitor-id/websites', body)
28
+ if (!res.ok) {
29
+ return {
30
+ content: [
31
+ {
32
+ type: 'text' as const,
33
+ text: JSON.stringify({ error: 'Failed to set up website visitor identification', status: res.status, data: res.data }),
34
+ },
35
+ ],
36
+ isError: true,
37
+ }
38
+ }
39
+ return { content: [{ type: 'text' as const, text: JSON.stringify({ data: res.data }) }] }
40
+ }
@@ -0,0 +1,142 @@
1
+ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'
2
+ import { initClient } from '../../src/client.js'
3
+ import {
4
+ listWebsiteVisitorsSitesDescription,
5
+ listWebsiteVisitorsSitesHandler,
6
+ listWebsiteVisitorsSitesSchema,
7
+ listWebsiteVisitorsSitesName,
8
+ } from '../../src/tools/list-website-visitors-sites.js'
9
+
10
+ describe('list_website_visitors_sites', () => {
11
+ const originalFetch = globalThis.fetch
12
+
13
+ beforeEach(() => {
14
+ initClient('http://test-api.local', 'test-key')
15
+ })
16
+
17
+ afterEach(() => {
18
+ globalThis.fetch = originalFetch
19
+ vi.restoreAllMocks()
20
+ })
21
+
22
+ type Call = { path: string; method: string }
23
+
24
+ /** Route each request by pathname; record every call in order. */
25
+ function captureByPath(routes: Record<string, { payload: unknown; status?: number }>) {
26
+ const calls: Call[] = []
27
+ globalThis.fetch = vi.fn(async (url: string | URL | Request, init?: RequestInit) => {
28
+ const path = new URL(url.toString()).pathname
29
+ calls.push({ path, method: init?.method ?? 'GET' })
30
+ const route = routes[path]
31
+ if (!route) return new Response(JSON.stringify({ error: 'unexpected path' }), { status: 500 })
32
+ return new Response(JSON.stringify(route.payload), { status: route.status ?? 200 })
33
+ }) as typeof fetch
34
+ return calls
35
+ }
36
+
37
+ it('is named list_website_visitors_sites', () => {
38
+ expect(listWebsiteVisitorsSitesName).toBe('list_website_visitors_sites')
39
+ })
40
+
41
+ it('GETs /visitor-id/websites when no website_id is given', async () => {
42
+ const list = { websites: [{ id: 7, domain: 'coldiq.com', status: 'active' }] }
43
+ const calls = captureByPath({ '/v1/visitor-id/websites': { payload: list } })
44
+
45
+ const result = await listWebsiteVisitorsSitesHandler({})
46
+
47
+ expect(calls).toEqual([{ path: '/v1/visitor-id/websites', method: 'GET' }])
48
+ expect(result.isError).toBeFalsy()
49
+ expect(JSON.parse(result.content[0].text)).toEqual({ data: list })
50
+ })
51
+
52
+ it('with website_id GETs the website and its usage and merges them as { website, usage }', async () => {
53
+ const website = { id: 7, domain: 'coldiq.com', embed_html: '<script></script>', install: { is_installed: true } }
54
+ const usage = { people: 3, companies: 12, credits: 30 }
55
+ const calls = captureByPath({
56
+ '/v1/visitor-id/websites/7': { payload: website },
57
+ '/v1/visitor-id/websites/7/usage': { payload: usage },
58
+ })
59
+
60
+ const result = await listWebsiteVisitorsSitesHandler({ website_id: 7 })
61
+
62
+ // Both reads are issued together (Promise.all), so only the set is asserted, not the order.
63
+ expect(calls.map((call) => call.path).sort()).toEqual([
64
+ '/v1/visitor-id/websites/7',
65
+ '/v1/visitor-id/websites/7/usage',
66
+ ])
67
+ expect(calls.every((call) => call.method === 'GET')).toBe(true)
68
+ expect(result.isError).toBeFalsy()
69
+ expect(JSON.parse(result.content[0].text)).toEqual({ data: { website, usage } })
70
+ })
71
+
72
+ it('shapes a list failure as isError with status and data', async () => {
73
+ captureByPath({ '/v1/visitor-id/websites': { payload: { error: 'Unauthorized' }, status: 401 } })
74
+
75
+ const result = await listWebsiteVisitorsSitesHandler({})
76
+
77
+ expect(result.isError).toBe(true)
78
+ expect(JSON.parse(result.content[0].text)).toEqual({
79
+ error: 'Failed to list tracked websites',
80
+ status: 401,
81
+ data: { error: 'Unauthorized' },
82
+ })
83
+ })
84
+
85
+ it('shapes a website 404 as isError with status and data', async () => {
86
+ captureByPath({
87
+ '/v1/visitor-id/websites/999': { payload: { error: 'Website not found' }, status: 404 },
88
+ })
89
+
90
+ const result = await listWebsiteVisitorsSitesHandler({ website_id: 999 })
91
+
92
+ expect(result.isError).toBe(true)
93
+ expect(JSON.parse(result.content[0].text)).toEqual({
94
+ error: 'Failed to read tracked website',
95
+ status: 404,
96
+ data: { error: 'Website not found' },
97
+ })
98
+ })
99
+
100
+ it('keeps the website when the usage read fails: { website, usage: null, usage_error } (T13b)', async () => {
101
+ const website = { id: 7, domain: 'coldiq.com', embed_html: '<script></script>', install: null }
102
+ captureByPath({
103
+ '/v1/visitor-id/websites/7': { payload: website },
104
+ '/v1/visitor-id/websites/7/usage': { payload: { error: 'Provider temporarily unavailable' }, status: 502 },
105
+ })
106
+
107
+ const result = await listWebsiteVisitorsSitesHandler({ website_id: 7 })
108
+
109
+ expect(result.isError).toBeFalsy()
110
+ expect(JSON.parse(result.content[0].text)).toEqual({
111
+ data: {
112
+ website,
113
+ usage: null,
114
+ usage_error: { status: 502, data: { error: 'Provider temporarily unavailable' } },
115
+ },
116
+ })
117
+ })
118
+
119
+ it('describes the resilient shape, the live rate, the 409 split, install null and the member rule (T13b)', () => {
120
+ expect(listWebsiteVisitorsSitesDescription).toContain('usage_error')
121
+ expect(listWebsiteVisitorsSitesDescription).toContain('6× a company')
122
+ expect(listWebsiteVisitorsSitesDescription).toContain('credits_per_person')
123
+ expect(listWebsiteVisitorsSitesDescription).toMatch(/never numbers from memory/)
124
+ expect(listWebsiteVisitorsSitesDescription).not.toMatch(/\d+(\.\d+)? credits/)
125
+ expect(listWebsiteVisitorsSitesDescription).not.toMatch(/about \d/)
126
+ expect(listWebsiteVisitorsSitesDescription).toMatch(/409 there whose message mentions a deactivated workspace/)
127
+ expect(listWebsiteVisitorsSitesDescription).toContain('do not retry')
128
+ expect(listWebsiteVisitorsSitesDescription).toMatch(/any other 409/)
129
+ expect(listWebsiteVisitorsSitesDescription).not.toContain('400')
130
+ expect(listWebsiteVisitorsSitesDescription).toMatch(/`install` null = state unknown/)
131
+ expect(listWebsiteVisitorsSitesDescription).toContain('POST/PATCH/PUT/DELETE')
132
+ expect(listWebsiteVisitorsSitesDescription).toContain('403')
133
+ })
134
+
135
+ it('accepts only an optional integer website_id at the schema layer', () => {
136
+ expect(Object.keys(listWebsiteVisitorsSitesSchema)).toEqual(['website_id'])
137
+ expect(listWebsiteVisitorsSitesSchema.website_id.safeParse(undefined).success).toBe(true)
138
+ expect(listWebsiteVisitorsSitesSchema.website_id.safeParse(7).success).toBe(true)
139
+ expect(listWebsiteVisitorsSitesSchema.website_id.safeParse(7.5).success).toBe(false)
140
+ expect(listWebsiteVisitorsSitesSchema.website_id.safeParse('7').success).toBe(false)
141
+ })
142
+ })
@@ -0,0 +1,106 @@
1
+ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'
2
+ import { initClient } from '../../src/client.js'
3
+ import {
4
+ setupWebsiteVisitorsDescription,
5
+ setupWebsiteVisitorsHandler,
6
+ setupWebsiteVisitorsSchema,
7
+ setupWebsiteVisitorsName,
8
+ } from '../../src/tools/setup-website-visitors.js'
9
+
10
+ describe('setup_website_visitors', () => {
11
+ const originalFetch = globalThis.fetch
12
+
13
+ beforeEach(() => {
14
+ initClient('http://test-api.local', 'test-key')
15
+ })
16
+
17
+ afterEach(() => {
18
+ globalThis.fetch = originalFetch
19
+ vi.restoreAllMocks()
20
+ })
21
+
22
+ function capture(payload: unknown, status = 201) {
23
+ const seen: { url: string; method: string; body: unknown } = { url: '', method: '', body: undefined }
24
+ globalThis.fetch = vi.fn(async (url: string | URL | Request, init?: RequestInit) => {
25
+ seen.url = url.toString()
26
+ seen.method = init?.method ?? 'GET'
27
+ seen.body = init?.body ? JSON.parse(String(init.body)) : undefined
28
+ return new Response(JSON.stringify(payload), { status })
29
+ }) as typeof fetch
30
+ return seen
31
+ }
32
+
33
+ it('is named setup_website_visitors', () => {
34
+ expect(setupWebsiteVisitorsName).toBe('setup_website_visitors')
35
+ })
36
+
37
+ it('quotes the live rate and the 6× person/company ratio, never an absolute credit number (T13b)', () => {
38
+ expect(setupWebsiteVisitorsDescription).toContain('6× a company')
39
+ expect(setupWebsiteVisitorsDescription).toContain('credits_per_person')
40
+ expect(setupWebsiteVisitorsDescription).toContain('credits_per_company')
41
+ expect(setupWebsiteVisitorsDescription).toContain('list_website_visitors_sites')
42
+ expect(setupWebsiteVisitorsDescription).toMatch(/never numbers from memory/)
43
+ // No literal price: "N credits", "about N", "N per identified".
44
+ expect(setupWebsiteVisitorsDescription).not.toMatch(/\d+(\.\d+)? credits/)
45
+ expect(setupWebsiteVisitorsDescription).not.toMatch(/about \d/)
46
+ expect(setupWebsiteVisitorsDescription).not.toMatch(/\d+ per identified/)
47
+ })
48
+
49
+ it('tells the agent what a deactivated-workspace 409 and any other 409 mean (T13b)', () => {
50
+ expect(setupWebsiteVisitorsDescription).toMatch(/409 whose message mentions a deactivated workspace/)
51
+ expect(setupWebsiteVisitorsDescription).toContain('do not retry')
52
+ expect(setupWebsiteVisitorsDescription).toContain('contact ColdIQ support')
53
+ expect(setupWebsiteVisitorsDescription).toMatch(/any other 409/)
54
+ expect(setupWebsiteVisitorsDescription).not.toContain('400')
55
+ })
56
+
57
+ it('explains install: null as unknown and the member 403 rule (T13b)', () => {
58
+ expect(setupWebsiteVisitorsDescription).toMatch(/`install` can be null/)
59
+ expect(setupWebsiteVisitorsDescription).toMatch(/never report "not installed" from null/)
60
+ expect(setupWebsiteVisitorsDescription).toContain('POST/PATCH/PUT/DELETE')
61
+ expect(setupWebsiteVisitorsDescription).toContain('403')
62
+ expect(setupWebsiteVisitorsDescription).toContain('workspace owner or an admin')
63
+ })
64
+
65
+ it('POSTs the domain to /visitor-id/websites and returns the website', async () => {
66
+ const website = { id: 7, domain: 'coldiq.com', embed_html: '<script></script>', install: { is_installed: false } }
67
+ const seen = capture(website)
68
+
69
+ const result = await setupWebsiteVisitorsHandler({ domain: 'coldiq.com' })
70
+
71
+ expect(seen.method).toBe('POST')
72
+ expect(new URL(seen.url).pathname).toBe('/v1/visitor-id/websites')
73
+ expect(seen.body).toEqual({ domain: 'coldiq.com' })
74
+ expect(result.isError).toBeFalsy()
75
+ expect(JSON.parse(result.content[0].text)).toEqual({ data: website })
76
+ })
77
+
78
+ it('forwards the optional name', async () => {
79
+ const seen = capture({ id: 7 })
80
+
81
+ await setupWebsiteVisitorsHandler({ domain: 'coldiq.com', name: 'ColdIQ' })
82
+
83
+ expect(seen.body).toEqual({ domain: 'coldiq.com', name: 'ColdIQ' })
84
+ })
85
+
86
+ it('shapes a 409 (domain already tracked) as isError with status and data', async () => {
87
+ capture({ error: 'coldiq.com already has a pixel on this account.' }, 409)
88
+
89
+ const result = await setupWebsiteVisitorsHandler({ domain: 'coldiq.com' })
90
+
91
+ expect(result.isError).toBe(true)
92
+ const parsed = JSON.parse(result.content[0].text)
93
+ expect(parsed).toEqual({
94
+ error: 'Failed to set up website visitor identification',
95
+ status: 409,
96
+ data: { error: 'coldiq.com already has a pixel on this account.' },
97
+ })
98
+ })
99
+
100
+ it('requires a non-empty domain at the schema layer and mirrors the API body fields', () => {
101
+ expect(Object.keys(setupWebsiteVisitorsSchema).sort()).toEqual(['domain', 'name'])
102
+ expect(setupWebsiteVisitorsSchema.domain.safeParse('').success).toBe(false)
103
+ expect(setupWebsiteVisitorsSchema.domain.safeParse('coldiq.com').success).toBe(true)
104
+ expect(setupWebsiteVisitorsSchema.name.safeParse(undefined).success).toBe(true)
105
+ })
106
+ })