profound-mcp 0.7.0 → 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: 'citations_reports',
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 citations for a given category.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/report_citations_response',\n $defs: {\n report_citations_response: {\n type: 'object',\n title: 'CitationsResponse',\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 citations for a given category.',
22
20
  inputSchema: {
23
21
  type: 'object',
24
22
  properties: {
@@ -77,73 +75,351 @@ export const tool: Tool = {
77
75
  filters: {
78
76
  type: 'array',
79
77
  title: 'Filters',
80
- description: 'List of filters to apply to the report. Each filter has an operator, field, and value.',
78
+ description: 'List of filters to apply to the citations report.',
81
79
  items: {
82
- type: 'object',
83
- title:
84
- "Filter[Literal['hostname', 'path', 'region', 'topic', 'model', 'tag', 'url', 'root_domain', 'prompt_type']]",
85
- properties: {
86
- field: {
87
- type: 'string',
88
- title: 'Field',
89
- enum: [
90
- 'hostname',
91
- 'path',
92
- 'region',
93
- 'topic',
94
- 'model',
95
- 'tag',
96
- 'url',
97
- 'root_domain',
98
- 'prompt_type',
99
- ],
80
+ anyOf: [
81
+ {
82
+ type: 'object',
83
+ title: 'HostnameFilter',
84
+ description: 'Filter by hostname',
85
+ properties: {
86
+ field: {
87
+ type: 'string',
88
+ title: 'Field',
89
+ enum: ['hostname'],
90
+ },
91
+ operator: {
92
+ type: 'string',
93
+ title: 'Operator',
94
+ enum: [
95
+ 'is',
96
+ 'not_is',
97
+ 'in',
98
+ 'not_in',
99
+ 'contains',
100
+ 'not_contains',
101
+ 'matches',
102
+ 'contains_case_insensitive',
103
+ 'not_contains_case_insensitive',
104
+ ],
105
+ },
106
+ value: {
107
+ anyOf: [
108
+ {
109
+ type: 'string',
110
+ },
111
+ {
112
+ type: 'array',
113
+ items: {
114
+ type: 'string',
115
+ },
116
+ },
117
+ ],
118
+ title: 'Value',
119
+ },
120
+ },
121
+ required: ['field', 'operator', 'value'],
122
+ },
123
+ {
124
+ type: 'object',
125
+ title: 'PathFilter',
126
+ description: 'Filter by URL path',
127
+ properties: {
128
+ field: {
129
+ type: 'string',
130
+ title: 'Field',
131
+ enum: ['path'],
132
+ },
133
+ operator: {
134
+ type: 'string',
135
+ title: 'Operator',
136
+ enum: [
137
+ 'is',
138
+ 'not_is',
139
+ 'in',
140
+ 'not_in',
141
+ 'contains',
142
+ 'not_contains',
143
+ 'matches',
144
+ 'contains_case_insensitive',
145
+ 'not_contains_case_insensitive',
146
+ ],
147
+ },
148
+ value: {
149
+ anyOf: [
150
+ {
151
+ type: 'string',
152
+ },
153
+ {
154
+ type: 'array',
155
+ items: {
156
+ type: 'string',
157
+ },
158
+ },
159
+ ],
160
+ title: 'Value',
161
+ },
162
+ },
163
+ required: ['field', 'operator', 'value'],
164
+ },
165
+ {
166
+ type: 'object',
167
+ title: 'RegionIdFilter',
168
+ properties: {
169
+ field: {
170
+ type: 'string',
171
+ title: 'Field',
172
+ description: '- `region` - Deprecated',
173
+ enum: ['region_id', 'region'],
174
+ },
175
+ operator: {
176
+ type: 'string',
177
+ title: 'Operator',
178
+ enum: ['is', 'not_is', 'in', 'not_in'],
179
+ },
180
+ value: {
181
+ anyOf: [
182
+ {
183
+ type: 'string',
184
+ },
185
+ {
186
+ type: 'array',
187
+ items: {
188
+ type: 'string',
189
+ },
190
+ },
191
+ ],
192
+ title: 'Value',
193
+ },
194
+ },
195
+ required: ['field', 'operator', 'value'],
100
196
  },
101
- operator: {
102
- type: 'string',
103
- title: 'Operator',
104
- enum: [
105
- 'is',
106
- 'not_is',
107
- 'in',
108
- 'not_in',
109
- 'contains',
110
- 'not_contains',
111
- 'contains_case_insensitive',
112
- 'not_contains_case_insensitive',
113
- 'matches',
114
- ],
197
+ {
198
+ type: 'object',
199
+ title: 'TopicIdFilter',
200
+ properties: {
201
+ field: {
202
+ type: 'string',
203
+ title: 'Field',
204
+ description: '- `topic` - Deprecated',
205
+ enum: ['topic_id', 'topic'],
206
+ },
207
+ operator: {
208
+ type: 'string',
209
+ title: 'Operator',
210
+ enum: ['is', 'not_is', 'in', 'not_in'],
211
+ },
212
+ value: {
213
+ anyOf: [
214
+ {
215
+ type: 'string',
216
+ },
217
+ {
218
+ type: 'array',
219
+ items: {
220
+ type: 'string',
221
+ },
222
+ },
223
+ ],
224
+ title: 'Value',
225
+ },
226
+ },
227
+ required: ['field', 'operator', 'value'],
115
228
  },
116
- value: {
117
- anyOf: [
118
- {
119
- type: 'string',
120
- title: 'FilterStringValue',
121
- },
122
- {
123
- type: 'array',
124
- title: 'FilterStringListValue',
125
- items: {
126
- type: 'string',
127
- },
128
- },
129
- {
130
- type: 'integer',
131
- title: 'FilterIntegerValue',
132
- },
133
- {
134
- type: 'array',
135
- title: 'FilterIntegerListValue',
136
- items: {
137
- type: 'integer',
138
- },
139
- },
140
- ],
141
- title: 'Value',
142
- description:
143
- 'Value for the filter. Can be a single value or a list of depending on the operator.',
229
+ {
230
+ type: 'object',
231
+ title: 'ModelIdFilter',
232
+ properties: {
233
+ field: {
234
+ type: 'string',
235
+ title: 'Field',
236
+ description: '- `model` - Deprecated',
237
+ enum: ['model_id', 'model'],
238
+ },
239
+ operator: {
240
+ type: 'string',
241
+ title: 'Operator',
242
+ enum: ['is', 'not_is', 'in', 'not_in'],
243
+ },
244
+ value: {
245
+ anyOf: [
246
+ {
247
+ type: 'string',
248
+ },
249
+ {
250
+ type: 'array',
251
+ items: {
252
+ type: 'string',
253
+ },
254
+ },
255
+ ],
256
+ title: 'Value',
257
+ },
258
+ },
259
+ required: ['field', 'operator', 'value'],
144
260
  },
145
- },
146
- required: ['field', 'operator', 'value'],
261
+ {
262
+ type: 'object',
263
+ title: 'TagIdFilter',
264
+ properties: {
265
+ field: {
266
+ type: 'string',
267
+ title: 'Field',
268
+ description: '- `tag` - Deprecated',
269
+ enum: ['tag_id', 'tag'],
270
+ },
271
+ operator: {
272
+ type: 'string',
273
+ title: 'Operator',
274
+ enum: ['is', 'not_is', 'in', 'not_in'],
275
+ },
276
+ value: {
277
+ anyOf: [
278
+ {
279
+ type: 'string',
280
+ },
281
+ {
282
+ type: 'array',
283
+ items: {
284
+ type: 'string',
285
+ },
286
+ },
287
+ ],
288
+ title: 'Value',
289
+ },
290
+ },
291
+ required: ['field', 'operator', 'value'],
292
+ },
293
+ {
294
+ type: 'object',
295
+ title: 'UrlFilter',
296
+ description: 'Filter by URL',
297
+ properties: {
298
+ field: {
299
+ type: 'string',
300
+ title: 'Field',
301
+ enum: ['url'],
302
+ },
303
+ operator: {
304
+ type: 'string',
305
+ title: 'Operator',
306
+ enum: [
307
+ 'is',
308
+ 'not_is',
309
+ 'in',
310
+ 'not_in',
311
+ 'contains',
312
+ 'not_contains',
313
+ 'matches',
314
+ 'contains_case_insensitive',
315
+ 'not_contains_case_insensitive',
316
+ ],
317
+ },
318
+ value: {
319
+ anyOf: [
320
+ {
321
+ type: 'string',
322
+ },
323
+ {
324
+ type: 'array',
325
+ items: {
326
+ type: 'string',
327
+ },
328
+ },
329
+ ],
330
+ title: 'Value',
331
+ },
332
+ },
333
+ required: ['field', 'operator', 'value'],
334
+ },
335
+ {
336
+ type: 'object',
337
+ title: 'RootDomainFilter',
338
+ description: 'Filter by root domain',
339
+ properties: {
340
+ field: {
341
+ type: 'string',
342
+ title: 'Field',
343
+ enum: ['root_domain'],
344
+ },
345
+ operator: {
346
+ type: 'string',
347
+ title: 'Operator',
348
+ enum: [
349
+ 'is',
350
+ 'not_is',
351
+ 'in',
352
+ 'not_in',
353
+ 'contains',
354
+ 'not_contains',
355
+ 'matches',
356
+ 'contains_case_insensitive',
357
+ 'not_contains_case_insensitive',
358
+ ],
359
+ },
360
+ value: {
361
+ anyOf: [
362
+ {
363
+ type: 'string',
364
+ },
365
+ {
366
+ type: 'array',
367
+ items: {
368
+ type: 'string',
369
+ },
370
+ },
371
+ ],
372
+ title: 'Value',
373
+ },
374
+ },
375
+ required: ['field', 'operator', 'value'],
376
+ },
377
+ {
378
+ type: 'object',
379
+ title: 'PromptTypeFilter',
380
+ description: 'Filter by prompt type (visibility or sentiment)',
381
+ properties: {
382
+ field: {
383
+ type: 'string',
384
+ title: 'Field',
385
+ enum: ['prompt_type'],
386
+ },
387
+ operator: {
388
+ type: 'string',
389
+ title: 'Operator',
390
+ enum: [
391
+ 'is',
392
+ 'not_is',
393
+ 'in',
394
+ 'not_in',
395
+ 'contains',
396
+ 'not_contains',
397
+ 'matches',
398
+ 'contains_case_insensitive',
399
+ 'not_contains_case_insensitive',
400
+ ],
401
+ },
402
+ value: {
403
+ anyOf: [
404
+ {
405
+ type: 'string',
406
+ enum: ['visibility', 'sentiment'],
407
+ },
408
+ {
409
+ type: 'array',
410
+ items: {
411
+ type: 'string',
412
+ enum: ['visibility', 'sentiment'],
413
+ },
414
+ },
415
+ ],
416
+ title: 'Value',
417
+ },
418
+ },
419
+ required: ['field', 'operator', 'value'],
420
+ },
421
+ ],
422
+ description: 'Filter by hostname',
147
423
  },
148
424
  },
149
425
  order_by: {
@@ -156,12 +432,6 @@ export const tool: Tool = {
156
432
  pagination: {
157
433
  $ref: '#/$defs/pagination',
158
434
  },
159
- jq_filter: {
160
- type: 'string',
161
- title: 'jq Filter',
162
- description:
163
- '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/).',
164
- },
165
435
  },
166
436
  required: ['category_id', 'end_date', 'metrics', 'start_date'],
167
437
  $defs: {
@@ -188,8 +458,8 @@ export const tool: Tool = {
188
458
  };
189
459
 
190
460
  export const handler = async (client: Profound, args: Record<string, unknown> | undefined) => {
191
- const { jq_filter, ...body } = args as any;
192
- return asTextContentResult(await maybeFilter(jq_filter, await client.reports.citations(body)));
461
+ const body = args as any;
462
+ return asTextContentResult(await client.reports.citations(body));
193
463
  };
194
464
 
195
465
  export default { metadata, tool, handler };