profound-mcp 0.7.1 → 0.8.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.
Files changed (46) hide show
  1. package/package.json +2 -2
  2. package/server.js +1 -1
  3. package/server.mjs +1 -1
  4. package/src/server.ts +1 -1
  5. package/src/tools/logs/raw/bots-logs-raw.ts +416 -75
  6. package/src/tools/logs/raw/logs-logs-raw.ts +436 -64
  7. package/src/tools/prompts/answers-prompts.ts +181 -57
  8. package/src/tools/reports/citations-reports.ts +344 -74
  9. package/src/tools/reports/sentiment-reports.ts +257 -62
  10. package/src/tools/reports/visibility-reports.ts +215 -62
  11. package/tools/logs/raw/bots-logs-raw.d.mts.map +1 -1
  12. package/tools/logs/raw/bots-logs-raw.d.ts.map +1 -1
  13. package/tools/logs/raw/bots-logs-raw.js +416 -71
  14. package/tools/logs/raw/bots-logs-raw.js.map +1 -1
  15. package/tools/logs/raw/bots-logs-raw.mjs +416 -71
  16. package/tools/logs/raw/bots-logs-raw.mjs.map +1 -1
  17. package/tools/logs/raw/logs-logs-raw.d.mts.map +1 -1
  18. package/tools/logs/raw/logs-logs-raw.d.ts.map +1 -1
  19. package/tools/logs/raw/logs-logs-raw.js +436 -60
  20. package/tools/logs/raw/logs-logs-raw.js.map +1 -1
  21. package/tools/logs/raw/logs-logs-raw.mjs +436 -60
  22. package/tools/logs/raw/logs-logs-raw.mjs.map +1 -1
  23. package/tools/prompts/answers-prompts.d.mts.map +1 -1
  24. package/tools/prompts/answers-prompts.d.ts.map +1 -1
  25. package/tools/prompts/answers-prompts.js +181 -54
  26. package/tools/prompts/answers-prompts.js.map +1 -1
  27. package/tools/prompts/answers-prompts.mjs +181 -54
  28. package/tools/prompts/answers-prompts.mjs.map +1 -1
  29. package/tools/reports/citations-reports.d.mts.map +1 -1
  30. package/tools/reports/citations-reports.d.ts.map +1 -1
  31. package/tools/reports/citations-reports.js +344 -70
  32. package/tools/reports/citations-reports.js.map +1 -1
  33. package/tools/reports/citations-reports.mjs +344 -70
  34. package/tools/reports/citations-reports.mjs.map +1 -1
  35. package/tools/reports/sentiment-reports.d.mts.map +1 -1
  36. package/tools/reports/sentiment-reports.d.ts.map +1 -1
  37. package/tools/reports/sentiment-reports.js +257 -59
  38. package/tools/reports/sentiment-reports.js.map +1 -1
  39. package/tools/reports/sentiment-reports.mjs +257 -59
  40. package/tools/reports/sentiment-reports.mjs.map +1 -1
  41. package/tools/reports/visibility-reports.d.mts.map +1 -1
  42. package/tools/reports/visibility-reports.d.ts.map +1 -1
  43. package/tools/reports/visibility-reports.js +215 -59
  44. package/tools/reports/visibility-reports.js.map +1 -1
  45. package/tools/reports/visibility-reports.mjs +215 -59
  46. package/tools/reports/visibility-reports.mjs.map +1 -1
@@ -1,6 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { maybeFilter } from 'profound-mcp/filtering';
4
3
  import { Metadata, asTextContentResult } from 'profound-mcp/tools/types';
5
4
 
6
5
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
@@ -17,8 +16,7 @@ export const metadata: Metadata = {
17
16
 
18
17
  export const tool: Tool = {
19
18
  name: 'logs_logs_raw',
20
- description:
21
- "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nGet all logs with filters\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/raw_logs_response',\n $defs: {\n raw_logs_response: {\n anyOf: [ {\n type: 'array',\n title: 'LogVisitList',\n items: {\n type: 'object',\n title: 'LogVisit',\n description: 'DB Model for a log visit.',\n properties: {\n host: {\n type: 'string',\n title: 'Host'\n },\n ip: {\n type: 'string',\n title: 'Ip'\n },\n method: {\n type: 'string',\n title: 'Method'\n },\n org_id: {\n type: 'string',\n title: 'Org Id'\n },\n path: {\n type: 'string',\n title: 'Path'\n },\n status_code: {\n type: 'integer',\n title: 'Status Code'\n },\n timestamp: {\n type: 'string',\n title: 'Timestamp',\n format: 'date-time'\n },\n user_agent: {\n type: 'string',\n title: 'User Agent'\n },\n bytes_sent: {\n type: 'integer',\n title: 'Bytes Sent'\n },\n duration_ms: {\n type: 'integer',\n title: 'Duration Ms'\n },\n query_params: {\n type: 'object',\n title: 'Query Params',\n additionalProperties: true\n },\n referer: {\n type: 'string',\n title: 'Referer'\n }\n },\n required: [ 'host',\n 'ip',\n 'method',\n 'org_id',\n 'path',\n 'status_code',\n 'timestamp',\n 'user_agent'\n ]\n }\n },\n {\n $ref: '#/$defs/report_response'\n }\n ],\n title: 'Response Get Logs V1 Logs Raw Post',\n description: 'Base response model for reports.'\n },\n report_response: {\n type: 'object',\n title: 'Response',\n description: 'Base response model for reports.',\n properties: {\n data: {\n type: 'array',\n title: 'Data',\n items: {\n $ref: '#/$defs/report_result'\n }\n },\n info: {\n $ref: '#/$defs/report_info'\n }\n },\n required: [ 'data',\n 'info'\n ]\n },\n report_result: {\n type: 'object',\n title: 'Result',\n description: 'Base model for report results.',\n properties: {\n dimensions: {\n type: 'array',\n title: 'Dimensions',\n items: {\n type: 'string'\n }\n },\n metrics: {\n type: 'array',\n title: 'Metrics',\n items: {\n type: 'number'\n }\n }\n },\n required: [ 'dimensions',\n 'metrics'\n ]\n },\n report_info: {\n type: 'object',\n title: 'Info',\n description: 'Base model for report information.',\n properties: {\n total_rows: {\n type: 'integer',\n title: 'Total Rows'\n },\n query: {\n type: 'object',\n title: 'Query',\n additionalProperties: true\n }\n },\n required: [ 'total_rows'\n ]\n }\n }\n}\n```",
19
+ description: 'Get all logs with filters',
22
20
  inputSchema: {
23
21
  type: 'object',
24
22
  properties: {
@@ -78,63 +76,443 @@ export const tool: Tool = {
78
76
  filters: {
79
77
  type: 'array',
80
78
  title: 'Filters',
81
- description: 'List of filters to apply to the report. Each filter has an operator, field, and value.',
79
+ description: 'Filters to apply to the logs query.',
82
80
  items: {
83
- type: 'object',
84
- title:
85
- "Filter[Literal['method', 'path', 'status_code', 'ip', 'user_agent', 'referer', 'query_params']]",
86
- properties: {
87
- field: {
88
- type: 'string',
89
- title: 'Field',
90
- enum: ['method', 'path', 'status_code', 'ip', 'user_agent', 'referer', 'query_params'],
81
+ anyOf: [
82
+ {
83
+ type: 'object',
84
+ title: 'MethodFilter',
85
+ description: 'Filter by HTTP method',
86
+ properties: {
87
+ field: {
88
+ type: 'string',
89
+ title: 'Field',
90
+ enum: ['method'],
91
+ },
92
+ operator: {
93
+ type: 'string',
94
+ title: 'Operator',
95
+ enum: [
96
+ 'is',
97
+ 'not_is',
98
+ 'in',
99
+ 'not_in',
100
+ 'contains',
101
+ 'not_contains',
102
+ 'matches',
103
+ 'contains_case_insensitive',
104
+ 'not_contains_case_insensitive',
105
+ ],
106
+ },
107
+ value: {
108
+ anyOf: [
109
+ {
110
+ type: 'string',
111
+ },
112
+ {
113
+ type: 'array',
114
+ items: {
115
+ type: 'string',
116
+ },
117
+ },
118
+ ],
119
+ title: 'Value',
120
+ },
121
+ },
122
+ required: ['field', 'operator', 'value'],
91
123
  },
92
- operator: {
93
- type: 'string',
94
- title: 'Operator',
95
- enum: [
96
- 'is',
97
- 'not_is',
98
- 'in',
99
- 'not_in',
100
- 'contains',
101
- 'not_contains',
102
- 'contains_case_insensitive',
103
- 'not_contains_case_insensitive',
104
- 'matches',
105
- ],
124
+ {
125
+ type: 'object',
126
+ title: 'HostFilter',
127
+ description: 'Filter by host',
128
+ properties: {
129
+ field: {
130
+ type: 'string',
131
+ title: 'Field',
132
+ enum: ['host'],
133
+ },
134
+ operator: {
135
+ type: 'string',
136
+ title: 'Operator',
137
+ enum: [
138
+ 'is',
139
+ 'not_is',
140
+ 'in',
141
+ 'not_in',
142
+ 'contains',
143
+ 'not_contains',
144
+ 'matches',
145
+ 'contains_case_insensitive',
146
+ 'not_contains_case_insensitive',
147
+ ],
148
+ },
149
+ value: {
150
+ anyOf: [
151
+ {
152
+ type: 'string',
153
+ },
154
+ {
155
+ type: 'array',
156
+ items: {
157
+ type: 'string',
158
+ },
159
+ },
160
+ ],
161
+ title: 'Value',
162
+ },
163
+ },
164
+ required: ['field', 'operator', 'value'],
106
165
  },
107
- value: {
108
- anyOf: [
109
- {
110
- type: 'string',
111
- title: 'FilterStringValue',
112
- },
113
- {
114
- type: 'array',
115
- title: 'FilterStringListValue',
116
- items: {
117
- type: 'string',
118
- },
119
- },
120
- {
121
- type: 'integer',
122
- title: 'FilterIntegerValue',
123
- },
124
- {
125
- type: 'array',
126
- title: 'FilterIntegerListValue',
127
- items: {
128
- type: 'integer',
129
- },
130
- },
131
- ],
132
- title: 'Value',
133
- description:
134
- 'Value for the filter. Can be a single value or a list of depending on the operator.',
166
+ {
167
+ type: 'object',
168
+ title: 'PathFilter',
169
+ description: 'Filter by request path',
170
+ properties: {
171
+ field: {
172
+ type: 'string',
173
+ title: 'Field',
174
+ enum: ['path'],
175
+ },
176
+ operator: {
177
+ type: 'string',
178
+ title: 'Operator',
179
+ enum: [
180
+ 'is',
181
+ 'not_is',
182
+ 'in',
183
+ 'not_in',
184
+ 'contains',
185
+ 'not_contains',
186
+ 'matches',
187
+ 'contains_case_insensitive',
188
+ 'not_contains_case_insensitive',
189
+ ],
190
+ },
191
+ value: {
192
+ anyOf: [
193
+ {
194
+ type: 'string',
195
+ },
196
+ {
197
+ type: 'array',
198
+ items: {
199
+ type: 'string',
200
+ },
201
+ },
202
+ ],
203
+ title: 'Value',
204
+ },
205
+ },
206
+ required: ['field', 'operator', 'value'],
135
207
  },
136
- },
137
- required: ['field', 'operator', 'value'],
208
+ {
209
+ type: 'object',
210
+ title: 'StatusCodeFilter',
211
+ description: 'Filter by HTTP status code',
212
+ properties: {
213
+ field: {
214
+ type: 'string',
215
+ title: 'Field',
216
+ enum: ['status_code'],
217
+ },
218
+ operator: {
219
+ type: 'string',
220
+ title: 'Operator',
221
+ enum: ['is', 'not_is', 'in', 'not_in'],
222
+ },
223
+ value: {
224
+ anyOf: [
225
+ {
226
+ type: 'integer',
227
+ },
228
+ {
229
+ type: 'array',
230
+ items: {
231
+ type: 'integer',
232
+ },
233
+ },
234
+ ],
235
+ title: 'Value',
236
+ },
237
+ },
238
+ required: ['field', 'operator', 'value'],
239
+ },
240
+ {
241
+ type: 'object',
242
+ title: 'IpFilter',
243
+ description: 'Filter by IP address',
244
+ properties: {
245
+ field: {
246
+ type: 'string',
247
+ title: 'Field',
248
+ enum: ['ip'],
249
+ },
250
+ operator: {
251
+ type: 'string',
252
+ title: 'Operator',
253
+ enum: [
254
+ 'is',
255
+ 'not_is',
256
+ 'in',
257
+ 'not_in',
258
+ 'contains',
259
+ 'not_contains',
260
+ 'matches',
261
+ 'contains_case_insensitive',
262
+ 'not_contains_case_insensitive',
263
+ ],
264
+ },
265
+ value: {
266
+ anyOf: [
267
+ {
268
+ type: 'string',
269
+ },
270
+ {
271
+ type: 'array',
272
+ items: {
273
+ type: 'string',
274
+ },
275
+ },
276
+ ],
277
+ title: 'Value',
278
+ },
279
+ },
280
+ required: ['field', 'operator', 'value'],
281
+ },
282
+ {
283
+ type: 'object',
284
+ title: 'UserAgentFilter',
285
+ description: 'Filter by user agent',
286
+ properties: {
287
+ field: {
288
+ type: 'string',
289
+ title: 'Field',
290
+ enum: ['user_agent'],
291
+ },
292
+ operator: {
293
+ type: 'string',
294
+ title: 'Operator',
295
+ enum: [
296
+ 'is',
297
+ 'not_is',
298
+ 'in',
299
+ 'not_in',
300
+ 'contains',
301
+ 'not_contains',
302
+ 'matches',
303
+ 'contains_case_insensitive',
304
+ 'not_contains_case_insensitive',
305
+ ],
306
+ },
307
+ value: {
308
+ anyOf: [
309
+ {
310
+ type: 'string',
311
+ },
312
+ {
313
+ type: 'array',
314
+ items: {
315
+ type: 'string',
316
+ },
317
+ },
318
+ ],
319
+ title: 'Value',
320
+ },
321
+ },
322
+ required: ['field', 'operator', 'value'],
323
+ },
324
+ {
325
+ type: 'object',
326
+ title: 'RefererFilter',
327
+ description: 'Filter by referer',
328
+ properties: {
329
+ field: {
330
+ type: 'string',
331
+ title: 'Field',
332
+ enum: ['referer'],
333
+ },
334
+ operator: {
335
+ type: 'string',
336
+ title: 'Operator',
337
+ enum: [
338
+ 'is',
339
+ 'not_is',
340
+ 'in',
341
+ 'not_in',
342
+ 'contains',
343
+ 'not_contains',
344
+ 'matches',
345
+ 'contains_case_insensitive',
346
+ 'not_contains_case_insensitive',
347
+ ],
348
+ },
349
+ value: {
350
+ anyOf: [
351
+ {
352
+ type: 'string',
353
+ },
354
+ {
355
+ type: 'array',
356
+ items: {
357
+ type: 'string',
358
+ },
359
+ },
360
+ ],
361
+ title: 'Value',
362
+ },
363
+ },
364
+ required: ['field', 'operator', 'value'],
365
+ },
366
+ {
367
+ type: 'object',
368
+ title: 'ProviderFilter',
369
+ description: 'Filter by provider',
370
+ properties: {
371
+ field: {
372
+ type: 'string',
373
+ title: 'Field',
374
+ enum: ['provider'],
375
+ },
376
+ operator: {
377
+ type: 'string',
378
+ title: 'Operator',
379
+ enum: [
380
+ 'is',
381
+ 'not_is',
382
+ 'in',
383
+ 'not_in',
384
+ 'contains',
385
+ 'not_contains',
386
+ 'matches',
387
+ 'contains_case_insensitive',
388
+ 'not_contains_case_insensitive',
389
+ ],
390
+ },
391
+ value: {
392
+ anyOf: [
393
+ {
394
+ type: 'string',
395
+ },
396
+ {
397
+ type: 'array',
398
+ items: {
399
+ type: 'string',
400
+ },
401
+ },
402
+ ],
403
+ title: 'Value',
404
+ },
405
+ },
406
+ required: ['field', 'operator', 'value'],
407
+ },
408
+ {
409
+ type: 'object',
410
+ title: 'QueryParamsFilter',
411
+ description: 'Filter by query parameters',
412
+ properties: {
413
+ field: {
414
+ type: 'string',
415
+ title: 'Field',
416
+ enum: ['query_params'],
417
+ },
418
+ operator: {
419
+ type: 'string',
420
+ title: 'Operator',
421
+ enum: [
422
+ 'is',
423
+ 'not_is',
424
+ 'in',
425
+ 'not_in',
426
+ 'contains',
427
+ 'not_contains',
428
+ 'matches',
429
+ 'contains_case_insensitive',
430
+ 'not_contains_case_insensitive',
431
+ ],
432
+ },
433
+ value: {
434
+ anyOf: [
435
+ {
436
+ type: 'string',
437
+ },
438
+ {
439
+ type: 'array',
440
+ items: {
441
+ type: 'string',
442
+ },
443
+ },
444
+ ],
445
+ title: 'Value',
446
+ },
447
+ },
448
+ required: ['field', 'operator', 'value'],
449
+ },
450
+ {
451
+ type: 'object',
452
+ title: 'BytesSentFilter',
453
+ description: 'Filter by bytes sent',
454
+ properties: {
455
+ field: {
456
+ type: 'string',
457
+ title: 'Field',
458
+ enum: ['bytes_sent'],
459
+ },
460
+ operator: {
461
+ type: 'string',
462
+ title: 'Operator',
463
+ enum: ['is', 'not_is', 'in', 'not_in'],
464
+ },
465
+ value: {
466
+ anyOf: [
467
+ {
468
+ type: 'integer',
469
+ },
470
+ {
471
+ type: 'array',
472
+ items: {
473
+ type: 'integer',
474
+ },
475
+ },
476
+ ],
477
+ title: 'Value',
478
+ },
479
+ },
480
+ required: ['field', 'operator', 'value'],
481
+ },
482
+ {
483
+ type: 'object',
484
+ title: 'DurationMsFilter',
485
+ description: 'Filter by duration in milliseconds',
486
+ properties: {
487
+ field: {
488
+ type: 'string',
489
+ title: 'Field',
490
+ enum: ['duration_ms'],
491
+ },
492
+ operator: {
493
+ type: 'string',
494
+ title: 'Operator',
495
+ enum: ['is', 'not_is', 'in', 'not_in'],
496
+ },
497
+ value: {
498
+ anyOf: [
499
+ {
500
+ type: 'integer',
501
+ },
502
+ {
503
+ type: 'array',
504
+ items: {
505
+ type: 'integer',
506
+ },
507
+ },
508
+ ],
509
+ title: 'Value',
510
+ },
511
+ },
512
+ required: ['field', 'operator', 'value'],
513
+ },
514
+ ],
515
+ description: 'Filter by HTTP method',
138
516
  },
139
517
  },
140
518
  order_by: {
@@ -147,12 +525,6 @@ export const tool: Tool = {
147
525
  pagination: {
148
526
  $ref: '#/$defs/pagination',
149
527
  },
150
- jq_filter: {
151
- type: 'string',
152
- title: 'jq Filter',
153
- description:
154
- 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
155
- },
156
528
  },
157
529
  required: ['domain', 'metrics', 'start_date'],
158
530
  $defs: {
@@ -179,8 +551,8 @@ export const tool: Tool = {
179
551
  };
180
552
 
181
553
  export const handler = async (client: Profound, args: Record<string, unknown> | undefined) => {
182
- const { jq_filter, ...body } = args as any;
183
- return asTextContentResult(await maybeFilter(jq_filter, await client.logs.raw.logs(body)));
554
+ const body = args as any;
555
+ return asTextContentResult(await client.logs.raw.logs(body));
184
556
  };
185
557
 
186
558
  export default { metadata, tool, handler };