@leadpoet/client 0.1.3 → 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.
- package/README.md +59 -35
- package/cli.js +47 -2
- package/cli.js.map +2 -2
- package/client.js +47 -2
- package/client.js.map +2 -2
- package/mcp.js +3969 -71
- package/mcp.js.map +4 -4
- package/package.json +13 -2
- package/skill/SKILL.md +83 -9
- package/types/scripts/leadpoet-mcp.d.ts +1 -7
- package/types/shared/account-monitoring.d.ts +1169 -0
- package/types/shared/assistant-brief.d.ts +1681 -0
- package/types/shared/assistant-memories.d.ts +62 -0
- package/types/shared/assistant-send-forecast.d.ts +442 -0
- package/types/shared/assistant.d.ts +238 -0
- package/types/shared/employee-count.d.ts +90 -0
- package/types/shared/gtm-context.d.ts +233 -0
- package/types/shared/icp-product-selection.d.ts +27 -0
- package/types/shared/icp-profile.d.ts +2625 -0
- package/types/shared/industry-taxonomy.d.ts +1 -0
- package/types/shared/lead-request-limits.d.ts +4 -0
- package/types/shared/leadpoet-client.d.ts +1315 -0
- package/types/shared/leadpoet-mcp-server.d.ts +39 -0
- package/types/shared/mcp-connect.d.ts +22 -0
- package/types/shared/monitor-technologies.d.ts +38 -0
- package/types/shared/outreach-analytics.d.ts +334 -0
- package/types/shared/outreach-audience-filters.d.ts +156 -0
- package/types/shared/outreach-audience-segments.d.ts +135 -0
- package/types/shared/outreach-enums.d.ts +22 -0
- package/types/shared/outreach-v2-contract.d.ts +253 -0
- package/types/shared/plan-entitlements.d.ts +75 -0
- package/types/shared/plan-features.d.ts +50 -0
- package/types/shared/request-credit-constants.d.ts +13 -0
- package/types/shared/website-fact-language.d.ts +9 -0
- package/types/shared/workspace-operations.d.ts +1975 -29
- 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.
|
|
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.
|
|
43
|
+
"@modelcontextprotocol/sdk": "1.32.1",
|
|
33
44
|
"zod": "^3.25.76"
|
|
34
45
|
}
|
|
35
46
|
}
|
package/skill/SKILL.md
CHANGED
|
@@ -12,22 +12,80 @@ 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. `
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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.
|
|
73
|
+
Call `createRequest`; save its `query_id`, `icp_id` and reservation information.
|
|
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.
|
|
78
|
+
Do not poll in a tight loop or resubmit. Pending work is not failed or
|
|
79
|
+
completed. Inspect the saved request before submitting again. Read `getPipeline` and
|
|
26
80
|
`listPipelineContacts` with its ICP ID. Preserve evidence and qualification;
|
|
27
81
|
do not fill missing fields or describe inferred leads as verified.
|
|
28
82
|
3. For outreach, discover accounts, audience contacts and sequence templates.
|
|
29
83
|
Preview and save an audience, create a campaign draft, and read its preview
|
|
30
84
|
and contract proposal. Use the returned IDs and exact current revisions.
|
|
85
|
+
Drop an unwanted draft with `discardCampaign`; `archiveCampaign` applies only
|
|
86
|
+
to paused or completed campaigns. When an ICP draft reports
|
|
87
|
+
`storage_schema_version: 2`, update it with `schema_version: 2`,
|
|
88
|
+
`company_fit` and `buyer_groups` only.
|
|
31
89
|
4. Launch, resume, approve messages, or reply only when the user has authorized
|
|
32
90
|
that send action, recipients and content. A broad request to research or
|
|
33
91
|
prepare outreach does not authorize sending. CLI sends require `--allow-send`;
|
|
@@ -39,6 +97,15 @@ workspaces means using a different explicitly selected credential.
|
|
|
39
97
|
response does not prove delivery. Report saved state, pending work, failures,
|
|
40
98
|
cost information and the next useful action without exposing contact data
|
|
41
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.
|
|
42
109
|
|
|
43
110
|
## Calls and recovery
|
|
44
111
|
|
|
@@ -47,10 +114,11 @@ and returns a JSON envelope with `data` and `request_id`.
|
|
|
47
114
|
|
|
48
115
|
```sh
|
|
49
116
|
leadpoet call getPipeline --query '{"icp_id":"<saved-icp-uuid>"}'
|
|
50
|
-
leadpoet call createCampaign --input campaign.json --idempotency-key
|
|
117
|
+
leadpoet call createCampaign --input campaign.json --idempotency-key "$CAMPAIGN_KEY"
|
|
51
118
|
```
|
|
52
119
|
|
|
53
|
-
Keep the same retry key, actor and
|
|
120
|
+
Use a fresh UUID for each logical write. Keep the same retry key, actor and
|
|
121
|
+
identical body after interruption. Never
|
|
54
122
|
replace a send key to force success. The client does not automatically retry
|
|
55
123
|
writes. For `none`, inspect saved state before deciding whether another call is
|
|
56
124
|
safe. For revision or approval conflicts, reread and review; never silently
|
|
@@ -62,3 +130,9 @@ Pagination differs by operation. Follow its declared page/cursor contract;
|
|
|
62
130
|
bounded snapshots and `results_limited` are not complete exports. Do not infer
|
|
63
131
|
that a missing item does not exist. Never bypass consent, ownership, suppression,
|
|
64
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
|
-
|
|
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";
|