@anychat-ai/mcp 0.1.1 → 0.3.0

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.
@@ -4,8 +4,9 @@ exports.peopleTools = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const tool_1 = require("../tool");
6
6
  /**
7
- * People (the built-in CRM) + People segments — a 1:1 projection of the
8
- * "People" and "People segments" sections of the API reference.
7
+ * People (the built-in CRM), per-person outreach sends, and People
8
+ * segments — a 1:1 projection of the "People" and "People segments"
9
+ * sections of the API reference.
9
10
  *
10
11
  * Left out deliberately (documented routes, not exposed here to keep the
11
12
  * table tight): `restore` (undo a soft delete) and `dismissDuplicate`.
@@ -18,52 +19,31 @@ const REACHABILITY = ['rcs', 'unreachable'];
18
19
  * individual filter.
19
20
  */
20
21
  const filterShape = {
21
- status: zod_1.z
22
- .enum(PERSON_STATUS)
23
- .optional()
24
- .describe('Exact funnel status: new | contacted | qualified | converted | lost'),
25
- q: zod_1.z
26
- .string()
27
- .optional()
28
- .describe('Case-insensitive substring of name, email, phone, or company'),
29
- tags: zod_1.z.array(zod_1.z.string()).optional().describe('People carrying ANY of these tags'),
30
- source: zod_1.z.string().optional().describe('Exact acquisition-source value'),
22
+ status: zod_1.z.enum(PERSON_STATUS).optional().describe('Funnel status'),
23
+ q: zod_1.z.string().optional().describe('Substring of name, email, phone or company'),
24
+ tags: zod_1.z.array(zod_1.z.string()).optional().describe('ANY of these tags'),
25
+ source: zod_1.z.string().optional().describe('Exact acquisition source'),
31
26
  lastImportBatchId: zod_1.z
32
27
  .string()
33
28
  .optional()
34
- .describe('Only people created/updated by one import call (the importBatchId returned by import_people)'),
35
- hasPhone: zod_1.z
36
- .boolean()
37
- .optional()
38
- .describe('true: a phone number is on file; false: missing or empty'),
29
+ .describe('importBatchId returned by import_people'),
30
+ hasPhone: zod_1.z.boolean().optional(),
39
31
  outreachReachability: zod_1.z
40
32
  .enum(REACHABILITY)
41
33
  .optional()
42
- .describe("Result of the most recent outreach attempt's capability check: 'rcs' or 'unreachable'"),
43
- createdAfter: zod_1.z
44
- .string()
45
- .optional()
46
- .describe('Record created on or after this ISO-8601 instant (inclusive)'),
47
- createdBefore: zod_1.z
48
- .string()
49
- .optional()
50
- .describe('Record created on or before this ISO-8601 instant (inclusive)'),
51
- lastInboundAfter: zod_1.z
52
- .string()
53
- .optional()
54
- .describe('Most recent inbound message on or after this ISO-8601 instant'),
55
- lastInboundBefore: zod_1.z
56
- .string()
57
- .optional()
58
- .describe('Most recent inbound message on or before this ISO-8601 instant'),
34
+ .describe("Most recent outreach attempt's capability check"),
35
+ createdAfter: zod_1.z.string().optional().describe('ISO-8601, inclusive'),
36
+ createdBefore: zod_1.z.string().optional().describe('ISO-8601, inclusive'),
37
+ lastInboundAfter: zod_1.z.string().optional().describe('ISO-8601'),
38
+ lastInboundBefore: zod_1.z.string().optional().describe('ISO-8601'),
59
39
  cf: zod_1.z
60
40
  .record(zod_1.z.string(), zod_1.z.string())
61
41
  .optional()
62
- .describe('Exact-match conditions on declared custom People fields, keyed by field key, e.g. {"targetMarket": "medspa"} → cf.targetMarket=medspa. Undeclared keys are a 400.'),
42
+ .describe('Exact-match on declared custom People fields, e.g. {"targetMarket": "medspa"}. Undeclared keys → 400.'),
63
43
  segmentId: zod_1.z
64
44
  .string()
65
45
  .optional()
66
- .describe('Apply a saved People segment (see list_segments). Mutually exclusive with every other filter — combining is a 400; unknown id is a 404.'),
46
+ .describe('Saved segment (see list_segments); mutually exclusive with every other filter'),
67
47
  };
68
48
  /** Turn the filter args into query params (`tags` comma-joined, `cf` flattened to `cf.<key>`). */
69
49
  function filterQuery(f) {
@@ -77,34 +57,27 @@ function filterQuery(f) {
77
57
  }
78
58
  /** The writable Person fields (POST + PATCH accept exactly these). */
79
59
  const personWritableShape = {
80
- fullName: zod_1.z.string().max(200).optional().describe('Full display name (≤ 200)'),
81
- firstName: zod_1.z.string().max(100).optional().describe('First name (≤ 100)'),
82
- lastName: zod_1.z.string().max(100).optional().describe('Last name (≤ 100)'),
83
- email: zod_1.z.string().max(300).optional().describe('Email address (≤ 300)'),
60
+ fullName: zod_1.z.string().max(200).optional(),
61
+ firstName: zod_1.z.string().max(100).optional(),
62
+ lastName: zod_1.z.string().max(100).optional(),
63
+ email: zod_1.z.string().max(300).optional(),
84
64
  phone: zod_1.z
85
65
  .string()
86
66
  .max(50)
87
67
  .optional()
88
- .describe('Phone number; normalized to E.164 on write. Only needed for outreach — channel identity is otherwise tracked by ASID (read-only channelUserIds).'),
89
- company: zod_1.z.string().max(200).optional().describe('Company (≤ 200)'),
90
- title: zod_1.z.string().max(200).optional().describe('Job title (≤ 200)'),
91
- productInterest: zod_1.z
92
- .string()
93
- .max(200)
94
- .optional()
95
- .describe('Product of interest; reconciled against the product catalog at use time'),
96
- source: zod_1.z.string().max(200).optional().describe('Acquisition source label (≤ 200)'),
97
- status: zod_1.z
98
- .enum(PERSON_STATUS)
99
- .optional()
100
- .describe('Funnel status: new | contacted | qualified | converted | lost'),
101
- notes: zod_1.z.string().max(5000).optional().describe('Free-form operator notes (≤ 5,000)'),
102
- tags: zod_1.z.array(zod_1.z.string()).optional().describe('Free-form labels'),
68
+ .describe('Normalized to E.164; only needed for outreach (channel identity is by ASID)'),
69
+ company: zod_1.z.string().max(200).optional(),
70
+ title: zod_1.z.string().max(200).optional().describe('Job title'),
71
+ productInterest: zod_1.z.string().max(200).optional(),
72
+ source: zod_1.z.string().max(200).optional().describe('Acquisition source label'),
73
+ status: zod_1.z.enum(PERSON_STATUS).optional().describe('Funnel status'),
74
+ notes: zod_1.z.string().max(5000).optional().describe('Operator notes'),
75
+ tags: zod_1.z.array(zod_1.z.string()).optional(),
103
76
  externalId: zod_1.z
104
77
  .string()
105
78
  .max(200)
106
79
  .optional()
107
- .describe('Correlation id for an external system; exact-matched by import'),
80
+ .describe('External-system correlation id; exact-matched by import'),
108
81
  lockedFields: zod_1.z
109
82
  .array(zod_1.z.string())
110
83
  .optional()
@@ -112,65 +85,55 @@ const personWritableShape = {
112
85
  customFields: zod_1.z
113
86
  .record(zod_1.z.string(), zod_1.z.string())
114
87
  .optional()
115
- .describe("String values (≤ 1,000 each) keyed by declared People field key; values are validated against each field's declared type"),
88
+ .describe('String values keyed by declared People field key (validated per field type)'),
116
89
  assignedRepresentativeId: zod_1.z
117
90
  .string()
118
91
  .optional()
119
- .describe("Must reference one of the agent's representatives"),
92
+ .describe("One of the agent's representatives"),
120
93
  scheduledCallAt: zod_1.z
121
94
  .string()
122
95
  .optional()
123
- .describe('ISO-8601; normally maintained by scheduling — writable only as an operator override'),
96
+ .describe('ISO-8601; normally maintained by scheduling — operator override only'),
124
97
  scheduledCallTimezone: zod_1.z
125
98
  .string()
126
99
  .optional()
127
- .describe('IANA timezone for scheduledCallAt (operator override)'),
100
+ .describe('IANA timezone for scheduledCallAt'),
128
101
  };
129
102
  /** Segment body shared by create + replace. */
130
103
  const segmentBodyShape = {
131
- name: zod_1.z.string().min(1).max(100).describe('Segment name (≤ 100); required'),
132
- description: zod_1.z.string().max(500).optional().describe('Optional description (≤ 500)'),
104
+ name: zod_1.z.string().min(1).max(100),
105
+ description: zod_1.z.string().max(500).optional(),
133
106
  filter: zod_1.z
134
- .object({
135
- status: filterShape.status,
136
- q: filterShape.q,
137
- tags: filterShape.tags,
138
- source: filterShape.source,
139
- lastImportBatchId: filterShape.lastImportBatchId,
140
- hasPhone: filterShape.hasPhone,
141
- outreachReachability: filterShape.outreachReachability,
142
- createdAfter: filterShape.createdAfter,
143
- createdBefore: filterShape.createdBefore,
144
- lastInboundAfter: filterShape.lastInboundAfter,
145
- lastInboundBefore: filterShape.lastInboundBefore,
146
- cf: filterShape.cf,
147
- })
148
- .describe('The saved filter as a JSON object using the People filter vocabulary: scalar params by name, tags as a string array, custom-field conditions nested under cf. Keys outside the vocabulary or undeclared cf keys are a 422.'),
107
+ .record(zod_1.z.string(), zod_1.z.any())
108
+ .describe('Saved filter using the list_people filter keys (status, q, tags[], source, lastImportBatchId, hasPhone, outreachReachability, createdAfter/Before, lastInboundAfter/Before, cf{}) — everything except segmentId. Unknown keys → 422.'),
149
109
  };
150
110
  const peoplePath = (agentId, rest = '') => `/agents/${encodeURIComponent(agentId)}/people${rest}`;
151
111
  const personPath = (agentId, personId, rest = '') => peoplePath(agentId, `/${encodeURIComponent(personId)}${rest}`);
152
112
  const segmentPath = (agentId, segmentId) => peoplePath(agentId, `/segments/${encodeURIComponent(segmentId)}`);
113
+ const agentId = zod_1.z.string();
114
+ const personId = zod_1.z.string();
153
115
  exports.peopleTools = [
154
116
  (0, tool_1.defineTool)({
155
117
  name: 'list_people',
156
118
  title: 'List people',
157
- description: "List an agent's People (the built-in CRM), newest first, with optional filters (status, q, tags, source, hasPhone, outreachReachability, date ranges, custom fields via cf, or a saved segmentId) that AND together. Paginate with limit (max 200) and startingAfter (the last person id of the previous page); the response is { data: Person[], hasMore }. Maps to GET /v1/orgs/{org}/agents/{agent}/people.",
119
+ description: "List an agent's People (the built-in CRM), newest first, with optional filters that AND together (or a saved segmentId). Paginate with limit (max 200) and startingAfter; returns { data: Person[], hasMore }. Maps to GET /v1/orgs/{org}/agents/{agent}/people.",
158
120
  kind: 'read',
159
121
  scope: 'people:read',
160
122
  roleFloor: 'viewer',
123
+ profile: 'core',
161
124
  input: {
162
- agentId: zod_1.z.string().describe('Agent id'),
125
+ agentId,
163
126
  limit: zod_1.z
164
127
  .number()
165
128
  .int()
166
129
  .min(1)
167
130
  .max(200)
168
131
  .optional()
169
- .describe('Page size (max 200). Always pass one — omitting every parameter returns the deprecated full array.'),
132
+ .describe('Page size. Always pass one — omitting every parameter returns the deprecated full array.'),
170
133
  startingAfter: zod_1.z
171
134
  .string()
172
135
  .optional()
173
- .describe('Person id of the last item on the previous page (cursor)'),
136
+ .describe('Last person id of the previous page'),
174
137
  ...filterShape,
175
138
  },
176
139
  run: async ({ client }, { agentId, limit, startingAfter, ...filter }) => client.get(await client.orgPath(peoplePath(agentId)), {
@@ -182,25 +145,23 @@ exports.peopleTools = [
182
145
  (0, tool_1.defineTool)({
183
146
  name: 'get_person',
184
147
  title: 'Get a person',
185
- description: 'Fetch one Person record in full: profile fields, status, tags, custom fields, provenance (fieldMeta), duplicate candidates, journal, channel identities (ASIDs), outreach / follow-up / scheduling state. Maps to GET /v1/orgs/{org}/agents/{agent}/people/{personId}.',
148
+ description: 'Fetch one Person in full: profile, status, tags, custom fields, provenance (fieldMeta), duplicate candidates, journal, channel identities (ASIDs), outreach / follow-up / scheduling state. Maps to GET /v1/orgs/{org}/agents/{agent}/people/{personId}.',
186
149
  kind: 'read',
187
150
  scope: 'people:read',
188
151
  roleFloor: 'viewer',
189
- input: {
190
- agentId: zod_1.z.string().describe('Agent id'),
191
- personId: zod_1.z.string().describe('Person id'),
192
- },
152
+ profile: 'core',
153
+ input: { agentId, personId },
193
154
  run: async ({ client }, { agentId, personId }) => client.get(await client.orgPath(personPath(agentId, personId))),
194
155
  }),
195
156
  (0, tool_1.defineTool)({
196
157
  name: 'create_person',
197
158
  title: 'Create a person',
198
- description: 'Create a Person on the agent from operator-supplied fields (name, email, phone, company, status, tags, externalId, customFields …). The person is bound to the agent in the path; runtime-owned fields (channel identity, outreach state, journal) cannot be set. Returns the created Person. Maps to POST /v1/orgs/{org}/agents/{agent}/people.',
159
+ description: 'Create a Person on the agent from operator-supplied fields. Runtime-owned fields (channel identity, outreach state, journal) cannot be set. Maps to POST /v1/orgs/{org}/agents/{agent}/people.',
199
160
  kind: 'write',
200
161
  scope: 'people:write',
201
162
  roleFloor: 'editor',
202
163
  input: {
203
- agentId: zod_1.z.string().describe('Agent id'),
164
+ agentId,
204
165
  ...personWritableShape,
205
166
  },
206
167
  run: async ({ client }, { agentId, ...body }) => client.post(await client.orgPath(peoplePath(agentId)), body),
@@ -208,13 +169,14 @@ exports.peopleTools = [
208
169
  (0, tool_1.defineTool)({
209
170
  name: 'update_person',
210
171
  title: 'Update a person',
211
- description: 'Partially update a Person (PATCH): only the writable fields supplied are changed, e.g. move status along the funnel, add tags, set customFields, or lock fields against agent writes. At least one field is required. Returns the updated Person. Maps to PATCH /v1/orgs/{org}/agents/{agent}/people/{personId}.',
172
+ description: 'Partially update a Person: only the fields supplied change (move status, add tags, set customFields, lock fields …). At least one field required. Maps to PATCH /v1/orgs/{org}/agents/{agent}/people/{personId}.',
212
173
  kind: 'write',
213
174
  scope: 'people:write',
214
175
  roleFloor: 'editor',
176
+ profile: 'core',
215
177
  input: {
216
- agentId: zod_1.z.string().describe('Agent id'),
217
- personId: zod_1.z.string().describe('Person id'),
178
+ agentId,
179
+ personId,
218
180
  ...personWritableShape,
219
181
  },
220
182
  run: async ({ client }, { agentId, personId, ...body }) => client.patch(await client.orgPath(personPath(agentId, personId)), body),
@@ -222,14 +184,11 @@ exports.peopleTools = [
222
184
  (0, tool_1.defineTool)({
223
185
  name: 'delete_person',
224
186
  title: 'Delete a person',
225
- description: 'Soft-delete a Person: it disappears from every list, lookup, and export, and is purged after 30 days (POST …/restore can undo it before then; records consumed by a merge cannot be restored). Maps to DELETE /v1/orgs/{org}/agents/{agent}/people/{personId}.',
187
+ description: 'Soft-delete a Person: hidden from every list, lookup and export; purged after 30 days (POST …/restore can undo before then; merged-away records cannot be restored). Maps to DELETE /v1/orgs/{org}/agents/{agent}/people/{personId}.',
226
188
  kind: 'destructive',
227
189
  scope: 'people:write',
228
190
  roleFloor: 'editor',
229
- input: {
230
- agentId: zod_1.z.string().describe('Agent id'),
231
- personId: zod_1.z.string().describe('Person id to delete'),
232
- },
191
+ input: { agentId, personId },
233
192
  run: async ({ client }, { agentId, personId }) => {
234
193
  await client.delete(await client.orgPath(personPath(agentId, personId)));
235
194
  return { ok: true, deleted: personId };
@@ -238,18 +197,18 @@ exports.peopleTools = [
238
197
  (0, tool_1.defineTool)({
239
198
  name: 'merge_people',
240
199
  title: 'Merge two people',
241
- description: 'Merge a source Person into a target Person and retire the source (used to resolve duplicateCandidates). Defaults are target-wins with the source filling empty fields; fieldChoices overrides per field ("source" | "target"). Conflicting externalIds are a 409 unless a choice is supplied. Returns { success, person }. Maps to POST /v1/orgs/{org}/agents/{agent}/people/{personId}/merge.',
200
+ description: 'Merge a source Person into a target and retire the source (resolves duplicateCandidates). Target wins by default, source fills empty fields; fieldChoices overrides per field. Conflicting externalIds → 409 unless chosen. Maps to POST /v1/orgs/{org}/agents/{agent}/people/{personId}/merge.',
242
201
  kind: 'write',
243
202
  scope: 'people:write',
244
203
  roleFloor: 'editor',
245
204
  input: {
246
- agentId: zod_1.z.string().describe('Agent id'),
247
- personId: zod_1.z.string().describe('Target person id (survives the merge)'),
248
- sourceId: zod_1.z.string().describe('Source person id (retired by the merge)'),
205
+ agentId,
206
+ personId: zod_1.z.string().describe('Target person id (survives)'),
207
+ sourceId: zod_1.z.string().describe('Source person id (retired)'),
249
208
  fieldChoices: zod_1.z
250
209
  .record(zod_1.z.string(), zod_1.z.enum(['source', 'target']))
251
210
  .optional()
252
- .describe('Per-field winner overrides keyed by field path, e.g. {"email": "source"}'),
211
+ .describe('Per-field winner, e.g. {"email": "source"}'),
253
212
  },
254
213
  run: async ({ client }, { agentId, personId, sourceId, fieldChoices }) => client.post(await client.orgPath(personPath(agentId, personId, '/merge')), {
255
214
  sourceId,
@@ -259,13 +218,13 @@ exports.peopleTools = [
259
218
  (0, tool_1.defineTool)({
260
219
  name: 'export_people',
261
220
  title: 'Export people (bulk)',
262
- description: 'Bulk-export the CRM as text — WARNING: returns bulk personally identifiable information (names, emails, phones) for every matching person; only use when the operator explicitly wants an export, and prefer list_people for browsing. Accepts the same filters as list_people (or a segmentId). format=csv (default) gives one row per person with columns matching the import template; format=ndjson gives one full JSON record per line including journal and fieldMeta. Large results are truncated in the tool output. Requires the people:export scope. Maps to GET /v1/orgs/{org}/agents/{agent}/people/export.',
221
+ description: 'Bulk-export the CRM as text — WARNING: bulk PII (names, emails, phones) for every matching person; only when the operator explicitly wants an export (prefer list_people for browsing). Same filters as list_people. csv (default) matches the import template columns; ndjson gives full records incl. journal and fieldMeta. Large results are truncated. Maps to GET /v1/orgs/{org}/agents/{agent}/people/export.',
263
222
  kind: 'read',
264
223
  scope: 'people:export',
265
224
  roleFloor: 'editor',
266
225
  input: {
267
- agentId: zod_1.z.string().describe('Agent id'),
268
- format: zod_1.z.enum(['csv', 'ndjson']).optional().describe('csv (default) or ndjson'),
226
+ agentId,
227
+ format: zod_1.z.enum(['csv', 'ndjson']).optional(),
269
228
  ...filterShape,
270
229
  },
271
230
  run: async ({ client }, { agentId, format, ...filter }) => client.get(await client.orgPath(peoplePath(agentId, '/export')), {
@@ -276,72 +235,101 @@ exports.peopleTools = [
276
235
  (0, tool_1.defineTool)({
277
236
  name: 'import_people',
278
237
  title: 'Import people',
279
- description: 'Bulk import/upsert People from rows (each row a header-to-value object using the import template columns, e.g. "email", "full name", "external id", or any declared People field). Rows matching an existing person by externalId or email update it: mode "fill" (default) writes only empty fields, "update" overwrites with non-empty incoming values; locked fields are never overwritten. Returns imported / updated / skipped / duplicatesFlagged / unmatchedColumns / rowErrors and an importBatchId usable as the lastImportBatchId filter. Maps to POST /v1/orgs/{org}/agents/{agent}/people/import.',
238
+ description: 'Bulk import/upsert People from rows (header-to-value objects using the import template columns, e.g. "email", "full name", "external id", or any declared People field). Rows matching by externalId or email update: mode "fill" (default) writes only empty fields, "update" overwrites with non-empty values; locked fields never change. Returns counts, unmatchedColumns, rowErrors and an importBatchId (usable as lastImportBatchId). Maps to POST /v1/orgs/{org}/agents/{agent}/people/import.',
280
239
  kind: 'write',
281
240
  scope: 'people:write',
282
241
  roleFloor: 'editor',
283
242
  input: {
284
- agentId: zod_1.z.string().describe('Agent id'),
285
- rows: zod_1.z
286
- .array(zod_1.z.record(zod_1.z.string(), zod_1.z.string()))
287
- .min(1)
288
- .describe('Non-empty array of header-to-value row objects'),
289
- mode: zod_1.z
290
- .enum(['fill', 'update'])
291
- .optional()
292
- .describe('fill (default): only empty fields; update: overwrite with non-empty values'),
243
+ agentId,
244
+ rows: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.string())).min(1),
245
+ mode: zod_1.z.enum(['fill', 'update']).optional(),
293
246
  },
294
247
  run: async ({ client }, { agentId, rows, mode }) => client.post(await client.orgPath(peoplePath(agentId, '/import')), {
295
248
  rows,
296
249
  ...(mode ? { mode } : {}),
297
250
  }),
298
251
  }),
252
+ // ── Outreach sends (the console's Send / Follow up buttons) ──────────
253
+ (0, tool_1.defineTool)({
254
+ name: 'send_outreach',
255
+ title: 'Send outreach to a person',
256
+ description: "Start an outreach conversation with a Person by sending the agent's greeting to their phone — a REAL message to a real person; the host must confirm with the user first. Needs an E.164 phone on the Person and an active RCS channel binding. Optional per-send overrides: greetingTemplateId (unknown id falls back to the configured greeting), playbookId (unknown id → 400). Returns { success, channelUserId?, rcsCapable?, carrier? }. Errors: 409 agent.outreach.already_initiated (outreach was already started for this person — never retry); 400 agent.outreach.send_failed (no phone / not RCS-capable / no active RCS channel / dispatch error — title says why). Maps to POST /v1/orgs/{org}/agents/{agent}/people/{personId}/outreach.",
257
+ kind: 'destructive',
258
+ scope: 'people:write',
259
+ roleFloor: 'editor',
260
+ profile: 'core',
261
+ input: {
262
+ agentId,
263
+ personId,
264
+ greetingTemplateId: zod_1.z
265
+ .string()
266
+ .min(1)
267
+ .optional()
268
+ .describe('Message template id overriding outreach.greetingTemplateId'),
269
+ playbookId: zod_1.z
270
+ .string()
271
+ .min(1)
272
+ .optional()
273
+ .describe('Outreach-eligible playbook id overriding the outbound default'),
274
+ },
275
+ run: async ({ client }, { agentId, personId, greetingTemplateId, playbookId }) => client.post(await client.orgPath(personPath(agentId, personId, '/outreach')), {
276
+ ...(greetingTemplateId !== undefined ? { greetingTemplateId } : {}),
277
+ ...(playbookId !== undefined ? { playbookId } : {}),
278
+ }),
279
+ }),
280
+ (0, tool_1.defineTool)({
281
+ name: 'send_outreach_follow_up',
282
+ title: 'Send an outreach follow-up to a person',
283
+ description: "Send one manual follow-up message now to a Person who was already reached by send_outreach — a REAL message; the host must confirm with the user first. Omit messageTemplateId to use the next configured follow-up step's template. Returns { success }. 400 agent.outreach.follow_up_failed when there is no outreach conversation yet, the template is unknown/unconfigured, or delivery fails (title says why). Maps to POST /v1/orgs/{org}/agents/{agent}/people/{personId}/outreach/follow-up.",
284
+ kind: 'destructive',
285
+ scope: 'people:write',
286
+ roleFloor: 'editor',
287
+ input: {
288
+ agentId,
289
+ personId,
290
+ messageTemplateId: zod_1.z
291
+ .string()
292
+ .min(1)
293
+ .optional()
294
+ .describe('Message template id to send'),
295
+ },
296
+ run: async ({ client }, { agentId, personId, messageTemplateId }) => client.post(await client.orgPath(personPath(agentId, personId, '/outreach/follow-up')), {
297
+ ...(messageTemplateId !== undefined ? { messageTemplateId } : {}),
298
+ }),
299
+ }),
299
300
  (0, tool_1.defineTool)({
300
301
  name: 'list_person_appointments',
301
302
  title: "List a person's appointments",
302
- description: "List one person's scheduled calls (appointments), newest first, including cancelled ones — each with startUtc, durationMinutes, prospectTimezone, status (scheduled | rescheduled | cancelled | completed), representative, notes and history. Returns { data: Appointment[] }. Maps to GET /v1/orgs/{org}/agents/{agent}/people/{personId}/appointments.",
303
+ description: "One person's scheduled calls, newest first, incl. cancelled — startUtc, durationMinutes, prospectTimezone, status (scheduled | rescheduled | cancelled | completed), representative, notes, history. Maps to GET /v1/orgs/{org}/agents/{agent}/people/{personId}/appointments.",
303
304
  kind: 'read',
304
305
  scope: 'people:read',
305
306
  roleFloor: 'viewer',
306
- input: {
307
- agentId: zod_1.z.string().describe('Agent id'),
308
- personId: zod_1.z.string().describe('Person id'),
309
- },
307
+ input: { agentId, personId },
310
308
  run: async ({ client }, { agentId, personId }) => client.get(await client.orgPath(personPath(agentId, personId, '/appointments'))),
311
309
  }),
312
310
  (0, tool_1.defineTool)({
313
311
  name: 'list_appointments',
314
312
  title: 'List appointments (all people)',
315
- description: "List every appointment across the agent's people (the console Calls view), newest start first, each annotated with personId and personName when the linked person resolves. Filter by status (scheduled | completed | cancelled; completed means the scheduled time has elapsed) and cap with limit (default 200, max 500). Returns { data: Appointment[] }. Maps to GET /v1/orgs/{org}/agents/{agent}/appointments.",
313
+ description: "Every appointment across the agent's people (the console Calls view), newest start first, annotated with personId/personName. Filter by status; completed means the scheduled time has elapsed. Maps to GET /v1/orgs/{org}/agents/{agent}/appointments.",
316
314
  kind: 'read',
317
315
  scope: 'people:read',
318
316
  roleFloor: 'viewer',
319
317
  input: {
320
- agentId: zod_1.z.string().describe('Agent id'),
321
- status: zod_1.z
322
- .enum(['scheduled', 'completed', 'cancelled'])
323
- .optional()
324
- .describe('Only appointments in this status'),
325
- limit: zod_1.z
326
- .number()
327
- .int()
328
- .min(1)
329
- .max(500)
330
- .optional()
331
- .describe('Max appointments to return (default 200, max 500)'),
318
+ agentId,
319
+ status: zod_1.z.enum(['scheduled', 'completed', 'cancelled']).optional(),
320
+ limit: zod_1.z.number().int().min(1).max(500).optional().describe('Default 200'),
332
321
  },
333
322
  run: async ({ client }, { agentId, status, limit }) => client.get(await client.orgPath(`/agents/${encodeURIComponent(agentId)}/appointments`), { status, limit }),
334
323
  }),
335
324
  (0, tool_1.defineTool)({
336
325
  name: 'list_segments',
337
326
  title: 'List people segments',
338
- description: "List the agent's saved People segments (named, persisted filters; up to 50 per agent). Returns { data: PeopleSegment[] } with id, name, description, filter. Pass a segment's id as segmentId to list_people / export_people. Maps to GET /v1/orgs/{org}/agents/{agent}/people/segments.",
327
+ description: "List the agent's saved People segments (named filters; up to 50): id, name, description, filter. Pass an id as segmentId to list_people / export_people. Maps to GET /v1/orgs/{org}/agents/{agent}/people/segments.",
339
328
  kind: 'read',
340
329
  scope: 'people:read',
341
330
  roleFloor: 'viewer',
342
- input: {
343
- agentId: zod_1.z.string().describe('Agent id'),
344
- },
331
+ profile: 'core',
332
+ input: { agentId },
345
333
  run: async ({ client }, { agentId }) => client.get(await client.orgPath(peoplePath(agentId, '/segments'))),
346
334
  }),
347
335
  (0, tool_1.defineTool)({
@@ -352,24 +340,21 @@ exports.peopleTools = [
352
340
  scope: 'people:read',
353
341
  roleFloor: 'viewer',
354
342
  input: {
355
- agentId: zod_1.z.string().describe('Agent id'),
356
- segmentId: zod_1.z.string().describe('Segment id (per-agent slug)'),
343
+ agentId,
344
+ segmentId: zod_1.z.string(),
357
345
  },
358
346
  run: async ({ client }, { agentId, segmentId }) => client.get(await client.orgPath(segmentPath(agentId, segmentId))),
359
347
  }),
360
348
  (0, tool_1.defineTool)({
361
349
  name: 'create_segment',
362
350
  title: 'Create a people segment',
363
- description: 'Save a named People filter as a segment on the agent. The id is slugified from name (stable through later renames) unless an explicit id is given. A segment stores the filter, not its results. Returns the created PeopleSegment. Maps to POST /v1/orgs/{org}/agents/{agent}/people/segments.',
351
+ description: 'Save a named People filter as a segment (stores the filter, not results). Id is slugified from name unless given. Maps to POST /v1/orgs/{org}/agents/{agent}/people/segments.',
364
352
  kind: 'write',
365
353
  scope: 'people:write',
366
354
  roleFloor: 'editor',
367
355
  input: {
368
- agentId: zod_1.z.string().describe('Agent id'),
369
- id: zod_1.z
370
- .string()
371
- .optional()
372
- .describe('Optional explicit segment id; defaults to a slug of name. Duplicate ids are a 422.'),
356
+ agentId,
357
+ id: zod_1.z.string().optional().describe('Explicit id; duplicates → 422'),
373
358
  ...segmentBodyShape,
374
359
  },
375
360
  run: async ({ client }, { agentId, id, ...body }) => client.post(await client.orgPath(peoplePath(agentId, '/segments')), {
@@ -380,13 +365,13 @@ exports.peopleTools = [
380
365
  (0, tool_1.defineTool)({
381
366
  name: 'update_segment',
382
367
  title: 'Replace a people segment',
383
- description: 'Replace a saved People segment wholesale (PUT): name, description and filter under the id in the path — send the complete segment, not a diff (read it first with get_segment). Replacing an unknown id upserts a new segment with that id (201). Returns the PeopleSegment. Maps to PUT /v1/orgs/{org}/agents/{agent}/people/segments/{segmentId}.',
368
+ description: 'Replace a saved People segment wholesale — send the complete segment (read it first with get_segment). Unknown id upserts (201). Maps to PUT /v1/orgs/{org}/agents/{agent}/people/segments/{segmentId}.',
384
369
  kind: 'write',
385
370
  scope: 'people:write',
386
371
  roleFloor: 'editor',
387
372
  input: {
388
- agentId: zod_1.z.string().describe('Agent id'),
389
- segmentId: zod_1.z.string().describe('Segment id to replace'),
373
+ agentId,
374
+ segmentId: zod_1.z.string(),
390
375
  ...segmentBodyShape,
391
376
  },
392
377
  run: async ({ client }, { agentId, segmentId, ...body }) => client.put(await client.orgPath(segmentPath(agentId, segmentId)), body),
@@ -394,13 +379,13 @@ exports.peopleTools = [
394
379
  (0, tool_1.defineTool)({
395
380
  name: 'delete_segment',
396
381
  title: 'Delete a people segment',
397
- description: 'Delete a saved People segment. Only the saved filter is removed — no Person records are affected. Maps to DELETE /v1/orgs/{org}/agents/{agent}/people/segments/{segmentId}.',
382
+ description: 'Delete a saved People segment (only the filter; no Person records affected). Maps to DELETE /v1/orgs/{org}/agents/{agent}/people/segments/{segmentId}.',
398
383
  kind: 'destructive',
399
384
  scope: 'people:write',
400
385
  roleFloor: 'editor',
401
386
  input: {
402
- agentId: zod_1.z.string().describe('Agent id'),
403
- segmentId: zod_1.z.string().describe('Segment id to delete'),
387
+ agentId,
388
+ segmentId: zod_1.z.string(),
404
389
  },
405
390
  run: async ({ client }, { agentId, segmentId }) => {
406
391
  await client.delete(await client.orgPath(segmentPath(agentId, segmentId)));
@@ -1 +1 @@
1
- {"version":3,"file":"people.js","sourceRoot":"","sources":["../../src/tools/people.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,kCAAqC;AAErC;;;;;;GAMG;AAEH,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,CAAU,CAAC;AACtF,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,aAAa,CAAU,CAAC;AAErD;;;;GAIG;AACH,MAAM,WAAW,GAAG;IAClB,MAAM,EAAE,OAAC;SACN,IAAI,CAAC,aAAa,CAAC;SACnB,QAAQ,EAAE;SACV,QAAQ,CAAC,qEAAqE,CAAC;IAClF,CAAC,EAAE,OAAC;SACD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AE,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC;KAC1E,CAAC;IAEF,IAAA,iBAAU,EAAC;QACT,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,yBAAyB;QAChC,WAAW,EACT,wJAAwJ;QAC1J,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,cAAc;QACrB,SAAS,EAAE,QAAQ;QACnB,KAAK,EAAE;YACL,OAAO;YACP,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;SACtB;QACD,GAAG,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE;YAChD,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;YAC3E,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;QAC1C,CAAC;KACF,CAAC;CACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anychat-ai/mcp",
3
- "version": "0.1.1",
3
+ "version": "0.3.0",
4
4
  "description": "Anychat MCP server — drive your Anychat workspace (agents, playbooks, channels, people, outreach) from Claude Code, Claude Desktop, Cursor, or any MCP host.",
5
5
  "keywords": [
6
6
  "anychat",
@@ -49,6 +49,7 @@
49
49
  "prettier-fix": "prettier --write \"**/*.{ts,json,md}\"",
50
50
  "test": "TS_NODE_PROJECT=tsconfig.test.json TS_NODE_TRANSPILE_ONLY=true mocha",
51
51
  "tools:md": "node scripts/tool-table.js",
52
+ "tokens": "node scripts/tool-tokens.js",
52
53
  "test:e2e": "ANYCHAT_E2E=1 TS_NODE_PROJECT=tsconfig.test.json TS_NODE_TRANSPILE_ONLY=true mocha 'test/e2e/**/*.spec.ts'"
53
54
  },
54
55
  "dependencies": {