@outlit/tools 0.2.1 → 0.3.1

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",
@@ -487,6 +572,18 @@ var customerToolContracts = {
487
572
  type: "string",
488
573
  minLength: 1,
489
574
  maxLength: 500
575
+ },
576
+ limit: {
577
+ description: "Slack replies per page (default 50, maximum 100). Ignored for other source types.",
578
+ type: "integer",
579
+ minimum: 1,
580
+ maximum: 100
581
+ },
582
+ cursor: {
583
+ description: "Opaque Slack reply cursor returned by a previous exact lookup.",
584
+ type: "string",
585
+ minLength: 1,
586
+ maxLength: 2e3
490
587
  }
491
588
  },
492
589
  required: ["sourceType", "sourceId"],
@@ -495,6 +592,7 @@ var customerToolContracts = {
495
592
  },
496
593
  outlit_list_sources: {
497
594
  toolName: "outlit_list_sources",
595
+ title: "List Sources",
498
596
  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
597
  inputSchema: {
500
598
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -558,7 +656,8 @@ var customerToolContracts = {
558
656
  },
559
657
  outlit_search_customer_context: {
560
658
  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.",
659
+ title: "Search Customer Context",
660
+ 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
661
  inputSchema: {
563
662
  $schema: "https://json-schema.org/draft/2020-12/schema",
564
663
  type: "object",
@@ -615,6 +714,7 @@ var customerToolContracts = {
615
714
  },
616
715
  outlit_query: {
617
716
  toolName: "outlit_query",
717
+ title: "Run SQL Query",
618
718
  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
719
  inputSchema: {
620
720
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -638,6 +738,7 @@ var customerToolContracts = {
638
738
  },
639
739
  outlit_schema: {
640
740
  toolName: "outlit_schema",
741
+ title: "Get SQL Schema",
641
742
  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
743
  inputSchema: {
643
744
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -654,6 +755,7 @@ var customerToolContracts = {
654
755
  },
655
756
  outlit_send_notification: {
656
757
  toolName: "outlit_send_notification",
758
+ title: "Send Notification",
657
759
  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
760
  inputSchema: {
659
761
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -698,34 +800,15 @@ var customerToolContracts = {
698
800
  minLength: 1,
699
801
  maxLength: 240
700
802
  },
701
- destinations: {
702
- description: "Optional explicit notification destinations. Omit to use the default notifier.",
803
+ destinationIds: {
804
+ description: "Optional NotificationDestination ids. Omit to use the default notifier.",
703
805
  minItems: 1,
704
806
  maxItems: 10,
705
807
  type: "array",
706
808
  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
809
+ type: "string",
810
+ format: "uuid",
811
+ 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
812
  }
730
813
  }
731
814
  },
@@ -831,15 +914,15 @@ var customerTimeframes = ["7d", "14d", "30d", "90d"];
831
914
  var notificationProviderValues = ["slack"];
832
915
  var notificationSeverityValues = ["low", "medium", "high"];
833
916
  var timelineChannels = [
834
- "SDK",
835
- "EMAIL",
836
- "SLACK",
837
- "CALL",
838
- "CALENDAR",
917
+ "PRODUCT",
918
+ "COMMUNICATION",
919
+ "MEETING",
839
920
  "CRM",
840
921
  "BILLING",
841
922
  "SUPPORT",
842
- "INTERNAL"
923
+ "IDENTITY",
924
+ "DOCUMENT",
925
+ "SYSTEM"
843
926
  ];
844
927
  var timelineTimeframes = ["7d", "14d", "30d", "90d", "all"];
845
928
  var userJourneyStages = [
@@ -850,8 +933,9 @@ var userJourneyStages = [
850
933
  "INACTIVE"
851
934
  ];
852
935
  var userListOrderFields = ["last_activity_at", "first_seen_at", "email"];
936
+ var workspaceUserListOrderFields = ["name", "email", "owned_customer_count"];
853
937
  var schemaTables = ["activity", "customers", "users", "revenue"];
854
- var customerToolContractHash = "5016d146842452855bfdd9ecc8f6be1a122125d0c392ceff315aeb2e44fefc7f";
938
+ var customerToolContractHash = "ce2f91d56dfb0d42b8730b03431f2a7be5399739c365360bae8102e3000f091d";
855
939
  var customerToolNameSet = new Set(customerToolNames);
856
940
  var customerSourceTypeSet = new Set(customerSourceTypes);
857
941
  var customerSourceTypeAliasMap = /* @__PURE__ */ new Map([
@@ -975,7 +1059,7 @@ function createOutlitClient(options) {
975
1059
  const text = await response.text();
976
1060
  throw new Error(`API error (${response.status}): ${text}`);
977
1061
  }
978
- return response.json();
1062
+ return await response.json();
979
1063
  }
980
1064
  };
981
1065
  }
@@ -987,6 +1071,7 @@ var actionToolNames = [
987
1071
  var defaultAgentToolNames = [
988
1072
  "outlit_list_customers",
989
1073
  "outlit_list_users",
1074
+ "outlit_list_workspace_users",
990
1075
  "outlit_get_customer",
991
1076
  "outlit_get_timeline",
992
1077
  "outlit_list_facts",
@@ -1039,6 +1124,7 @@ var allCustomerToolNames = customerToolNames;
1039
1124
  timelineTimeframes,
1040
1125
  unsupportedCustomerFactTypes,
1041
1126
  userJourneyStages,
1042
- userListOrderFields
1127
+ userListOrderFields,
1128
+ workspaceUserListOrderFields
1043
1129
  });
1044
1130
  //# sourceMappingURL=index.cjs.map