@agentcall/mcp-server 0.4.21 → 0.6.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.
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,wEAAwE;AAExE,MAAM,gBAAgB,GAAG;IACvB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;IAC/D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;IACjF,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IACxE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;IACpE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC;IAC/E,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;IACjE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;IACvD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;IACxE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2DAA2D,CAAC;IAClH,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8FAA8F,CAAC;IAChK,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAA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,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;CACpD,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import type { AgentCall } from "agentcall";
3
+ /**
4
+ * Auditable Call Memory MCP tools.
5
+ *
6
+ * The headline tool is `get_next_call_context` — it lets an external
7
+ * agent ask "what should I know before calling this person?" and get
8
+ * back the compact paragraph that would otherwise be injected into the
9
+ * next AI call's system prompt automatically. Pair this with
10
+ * `initiate_call` / `initiate_ai_call` to call someone with full memory
11
+ * of prior conversations.
12
+ */
13
+ export declare function registerMemoryTools(server: McpServer, client: AgentCall): void;
14
+ //# sourceMappingURL=memory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/tools/memory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAoB3C;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,QAqoBvE"}
@@ -0,0 +1,561 @@
1
+ import { z } from "zod";
2
+ import { contactOutputSchema, contactListOutputSchema, nextCallContextOutputSchema, memoryListOutputSchema, memoryOutputSchema, memoryTimelineOutputSchema, memoryCandidatesListOutputSchema, reportsListOutputSchema, callReportOutputSchema, purgeContactOutputSchema, approveCandidateOutputSchema, briefsListOutputSchema, briefAckOutputSchema, briefResolveOutputSchema, ackOutputSchema, } from "../schemas.js";
3
+ /**
4
+ * Auditable Call Memory MCP tools.
5
+ *
6
+ * The headline tool is `get_next_call_context` — it lets an external
7
+ * agent ask "what should I know before calling this person?" and get
8
+ * back the compact paragraph that would otherwise be injected into the
9
+ * next AI call's system prompt automatically. Pair this with
10
+ * `initiate_call` / `initiate_ai_call` to call someone with full memory
11
+ * of prior conversations.
12
+ */
13
+ export function registerMemoryTools(server, client) {
14
+ // ── Contacts ─────────────────────────────────────────────────────────
15
+ server.registerTool("list_contacts", {
16
+ title: "List Contacts",
17
+ description: "List the callers (contacts) seen across this agent's phone numbers. Returns the most recently active first, with display name (if known), call count, owner-set tags, and timestamps. Use this to browse who has called and who has been called.",
18
+ inputSchema: {
19
+ limit: z.number().optional().describe("Max contacts to return (default 20, max 100)"),
20
+ cursor: z.string().optional().describe("Pagination cursor from a previous response"),
21
+ since: z.string().optional().describe("ISO 8601 timestamp; only return contacts last seen after this"),
22
+ },
23
+ outputSchema: contactListOutputSchema,
24
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
25
+ }, async ({ limit, cursor, since }) => {
26
+ try {
27
+ const result = await client.contacts.list({ limit, cursor, since });
28
+ return {
29
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
30
+ structuredContent: result,
31
+ };
32
+ }
33
+ catch (error) {
34
+ return {
35
+ isError: true,
36
+ content: [
37
+ {
38
+ type: "text",
39
+ text: `Error listing contacts: ${error instanceof Error ? error.message : String(error)}`,
40
+ },
41
+ ],
42
+ };
43
+ }
44
+ });
45
+ server.registerTool("get_contact", {
46
+ title: "Get Contact",
47
+ description: "Get a single contact by ID. Returns display name, tags, owner notes, verified flag, blocked status, call count, and timestamps.",
48
+ inputSchema: {
49
+ contactId: z.string().describe("The contact ID (e.g. 'ct_abc123')"),
50
+ },
51
+ outputSchema: contactOutputSchema,
52
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
53
+ }, async ({ contactId }) => {
54
+ try {
55
+ const contact = await client.contacts.get(contactId);
56
+ return {
57
+ content: [{ type: "text", text: JSON.stringify(contact, null, 2) }],
58
+ structuredContent: contact,
59
+ };
60
+ }
61
+ catch (error) {
62
+ return {
63
+ isError: true,
64
+ content: [
65
+ {
66
+ type: "text",
67
+ text: `Error getting contact: ${error instanceof Error ? error.message : String(error)}`,
68
+ },
69
+ ],
70
+ };
71
+ }
72
+ });
73
+ server.registerTool("get_contact_by_phone", {
74
+ title: "Get Contact By Phone",
75
+ description: "Look up a contact by their E.164 phone number. Returns 404 if no contact exists for this phone yet (e.g. a number we've never called or received a call from).",
76
+ inputSchema: {
77
+ phone: z.string().describe("E.164 phone number (e.g. '+14155551234')"),
78
+ },
79
+ outputSchema: contactOutputSchema,
80
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
81
+ }, async ({ phone }) => {
82
+ try {
83
+ const contact = await client.contacts.getByPhone(phone);
84
+ return {
85
+ content: [{ type: "text", text: JSON.stringify(contact, null, 2) }],
86
+ structuredContent: contact,
87
+ };
88
+ }
89
+ catch (error) {
90
+ return {
91
+ isError: true,
92
+ content: [
93
+ {
94
+ type: "text",
95
+ text: `Error looking up contact by phone: ${error instanceof Error ? error.message : String(error)}`,
96
+ },
97
+ ],
98
+ };
99
+ }
100
+ });
101
+ server.registerTool("get_next_call_context", {
102
+ title: "Get Next-Call Context",
103
+ description: "THE killer tool for cross-call memory: render the compact Memory paragraph that would be injected into the next AI call from or to this contact. Use BEFORE placing an AI call to know who the caller is, what was discussed, and what's still open. Returns isEmpty=true and an empty contextBlock when there's no useful memory yet (first call from this contact, or AgentCall Memory not yet enabled on this agent).",
104
+ inputSchema: {
105
+ contactId: z.string().describe("The contact ID to render context for"),
106
+ numberId: z
107
+ .string()
108
+ .optional()
109
+ .describe("Which AgentCall number perspective to render from. Defaults to the contact's most recent call's number."),
110
+ },
111
+ outputSchema: nextCallContextOutputSchema,
112
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
113
+ }, async ({ contactId, numberId }) => {
114
+ try {
115
+ const result = await client.contacts.getNextCallContext(contactId, { numberId });
116
+ return {
117
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
118
+ structuredContent: result,
119
+ };
120
+ }
121
+ catch (error) {
122
+ return {
123
+ isError: true,
124
+ content: [
125
+ {
126
+ type: "text",
127
+ text: `Error fetching next-call context: ${error instanceof Error ? error.message : String(error)}`,
128
+ },
129
+ ],
130
+ };
131
+ }
132
+ });
133
+ // ── Memory ───────────────────────────────────────────────────────────
134
+ server.registerTool("get_current_memory", {
135
+ title: "Get Current Memory",
136
+ description: "Return the active Memory rows (\"Current Truth\") for a contact or scope. Memory is the structured, source-backed memory layer extracted from prior calls. Each row has a slug (the concept handle), text (the value), confidence (0..1), and the IDs of the CallReports that corroborate it. Use get_next_call_context if you want the rendered text block instead of raw rows.",
137
+ inputSchema: {
138
+ contactId: z.string().optional().describe("Filter to memories about this contact (caller / contact scope)"),
139
+ scope: z
140
+ .string()
141
+ .optional()
142
+ .describe("Narrow to one scope: caller | contact | company | phone_number | workspace | agent"),
143
+ },
144
+ outputSchema: memoryListOutputSchema,
145
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
146
+ }, async ({ contactId, scope }) => {
147
+ try {
148
+ const result = await client.memory.current({ contactId, scope });
149
+ return {
150
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
151
+ structuredContent: result,
152
+ };
153
+ }
154
+ catch (error) {
155
+ return {
156
+ isError: true,
157
+ content: [
158
+ {
159
+ type: "text",
160
+ text: `Error reading current memory: ${error instanceof Error ? error.message : String(error)}`,
161
+ },
162
+ ],
163
+ };
164
+ }
165
+ });
166
+ server.registerTool("get_memory", {
167
+ title: "Get Memory Row",
168
+ description: "Get a single Memory row by ID.",
169
+ inputSchema: {
170
+ memoryId: z.string().describe("The memory ID"),
171
+ },
172
+ outputSchema: memoryOutputSchema,
173
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
174
+ }, async ({ memoryId }) => {
175
+ try {
176
+ const memory = await client.memory.get(memoryId);
177
+ return {
178
+ content: [{ type: "text", text: JSON.stringify(memory, null, 2) }],
179
+ structuredContent: memory,
180
+ };
181
+ }
182
+ catch (error) {
183
+ return {
184
+ isError: true,
185
+ content: [
186
+ {
187
+ type: "text",
188
+ text: `Error getting memory: ${error instanceof Error ? error.message : String(error)}`,
189
+ },
190
+ ],
191
+ };
192
+ }
193
+ });
194
+ server.registerTool("get_memory_timeline", {
195
+ title: "Get Memory Timeline",
196
+ description: "Append-only audit log for one Memory slot. Every proposed / applied / corroborated / superseded / rejected event with the linked CallReport and the before/after states. The audit trail that backs the memory.",
197
+ inputSchema: {
198
+ memoryId: z.string().describe("The memory ID to get the timeline for"),
199
+ },
200
+ outputSchema: memoryTimelineOutputSchema,
201
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
202
+ }, async ({ memoryId }) => {
203
+ try {
204
+ const result = await client.memory.timeline(memoryId);
205
+ return {
206
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
207
+ structuredContent: result,
208
+ };
209
+ }
210
+ catch (error) {
211
+ return {
212
+ isError: true,
213
+ content: [
214
+ {
215
+ type: "text",
216
+ text: `Error getting memory timeline: ${error instanceof Error ? error.message : String(error)}`,
217
+ },
218
+ ],
219
+ };
220
+ }
221
+ });
222
+ server.registerTool("list_memory_candidates", {
223
+ title: "List Memory Candidates",
224
+ description: "List MemoryCandidate rows. The post-call extractor produces these for every completed AI call; high-confidence ones auto-promote into Memory based on the agent's memoryPolicy. Use this to inspect what was proposed and why (status=proposed for unreviewed, status=rejected for contradictions caught by the Bob-vs-Robert handler).",
225
+ inputSchema: {
226
+ status: z
227
+ .string()
228
+ .optional()
229
+ .describe("Filter by status: proposed | approved | rejected | applied | expired | superseded"),
230
+ contactId: z.string().optional().describe("Filter to candidates about this contact"),
231
+ type: z
232
+ .string()
233
+ .optional()
234
+ .describe("Filter by candidate type: fact | preference | decision | task | warning"),
235
+ limit: z.number().optional().describe("Max rows (default 20)"),
236
+ cursor: z.string().optional().describe("Pagination cursor"),
237
+ },
238
+ outputSchema: memoryCandidatesListOutputSchema,
239
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
240
+ }, async ({ status, contactId, type, limit, cursor }) => {
241
+ try {
242
+ const result = await client.memory.candidates({ status, contactId, type, limit, cursor });
243
+ return {
244
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
245
+ structuredContent: result,
246
+ };
247
+ }
248
+ catch (error) {
249
+ return {
250
+ isError: true,
251
+ content: [
252
+ {
253
+ type: "text",
254
+ text: `Error listing memory candidates: ${error instanceof Error ? error.message : String(error)}`,
255
+ },
256
+ ],
257
+ };
258
+ }
259
+ });
260
+ // ── Reports ──────────────────────────────────────────────────────────
261
+ server.registerTool("list_call_reports", {
262
+ title: "List Call Reports",
263
+ description: "List CallReport rows across all calls. Each report is the structured analysis the extractor produced for a completed AI call (summary, intent, urgency, extracted facts, etc). Use get_call_report to fetch a single report's full payload + candidates. Filter by contactId to see all reports for one caller, or briefWorthy=true to see just the calls flagged for owner attention.",
264
+ inputSchema: {
265
+ contactId: z.string().optional().describe("Filter to reports about this contact"),
266
+ intent: z.string().optional().describe("Filter by extracted intent (service_request, scheduling, complaint, lead, etc)"),
267
+ urgency: z.enum(["high", "medium", "low"]).optional(),
268
+ briefWorthy: z.boolean().optional().describe("Only return reports the extractor flagged as needing owner attention"),
269
+ limit: z.number().optional().describe("Max rows (default 20)"),
270
+ cursor: z.string().optional().describe("Pagination cursor"),
271
+ },
272
+ outputSchema: reportsListOutputSchema,
273
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
274
+ }, async ({ contactId, intent, urgency, briefWorthy, limit, cursor }) => {
275
+ try {
276
+ const result = await client.reports.list({ contactId, intent, urgency, briefWorthy, limit, cursor });
277
+ return {
278
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
279
+ structuredContent: result,
280
+ };
281
+ }
282
+ catch (error) {
283
+ return {
284
+ isError: true,
285
+ content: [
286
+ {
287
+ type: "text",
288
+ text: `Error listing call reports: ${error instanceof Error ? error.message : String(error)}`,
289
+ },
290
+ ],
291
+ };
292
+ }
293
+ });
294
+ // ── Write tools ──────────────────────────────────────────────────────
295
+ server.registerTool("update_contact", {
296
+ title: "Update Contact",
297
+ description: "Owner-edit a contact's mutable fields. Pass only the fields to change. displayName, ownerNotes, and blockedAt accept null to clear. At least one field is required.",
298
+ inputSchema: {
299
+ contactId: z.string().describe("The contact ID"),
300
+ displayName: z.string().nullable().optional(),
301
+ tags: z.array(z.string()).optional(),
302
+ ownerNotes: z.string().nullable().optional(),
303
+ verified: z.boolean().optional(),
304
+ blockedAt: z
305
+ .string()
306
+ .nullable()
307
+ .optional()
308
+ .describe("ISO 8601 timestamp to mark do-not-engage, or null to unblock"),
309
+ },
310
+ outputSchema: contactOutputSchema,
311
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
312
+ }, async ({ contactId, ...patch }) => {
313
+ try {
314
+ const updated = await client.contacts.update(contactId, patch);
315
+ return {
316
+ content: [{ type: "text", text: JSON.stringify(updated, null, 2) }],
317
+ structuredContent: updated,
318
+ };
319
+ }
320
+ catch (error) {
321
+ return {
322
+ isError: true,
323
+ content: [{ type: "text", text: `Error updating contact: ${error instanceof Error ? error.message : String(error)}` }],
324
+ };
325
+ }
326
+ });
327
+ server.registerTool("purge_contact", {
328
+ title: "Purge Contact (Right-to-Forget)",
329
+ description: "DESTRUCTIVE. Wipes a caller's Memory + MemoryCandidate + Brief rows, redacts every CallReport.payload that referenced them, and deletes the Contact. Underlying Call rows and raw CallTranscript stay (billing/TCPA evidence). Returns wipe counts. Idempotent on missing contacts (returns zero counts). Use only when the caller has formally requested erasure.",
330
+ inputSchema: {
331
+ contactId: z.string().describe("The contact ID to purge"),
332
+ },
333
+ outputSchema: purgeContactOutputSchema,
334
+ annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true },
335
+ }, async ({ contactId }) => {
336
+ try {
337
+ const result = await client.contacts.purge(contactId);
338
+ return {
339
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
340
+ structuredContent: result,
341
+ };
342
+ }
343
+ catch (error) {
344
+ return {
345
+ isError: true,
346
+ content: [{ type: "text", text: `Error purging contact: ${error instanceof Error ? error.message : String(error)}` }],
347
+ };
348
+ }
349
+ });
350
+ server.registerTool("update_memory", {
351
+ title: "Update Memory Row",
352
+ description: "Owner-edit a Memory row's text or expiry. Writes an 'edited' MemoryEvent to the audit trail so the change is traceable. Pass null to expiresAt to clear an expiry.",
353
+ inputSchema: {
354
+ memoryId: z.string().describe("The memory ID"),
355
+ text: z.string().optional(),
356
+ expiresAt: z.string().nullable().optional().describe("ISO 8601 expiry timestamp, or null to clear"),
357
+ },
358
+ outputSchema: memoryOutputSchema,
359
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
360
+ }, async ({ memoryId, ...patch }) => {
361
+ try {
362
+ const updated = await client.memory.update(memoryId, patch);
363
+ return {
364
+ content: [{ type: "text", text: JSON.stringify(updated, null, 2) }],
365
+ structuredContent: updated,
366
+ };
367
+ }
368
+ catch (error) {
369
+ return {
370
+ isError: true,
371
+ content: [{ type: "text", text: `Error updating memory: ${error instanceof Error ? error.message : String(error)}` }],
372
+ };
373
+ }
374
+ });
375
+ server.registerTool("delete_memory", {
376
+ title: "Delete Memory Row (Soft)",
377
+ description: "Soft-delete a Memory row: sets active=false and writes an 'expired' MemoryEvent. The row stays in the DB for audit but no longer appears in Current Truth or pre-call context. To wipe entirely, use purge_contact on the linked Contact.",
378
+ inputSchema: {
379
+ memoryId: z.string().describe("The memory ID to soft-delete"),
380
+ },
381
+ outputSchema: ackOutputSchema,
382
+ annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true },
383
+ }, async ({ memoryId }) => {
384
+ try {
385
+ const r = await client.memory.delete(memoryId);
386
+ const msg = r.alreadyInactive
387
+ ? `Memory ${memoryId} was already inactive`
388
+ : `Memory ${memoryId} marked inactive`;
389
+ const ack = { success: true, message: msg };
390
+ return {
391
+ content: [{ type: "text", text: msg }],
392
+ structuredContent: ack,
393
+ };
394
+ }
395
+ catch (error) {
396
+ return {
397
+ isError: true,
398
+ content: [{ type: "text", text: `Error deleting memory: ${error instanceof Error ? error.message : String(error)}` }],
399
+ };
400
+ }
401
+ });
402
+ server.registerTool("approve_memory_candidate", {
403
+ title: "Approve Memory Candidate",
404
+ description: "Manually promote a proposed MemoryCandidate to Memory. Bypasses the auto-promotion policy (used for types like task / decision that don't auto-approve, or for candidates below the confidence threshold). When the same Memory slot has a different value, the approval SUPERSEDES it (owner-set always wins contradictions, unlike auto-policy which requires a 0.15 confidence margin).",
405
+ inputSchema: {
406
+ candidateId: z.string().describe("The candidate ID"),
407
+ note: z.string().optional().describe("Optional audit-trail note for the MemoryEvent"),
408
+ },
409
+ outputSchema: approveCandidateOutputSchema,
410
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
411
+ }, async ({ candidateId, note }) => {
412
+ try {
413
+ const result = await client.memory.approveCandidate(candidateId, { note });
414
+ return {
415
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
416
+ structuredContent: result,
417
+ };
418
+ }
419
+ catch (error) {
420
+ return {
421
+ isError: true,
422
+ content: [{ type: "text", text: `Error approving candidate: ${error instanceof Error ? error.message : String(error)}` }],
423
+ };
424
+ }
425
+ });
426
+ server.registerTool("reject_memory_candidate", {
427
+ title: "Reject Memory Candidate",
428
+ description: "Manually reject a proposed MemoryCandidate. Marks it status='rejected' and writes a 'rejected' MemoryEvent. The candidate row stays in the DB for the audit trail.",
429
+ inputSchema: {
430
+ candidateId: z.string().describe("The candidate ID"),
431
+ reason: z.string().optional().describe("Optional reason for the audit trail"),
432
+ },
433
+ outputSchema: ackOutputSchema,
434
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
435
+ }, async ({ candidateId, reason }) => {
436
+ try {
437
+ const r = await client.memory.rejectCandidate(candidateId, { reason });
438
+ const msg = r.alreadyRejected
439
+ ? `Candidate ${candidateId} was already rejected`
440
+ : `Candidate ${candidateId} marked rejected`;
441
+ const ack = { success: true, message: msg };
442
+ return { content: [{ type: "text", text: msg }], structuredContent: ack };
443
+ }
444
+ catch (error) {
445
+ return {
446
+ isError: true,
447
+ content: [{ type: "text", text: `Error rejecting candidate: ${error instanceof Error ? error.message : String(error)}` }],
448
+ };
449
+ }
450
+ });
451
+ // ── Briefs (owner inbox) ─────────────────────────────────────────────
452
+ server.registerTool("list_briefs", {
453
+ title: "List Briefs",
454
+ description: "List Brief items (owner-facing digest of calls needing attention). Defaults to open + acknowledged briefs. Filter by status, urgency, or contactId. Briefs are produced by the extractor when a call has ownerBrief in its payload or when intent+urgency together flag the call as briefWorthy.",
455
+ inputSchema: {
456
+ status: z.enum(["open", "acknowledged", "resolved", "dismissed"]).optional(),
457
+ urgency: z.enum(["high", "medium", "low"]).optional(),
458
+ contactId: z.string().optional(),
459
+ limit: z.number().optional().describe("Max rows (default 20)"),
460
+ cursor: z.string().optional().describe("Pagination cursor"),
461
+ },
462
+ outputSchema: briefsListOutputSchema,
463
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
464
+ }, async ({ status, urgency, contactId, limit, cursor }) => {
465
+ try {
466
+ const result = await client.briefs.list({ status, urgency, contactId, limit, cursor });
467
+ return {
468
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
469
+ structuredContent: result,
470
+ };
471
+ }
472
+ catch (error) {
473
+ return {
474
+ isError: true,
475
+ content: [{ type: "text", text: `Error listing briefs: ${error instanceof Error ? error.message : String(error)}` }],
476
+ };
477
+ }
478
+ });
479
+ server.registerTool("acknowledge_brief", {
480
+ title: "Acknowledge Brief",
481
+ description: "Mark a brief as acknowledged ('I have seen this'). Acknowledged briefs stay in the working set (use resolve_brief to close them out). Idempotent: re-acking an acknowledged brief returns the existing acknowledgedAt timestamp.",
482
+ inputSchema: { briefId: z.string().describe("The brief ID") },
483
+ outputSchema: briefAckOutputSchema,
484
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
485
+ }, async ({ briefId }) => {
486
+ try {
487
+ const r = await client.briefs.ack(briefId);
488
+ return {
489
+ content: [{ type: "text", text: JSON.stringify(r, null, 2) }],
490
+ structuredContent: r,
491
+ };
492
+ }
493
+ catch (error) {
494
+ return {
495
+ isError: true,
496
+ content: [{ type: "text", text: `Error acknowledging brief: ${error instanceof Error ? error.message : String(error)}` }],
497
+ };
498
+ }
499
+ });
500
+ server.registerTool("resolve_brief", {
501
+ title: "Resolve Brief",
502
+ description: "Close out a brief: status=resolved with resolvedAt stamped. For items the owner has finished acting on. Idempotent.",
503
+ inputSchema: { briefId: z.string().describe("The brief ID") },
504
+ outputSchema: briefResolveOutputSchema,
505
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
506
+ }, async ({ briefId }) => {
507
+ try {
508
+ const r = await client.briefs.resolve(briefId);
509
+ return {
510
+ content: [{ type: "text", text: JSON.stringify(r, null, 2) }],
511
+ structuredContent: r,
512
+ };
513
+ }
514
+ catch (error) {
515
+ return {
516
+ isError: true,
517
+ content: [{ type: "text", text: `Error resolving brief: ${error instanceof Error ? error.message : String(error)}` }],
518
+ };
519
+ }
520
+ });
521
+ server.registerTool("get_call_report", {
522
+ title: "Get Call Report",
523
+ description: "Get the full structured analysis for a completed AI call. Includes the summary, intent, urgency, extracted facts/preferences/decisions/commitments/tasks, the nextCallContext paragraph, and all MemoryCandidate rows linked to this call. Reports become available 5-30 seconds after the call ends (the extractor runs in a background queue); returns isError when the call is still in progress.",
524
+ inputSchema: {
525
+ callId: z.string().describe("The AI call ID to get the report for"),
526
+ },
527
+ outputSchema: callReportOutputSchema,
528
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
529
+ }, async ({ callId }) => {
530
+ try {
531
+ const report = await client.calls.getReport(callId);
532
+ if (!report) {
533
+ return {
534
+ isError: true,
535
+ content: [
536
+ {
537
+ type: "text",
538
+ text: `Report not ready yet for call ${callId}. The extractor runs 5-30s after a call ends; try again shortly.`,
539
+ },
540
+ ],
541
+ };
542
+ }
543
+ return {
544
+ content: [{ type: "text", text: JSON.stringify(report, null, 2) }],
545
+ structuredContent: report,
546
+ };
547
+ }
548
+ catch (error) {
549
+ return {
550
+ isError: true,
551
+ content: [
552
+ {
553
+ type: "text",
554
+ text: `Error getting call report: ${error instanceof Error ? error.message : String(error)}`,
555
+ },
556
+ ],
557
+ };
558
+ }
559
+ });
560
+ }
561
+ //# sourceMappingURL=memory.js.map