@outlit/tools 0.2.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.
package/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # @outlit/tools
2
+
3
+ Customer intelligence tool contracts and API client helpers for Outlit agents.
4
+
5
+ This package mirrors the public tool gateway contracts used by Outlit CLI, Pi, and agent integrations. The hosted remote MCP server implementation does not live in this repository; discover runtime MCP metadata from the canonical Outlit endpoints below.
6
+
7
+ Outlit is the real-time understanding of every customer, the infrastructure agents use to automate customer operations.
8
+
9
+ ## Canonical Docs
10
+
11
+ - Tool gateway API docs: <https://docs.outlit.ai/api-reference/tools>
12
+ - API overview: <https://docs.outlit.ai/api-reference/introduction>
13
+ - OpenAPI spec: <https://docs.outlit.ai/openapi.json>
14
+ - MCP integration docs: <https://docs.outlit.ai/ai-integrations/mcp>
15
+ - MCP server metadata: <https://mcp.outlit.ai/.well-known/mcp/server.json>
16
+ - MCP server card: <https://mcp.outlit.ai/.well-known/mcp/server-card.json>
17
+ - Official MCP Registry listing: <https://registry.modelcontextprotocol.io/v0.1/servers?search=ai.outlit/outlit>
18
+ - Agent-facing docs index: <https://docs.outlit.ai/llms.txt>
19
+
20
+ ## When to use this package
21
+
22
+ Install `@outlit/tools` when you are building a custom agent, server-side integration, or API client that calls the Outlit tool gateway directly and needs typed tool contracts.
23
+
24
+ Use the hosted remote MCP server instead when you are connecting an MCP client such as Claude Desktop, Cursor, Codex, or another agent runtime. Use `@outlit/cli` for terminal workflows, and use `@outlit/pi` when building Pi agents that need Outlit tool and skill guidance.
25
+
26
+ ```bash
27
+ npm install @outlit/tools
28
+ ```
package/dist/index.cjs CHANGED
@@ -53,7 +53,8 @@ __export(src_exports, {
53
53
  timelineTimeframes: () => timelineTimeframes,
54
54
  unsupportedCustomerFactTypes: () => unsupportedCustomerFactTypes,
55
55
  userJourneyStages: () => userJourneyStages,
56
- userListOrderFields: () => userListOrderFields
56
+ userListOrderFields: () => userListOrderFields,
57
+ workspaceUserListOrderFields: () => workspaceUserListOrderFields
57
58
  });
58
59
  module.exports = __toCommonJS(src_exports);
59
60
 
@@ -61,6 +62,7 @@ module.exports = __toCommonJS(src_exports);
61
62
  var customerToolNames = [
62
63
  "outlit_list_customers",
63
64
  "outlit_list_users",
65
+ "outlit_list_workspace_users",
64
66
  "outlit_get_customer",
65
67
  "outlit_get_timeline",
66
68
  "outlit_list_facts",
@@ -77,7 +79,8 @@ var customerSourceTypes = [
77
79
  "CALL",
78
80
  "CALENDAR_EVENT",
79
81
  "SUPPORT_TICKET",
80
- "OPPORTUNITY"
82
+ "OPPORTUNITY",
83
+ "SLACK"
81
84
  ];
82
85
  var customerSourceTypeAliases = ["CRM", "CRM_OPPORTUNITY"];
83
86
  var customerSourceTypeInputs = [
@@ -86,17 +89,25 @@ var customerSourceTypeInputs = [
86
89
  "CALENDAR_EVENT",
87
90
  "SUPPORT_TICKET",
88
91
  "OPPORTUNITY",
92
+ "SLACK",
89
93
  "CRM",
90
94
  "CRM_OPPORTUNITY"
91
95
  ];
92
96
  var customerToolContracts = {
93
97
  outlit_list_customers: {
94
98
  toolName: "outlit_list_customers",
99
+ title: "List Customers",
95
100
  description: "Browse and filter customers. Use this to find customers by billing status, activity recency, revenue, or name. Returns a paginated list with summary info (MRR, last activity, status).",
96
101
  inputSchema: {
97
102
  $schema: "https://json-schema.org/draft/2020-12/schema",
98
103
  type: "object",
99
104
  properties: {
105
+ activatedSince: {
106
+ description: "Filter customers activated at or after this ISO-8601 datetime",
107
+ type: "string",
108
+ format: "date-time",
109
+ pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
110
+ },
100
111
  billingStatus: {
101
112
  description: "Filter by billing status",
102
113
  type: "string",
@@ -149,6 +160,20 @@ var customerToolContracts = {
149
160
  type: "string",
150
161
  maxLength: 500
151
162
  },
163
+ ownerId: {
164
+ description: "Filter customers by internal owner user ID",
165
+ type: "string",
166
+ maxLength: 500
167
+ },
168
+ ownerEmail: {
169
+ description: "Filter customers by internal owner email address",
170
+ type: "string",
171
+ maxLength: 500
172
+ },
173
+ hasOwner: {
174
+ description: "Filter customers by whether they have an owner",
175
+ type: "boolean"
176
+ },
152
177
  limit: {
153
178
  description: "Results per page (max 1000)",
154
179
  default: 50,
@@ -178,6 +203,7 @@ var customerToolContracts = {
178
203
  },
179
204
  outlit_list_users: {
180
205
  toolName: "outlit_list_users",
206
+ title: "List Users",
181
207
  description: "Browse and filter users. Use this to find users by journey stage, activity recency, customer, or email/name. Returns a paginated list with activity info.",
182
208
  inputSchema: {
183
209
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -257,8 +283,63 @@ var customerToolContracts = {
257
283
  additionalProperties: false
258
284
  }
259
285
  },
286
+ outlit_list_workspace_users: {
287
+ toolName: "outlit_list_workspace_users",
288
+ title: "List Workspace Users",
289
+ description: "Browse internal workspace users such as CSMs, managers, account owners, and admins. Use this to discover who owns customers before composing dynamic reports across account books.",
290
+ inputSchema: {
291
+ $schema: "https://json-schema.org/draft/2020-12/schema",
292
+ type: "object",
293
+ properties: {
294
+ search: {
295
+ description: "Search internal workspace users by name, email, title, role, or territory",
296
+ type: "string",
297
+ maxLength: 500
298
+ },
299
+ role: {
300
+ description: "Filter internal workspace users by role metadata when available",
301
+ type: "string",
302
+ maxLength: 100
303
+ },
304
+ managerEmail: {
305
+ description: "Filter internal workspace users by manager email metadata when available",
306
+ type: "string",
307
+ maxLength: 500
308
+ },
309
+ hasOwnedCustomers: {
310
+ description: "When true, return only workspace users who own at least one customer",
311
+ type: "boolean"
312
+ },
313
+ limit: {
314
+ description: "Results per page (max 1000)",
315
+ default: 50,
316
+ type: "number",
317
+ minimum: 1,
318
+ maximum: 1e3
319
+ },
320
+ cursor: {
321
+ description: "Pagination cursor from previous response",
322
+ type: "string"
323
+ },
324
+ orderBy: {
325
+ description: "Field to order workspace users by",
326
+ default: "owned_customer_count",
327
+ type: "string",
328
+ enum: ["name", "email", "owned_customer_count"]
329
+ },
330
+ orderDirection: {
331
+ description: "Sort direction",
332
+ default: "desc",
333
+ type: "string",
334
+ enum: ["asc", "desc"]
335
+ }
336
+ },
337
+ additionalProperties: false
338
+ }
339
+ },
260
340
  outlit_get_customer: {
261
341
  toolName: "outlit_get_customer",
342
+ title: "Get Customer",
262
343
  description: "Get full details for a single customer. Use this when you already know which customer you want to inspect. Optionally include related data (users, revenue, recent activity, engagement metrics).",
263
344
  inputSchema: {
264
345
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -289,6 +370,7 @@ var customerToolContracts = {
289
370
  },
290
371
  outlit_get_timeline: {
291
372
  toolName: "outlit_get_timeline",
373
+ title: "Get Customer Timeline",
292
374
  description: "Get the chronological activity timeline for a customer. Use this to see what happened and when \u2014 emails, calls, Slack messages, billing events, etc. Supports channel and date filtering.",
293
375
  inputSchema: {
294
376
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -299,20 +381,20 @@ var customerToolContracts = {
299
381
  description: "Customer ID or domain"
300
382
  },
301
383
  channels: {
302
- description: "Filter by event channel (e.g., EMAIL, SLACK, CALL, CALENDAR)",
384
+ description: "Filter by event channel. Use values such as PRODUCT, COMMUNICATION, MEETING, CRM, BILLING, SUPPORT, IDENTITY, DOCUMENT, or SYSTEM.",
303
385
  type: "array",
304
386
  items: {
305
387
  type: "string",
306
388
  enum: [
307
- "SDK",
308
- "EMAIL",
309
- "SLACK",
310
- "CALL",
311
- "CALENDAR",
389
+ "PRODUCT",
390
+ "COMMUNICATION",
391
+ "MEETING",
312
392
  "CRM",
313
393
  "BILLING",
314
394
  "SUPPORT",
315
- "INTERNAL"
395
+ "IDENTITY",
396
+ "DOCUMENT",
397
+ "SYSTEM"
316
398
  ]
317
399
  }
318
400
  },
@@ -358,6 +440,7 @@ var customerToolContracts = {
358
440
  },
359
441
  outlit_list_facts: {
360
442
  toolName: "outlit_list_facts",
443
+ title: "List Customer Facts",
361
444
  description: "List structured facts known about a customer. Use filters like status, sourceTypes, factTypes, factCategories, and date bounds to narrow the result set. For topic-specific retrieval, use outlit_search_customer_context instead.",
362
445
  inputSchema: {
363
446
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -447,6 +530,7 @@ var customerToolContracts = {
447
530
  },
448
531
  outlit_get_fact: {
449
532
  toolName: "outlit_get_fact",
533
+ title: "Get Customer Fact",
450
534
  description: "Get one exact fact by ID. Returns the canonical fact shape and optionally expands requested related data such as evidence.",
451
535
  inputSchema: {
452
536
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -474,6 +558,7 @@ var customerToolContracts = {
474
558
  },
475
559
  outlit_get_source: {
476
560
  toolName: "outlit_get_source",
561
+ title: "Get Source",
477
562
  description: "Get one exact source record by generic sourceType and sourceId. Use this when you already know the concrete underlying source you want to inspect.",
478
563
  inputSchema: {
479
564
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -495,6 +580,7 @@ var customerToolContracts = {
495
580
  },
496
581
  outlit_list_sources: {
497
582
  toolName: "outlit_list_sources",
583
+ title: "List Sources",
498
584
  description: "List concrete source records deterministically. Use this instead of semantic search when you need enumerated calls, emails, calendar events, support tickets, or opportunities.",
499
585
  inputSchema: {
500
586
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -558,7 +644,8 @@ var customerToolContracts = {
558
644
  },
559
645
  outlit_search_customer_context: {
560
646
  toolName: "outlit_search_customer_context",
561
- description: "Search across all known customer context using a natural-language query. Returns grouped artifact-level results for matching sources and facts. Omit customer to search across all customers in the organization.",
647
+ title: "Search Customer Context",
648
+ description: "Search across all known customer context using a natural-language query. Returns ranked artifact-level discovery previews with at most two matching excerpts per source or fact. Use outlit_get_source with a returned sourceType and sourceId when you need the canonical source contents. Omit customer to search across all customers in the organization.",
562
649
  inputSchema: {
563
650
  $schema: "https://json-schema.org/draft/2020-12/schema",
564
651
  type: "object",
@@ -615,6 +702,7 @@ var customerToolContracts = {
615
702
  },
616
703
  outlit_query: {
617
704
  toolName: "outlit_query",
705
+ title: "Run SQL Query",
618
706
  description: "Execute read-only SQL queries against your analytics views.\n\nAvailable views:\n- activity: Customer activity events (event_name, event_type, event_channel, customer_id, occurred_at, properties, ...)\n- customers: Customer attributes (customer_id, domain, name, billing_status, plan, mrr_cents, traits, ...)\n- users: User attributes (user_id, email, name, customer_id, traits, ...)\n- revenue: Revenue snapshots over time (customer_id, snapshot_date, mrr_cents, ...)\n\nAll queries are automatically filtered to your organization's data.\nOnly SELECT queries are allowed.\nProperties and traits are JSON strings; inspect schemas and examples before filtering nested values.\n\nExample queries:\n- SELECT event_name, count(*) FROM activity GROUP BY 1 ORDER BY 2 DESC LIMIT 10\n- SELECT billing_status, sum(mrr_cents)/100 as mrr FROM customers GROUP BY 1\n- SELECT * FROM activity WHERE customer_id = 'cust_123' ORDER BY occurred_at DESC LIMIT 50",
619
707
  inputSchema: {
620
708
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -638,6 +726,7 @@ var customerToolContracts = {
638
726
  },
639
727
  outlit_schema: {
640
728
  toolName: "outlit_schema",
729
+ title: "Get SQL Schema",
641
730
  description: "Get schemas for available analytics views.\n\nUse this to discover column names, types, and descriptions before writing SQL queries.\nReturns column definitions and example queries for each view.",
642
731
  inputSchema: {
643
732
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -654,6 +743,7 @@ var customerToolContracts = {
654
743
  },
655
744
  outlit_send_notification: {
656
745
  toolName: "outlit_send_notification",
746
+ title: "Send Notification",
657
747
  description: "Send or post a notification. Use only when the user explicitly asks you to send, post, or notify. Slack is the default notifier when destinations are omitted.",
658
748
  inputSchema: {
659
749
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -698,34 +788,15 @@ var customerToolContracts = {
698
788
  minLength: 1,
699
789
  maxLength: 240
700
790
  },
701
- destinations: {
702
- description: "Optional explicit notification destinations. Omit to use the default notifier.",
791
+ destinationIds: {
792
+ description: "Optional NotificationDestination ids. Omit to use the default notifier.",
703
793
  minItems: 1,
704
794
  maxItems: 10,
705
795
  type: "array",
706
796
  items: {
707
- type: "object",
708
- properties: {
709
- provider: {
710
- description: "Notification provider",
711
- type: "string",
712
- enum: ["slack"]
713
- },
714
- channelId: {
715
- description: "Provider-specific destination channel ID",
716
- type: "string",
717
- minLength: 1,
718
- maxLength: 240
719
- },
720
- label: {
721
- description: "Optional destination label",
722
- type: "string",
723
- minLength: 1,
724
- maxLength: 120
725
- }
726
- },
727
- required: ["provider"],
728
- additionalProperties: false
797
+ type: "string",
798
+ format: "uuid",
799
+ pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
729
800
  }
730
801
  }
731
802
  },
@@ -831,15 +902,15 @@ var customerTimeframes = ["7d", "14d", "30d", "90d"];
831
902
  var notificationProviderValues = ["slack"];
832
903
  var notificationSeverityValues = ["low", "medium", "high"];
833
904
  var timelineChannels = [
834
- "SDK",
835
- "EMAIL",
836
- "SLACK",
837
- "CALL",
838
- "CALENDAR",
905
+ "PRODUCT",
906
+ "COMMUNICATION",
907
+ "MEETING",
839
908
  "CRM",
840
909
  "BILLING",
841
910
  "SUPPORT",
842
- "INTERNAL"
911
+ "IDENTITY",
912
+ "DOCUMENT",
913
+ "SYSTEM"
843
914
  ];
844
915
  var timelineTimeframes = ["7d", "14d", "30d", "90d", "all"];
845
916
  var userJourneyStages = [
@@ -850,8 +921,9 @@ var userJourneyStages = [
850
921
  "INACTIVE"
851
922
  ];
852
923
  var userListOrderFields = ["last_activity_at", "first_seen_at", "email"];
924
+ var workspaceUserListOrderFields = ["name", "email", "owned_customer_count"];
853
925
  var schemaTables = ["activity", "customers", "users", "revenue"];
854
- var customerToolContractHash = "5016d146842452855bfdd9ecc8f6be1a122125d0c392ceff315aeb2e44fefc7f";
926
+ var customerToolContractHash = "f1f06ac1d3fb5131095ac7047f5871f47942b0f5efcb1229151b52475bf93816";
855
927
  var customerToolNameSet = new Set(customerToolNames);
856
928
  var customerSourceTypeSet = new Set(customerSourceTypes);
857
929
  var customerSourceTypeAliasMap = /* @__PURE__ */ new Map([
@@ -975,7 +1047,7 @@ function createOutlitClient(options) {
975
1047
  const text = await response.text();
976
1048
  throw new Error(`API error (${response.status}): ${text}`);
977
1049
  }
978
- return response.json();
1050
+ return await response.json();
979
1051
  }
980
1052
  };
981
1053
  }
@@ -987,6 +1059,7 @@ var actionToolNames = [
987
1059
  var defaultAgentToolNames = [
988
1060
  "outlit_list_customers",
989
1061
  "outlit_list_users",
1062
+ "outlit_list_workspace_users",
990
1063
  "outlit_get_customer",
991
1064
  "outlit_get_timeline",
992
1065
  "outlit_list_facts",
@@ -1039,6 +1112,7 @@ var allCustomerToolNames = customerToolNames;
1039
1112
  timelineTimeframes,
1040
1113
  unsupportedCustomerFactTypes,
1041
1114
  userJourneyStages,
1042
- userListOrderFields
1115
+ userListOrderFields,
1116
+ workspaceUserListOrderFields
1043
1117
  });
1044
1118
  //# sourceMappingURL=index.cjs.map