@leadpoet/client 0.1.4 → 0.1.5

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 (36) hide show
  1. package/README.md +50 -13
  2. package/cli.js +46 -2
  3. package/cli.js.map +2 -2
  4. package/client.js +47 -2
  5. package/client.js.map +2 -2
  6. package/mcp.js +3969 -71
  7. package/mcp.js.map +4 -4
  8. package/package.json +13 -2
  9. package/skill/SKILL.md +73 -6
  10. package/types/scripts/leadpoet-mcp.d.ts +1 -7
  11. package/types/shared/account-monitoring.d.ts +1169 -0
  12. package/types/shared/assistant-brief.d.ts +1681 -0
  13. package/types/shared/assistant-memories.d.ts +62 -0
  14. package/types/shared/assistant-send-forecast.d.ts +442 -0
  15. package/types/shared/assistant.d.ts +238 -0
  16. package/types/shared/employee-count.d.ts +90 -0
  17. package/types/shared/gtm-context.d.ts +233 -0
  18. package/types/shared/icp-product-selection.d.ts +27 -0
  19. package/types/shared/icp-profile.d.ts +2625 -0
  20. package/types/shared/industry-taxonomy.d.ts +1 -0
  21. package/types/shared/lead-request-limits.d.ts +4 -0
  22. package/types/shared/leadpoet-client.d.ts +1315 -0
  23. package/types/shared/leadpoet-mcp-server.d.ts +39 -0
  24. package/types/shared/mcp-connect.d.ts +22 -0
  25. package/types/shared/monitor-technologies.d.ts +38 -0
  26. package/types/shared/outreach-analytics.d.ts +334 -0
  27. package/types/shared/outreach-audience-filters.d.ts +156 -0
  28. package/types/shared/outreach-audience-segments.d.ts +135 -0
  29. package/types/shared/outreach-enums.d.ts +22 -0
  30. package/types/shared/outreach-v2-contract.d.ts +253 -0
  31. package/types/shared/plan-entitlements.d.ts +75 -0
  32. package/types/shared/plan-features.d.ts +50 -0
  33. package/types/shared/request-credit-constants.d.ts +13 -0
  34. package/types/shared/website-fact-language.d.ts +9 -0
  35. package/types/shared/workspace-operations.d.ts +1975 -29
  36. package/types/shared/workspace-tool-metadata.d.ts +1083 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leadpoet/client",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "description": "Leadpoet API client, CLI, and MCP adapter",
6
6
  "license": "MIT",
@@ -8,6 +8,17 @@
8
8
  "node": ">=22"
9
9
  },
10
10
  "homepage": "https://leadpoet.com/docs/api",
11
+ "keywords": [
12
+ "leadpoet",
13
+ "sales",
14
+ "prospecting",
15
+ "lead-generation",
16
+ "b2b",
17
+ "crm",
18
+ "outreach",
19
+ "cli",
20
+ "mcp"
21
+ ],
11
22
  "publishConfig": {
12
23
  "access": "public"
13
24
  },
@@ -29,7 +40,7 @@
29
40
  "README.md"
30
41
  ],
31
42
  "dependencies": {
32
- "@modelcontextprotocol/sdk": "1.31.0",
43
+ "@modelcontextprotocol/sdk": "1.32.1",
33
44
  "zod": "^3.25.76"
34
45
  }
35
46
  }
package/skill/SKILL.md CHANGED
@@ -12,17 +12,69 @@ Credentials come from `LEADPOET_API_KEY`; `LEADPOET_API_BASE` selects the worksp
12
12
  deployment. Never print, paste into arguments, or commit keys. Switching
13
13
  workspaces means using a different explicitly selected credential.
14
14
 
15
+ ## Setup
16
+
17
+ 1. Sign up at https://leadpoet.com and
18
+ [request API access](https://leadpoet.com/docs/api#access) for the workspace.
19
+ 2. Install the CLI with `npm install -g @leadpoet/client`, or connect the MCP
20
+ server `https://leadpoet.com/mcp`, which signs in with OAuth and needs no key.
21
+ 3. For the CLI, create a key in Leadpoet under **Settings → Developer → API
22
+ keys** and set it as `LEADPOET_API_KEY`.
23
+
15
24
  ## Workflow
16
25
 
26
+ Before planning an ICP, a request or a campaign, or drafting outreach, read
27
+ `getPlaybook` (pass `topic` for one section: `target-market` for ICPs,
28
+ `buying-signals`, `requests`, `accounts`, `messaging`, `campaigns`, `replies`, `plays` or
29
+ `experiments` for results) and use it as guidance unless the user chooses
30
+ otherwise. Each practice cites its studies; cite them when you advise. It never
31
+ authorizes a spend, an archive or a stage change.
32
+
33
+ Before drafting anything a prospect will read, planning targeting, or preparing
34
+ for a call or an objection, read the workspace's own context. Over MCP, call
35
+ `getGtmContext` with the matching `task` (`messaging`, `targeting`,
36
+ `objections`, `call_prep` or `overview`) and the ICP's `icp_id`. It holds the
37
+ workspace's context; for a campaign, also read the campaign: when its
38
+ `advanced_settings` has a `campaign_product` that isn't null, or a
39
+ `request_offer` with a `request_offer_policy`, write from that product, not
40
+ from this context's offer, proof, lines or outcomes, and follow the campaign's
41
+ own guidance too.
42
+ With the CLI, read `getOutreachProfile` and `getIcp` yourself, and
43
+ `listIcpProducts` when the ICP's `storage_schema_version` is 2: its connected
44
+ Products hold its problems, objections and writing rules. State the user's
45
+ offer, results and buyers only as that context states them, use only proof that
46
+ is approved and current, and follow every guardrail (claims, topics, angles and
47
+ phrases never to use, companies never to target). When `guardrails_need_icp`
48
+ is true, call it again with the `icp_id` of the ICP you're writing for; when
49
+ `guardrails_need_product` is true, with the `product_id` of the Product (for a
50
+ campaign, the `product_id` in its `campaign_product.input.productSelection`); or ask the user which one. Until `guardrails_complete` is true, write nothing a
51
+ prospect will read, unless `guardrails_role_limited` is true: then say the
52
+ draft wasn't checked against the ICP's rules. When a section
53
+ is missing, tell the user and link the screen it names; never invent it.
54
+ Each saved objection comes with the seller's saved answer, or says none is
55
+ saved (`objection_answers` in the ICP or Product guidance). To answer an
56
+ objection, use its saved answer and add no claim, number, comparison, customer
57
+ or benefit it doesn't state. When none is saved, write no rebuttal of your own:
58
+ tell the user and offer to save one where that objection is saved, on the ICP
59
+ or its Product.
60
+
17
61
  1. Read `getCredits`, `getContactAllowance`, the `createRequest` contract and the
18
62
  user's targeting requirements. Establish quantity and credit budget within the
19
- user's authorization; the minimum budget is 50 credits (five companies with
20
- one included contact). Persist a fresh UUID retry key with the request body.
63
+ user's authorization. Always send `contacts_per_company` and
64
+ `included_contacts_per_company`; `credit_budget` must then equal the exact total:
65
+ `max_leads × (credits_per_company + credits_per_extra_contact × contacts above
66
+ included_contacts_per_company + credits_per_mobile_contact × contacts_per_company
67
+ when mobile is requested)`, using `getContactAllowance.pricing`. The minimum is
68
+ 100 credits (ten companies with one included contact); 10 companies with 2
69
+ contacts and 1 included cost 150. A request must leave at least 100 credits,
70
+ or less than the request's price per company. Tell the user the total
71
+ before submitting.
72
+ Persist a fresh UUID retry key with the request body.
21
73
  Call `createRequest`; save its `query_id`, `icp_id` and reservation information.
22
- 2. Requests are researched and verified by Leadpoet: they usually finish within
23
- a day and can take up to about 3 days. Tell the user the request is running,
24
- then check `getRequest` later; `progress.state` is `working`, `ready` or
25
- `failed`, and `progress.check_again_after_seconds` suggests when to look again.
74
+ 2. Requests are researched and verified by Leadpoet, with a typical turnaround
75
+ of 1–2 days. Tell the user the request is running,
76
+ then check `getRequest` later; `progress.state` is `working`, `ready`,
77
+ `failed` or `archived` (won't be fulfilled), and `progress.check_again_after_seconds` suggests when to look again.
26
78
  Do not poll in a tight loop or resubmit. Pending work is not failed or
27
79
  completed. Inspect the saved request before submitting again. Read `getPipeline` and
28
80
  `listPipelineContacts` with its ICP ID. Preserve evidence and qualification;
@@ -45,6 +97,15 @@ workspaces means using a different explicitly selected credential.
45
97
  response does not prove delivery. Report saved state, pending work, failures,
46
98
  cost information and the next useful action without exposing contact data
47
99
  beyond the user's requested result.
100
+ 6. Leadpoet learns what works for the workspace from fit ratings, deal outcomes
101
+ and campaign reviews. Before changing an ICP or planning a request, read
102
+ `getIcpFitInsights` for that ICP; before changing a campaign, read
103
+ `getCampaignReviews`. Show what they found with its counts, as evidence for
104
+ the user to weigh. When the user says a company or contact is or is not a
105
+ good fit, record it with `rateCompanyFit` and the reason they gave; never
106
+ rate on your own judgment. When the user reports a meeting, a win or a loss,
107
+ offer to move the contact or deal to match, with the outcome reasons a
108
+ closed deal needs.
48
109
 
49
110
  ## Calls and recovery
50
111
 
@@ -69,3 +130,9 @@ Pagination differs by operation. Follow its declared page/cursor contract;
69
130
  bounded snapshots and `results_limited` are not complete exports. Do not infer
70
131
  that a missing item does not exist. Never bypass consent, ownership, suppression,
71
132
  credit, evidence or feature gates. Account consent remains in the application.
133
+
134
+ ## Report a problem
135
+
136
+ If a call keeps failing with a `5xx` or returns a result that looks wrong, tell
137
+ the user they can report it to hello@leadpoet.com with the operation name, the
138
+ time and the `request_id`. Leave out keys, contact data and message text.
@@ -1,7 +1 @@
1
- import { Server } from "@modelcontextprotocol/sdk/server/index.js";
2
- import { LeadpoetClient } from "../shared/leadpoet-client";
3
- /** The API's own "still working" message for an unfinished request, so agents relay it instead of polling. */
4
- export declare function progressNotice(data: unknown): string | null;
5
- export declare function createLeadpoetMcpServer(client: LeadpoetClient, options?: {
6
- allowSend?: boolean;
7
- }): Promise<Server>;
1
+ export { createLeadpoetMcpServer, progressNotice, type LeadpoetMcpServerOptions } from "../shared/leadpoet-mcp-server";