profound-mcp 0.7.1 → 0.9.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/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/server.ts +1 -1
- package/src/tools/logs/raw/bots-logs-raw.ts +416 -75
- package/src/tools/logs/raw/logs-logs-raw.ts +436 -64
- package/src/tools/prompts/answers-prompts.ts +181 -57
- package/src/tools/reports/citations-reports.ts +344 -74
- package/src/tools/reports/sentiment-reports.ts +269 -64
- package/src/tools/reports/visibility-reports.ts +215 -62
- package/tools/logs/raw/bots-logs-raw.d.mts.map +1 -1
- package/tools/logs/raw/bots-logs-raw.d.ts.map +1 -1
- package/tools/logs/raw/bots-logs-raw.js +416 -71
- package/tools/logs/raw/bots-logs-raw.js.map +1 -1
- package/tools/logs/raw/bots-logs-raw.mjs +416 -71
- package/tools/logs/raw/bots-logs-raw.mjs.map +1 -1
- package/tools/logs/raw/logs-logs-raw.d.mts.map +1 -1
- package/tools/logs/raw/logs-logs-raw.d.ts.map +1 -1
- package/tools/logs/raw/logs-logs-raw.js +436 -60
- package/tools/logs/raw/logs-logs-raw.js.map +1 -1
- package/tools/logs/raw/logs-logs-raw.mjs +436 -60
- package/tools/logs/raw/logs-logs-raw.mjs.map +1 -1
- package/tools/prompts/answers-prompts.d.mts.map +1 -1
- package/tools/prompts/answers-prompts.d.ts.map +1 -1
- package/tools/prompts/answers-prompts.js +181 -54
- package/tools/prompts/answers-prompts.js.map +1 -1
- package/tools/prompts/answers-prompts.mjs +181 -54
- package/tools/prompts/answers-prompts.mjs.map +1 -1
- package/tools/reports/citations-reports.d.mts.map +1 -1
- package/tools/reports/citations-reports.d.ts.map +1 -1
- package/tools/reports/citations-reports.js +344 -70
- package/tools/reports/citations-reports.js.map +1 -1
- package/tools/reports/citations-reports.mjs +344 -70
- package/tools/reports/citations-reports.mjs.map +1 -1
- package/tools/reports/sentiment-reports.d.mts.map +1 -1
- package/tools/reports/sentiment-reports.d.ts.map +1 -1
- package/tools/reports/sentiment-reports.js +269 -61
- package/tools/reports/sentiment-reports.js.map +1 -1
- package/tools/reports/sentiment-reports.mjs +269 -61
- package/tools/reports/sentiment-reports.mjs.map +1 -1
- package/tools/reports/visibility-reports.d.mts.map +1 -1
- package/tools/reports/visibility-reports.d.ts.map +1 -1
- package/tools/reports/visibility-reports.js +215 -59
- package/tools/reports/visibility-reports.js.map +1 -1
- package/tools/reports/visibility-reports.mjs +215 -59
- 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: 'answers_prompts',
|
|
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 the answers for the prompts.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/prompt_answers_response',\n $defs: {\n prompt_answers_response: {\n type: 'object',\n title: 'AnswersResponse',\n description: 'Response for the answers endpoint.',\n properties: {\n data: {\n type: 'array',\n title: 'Data',\n items: {\n type: 'object',\n title: 'AnswersRawData',\n description: 'Raw data for the answers endpoint.',\n properties: {\n asset: {\n type: 'string',\n title: 'Asset'\n },\n citations: {\n type: 'array',\n title: 'Citations',\n items: {\n type: 'string'\n }\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n mentions: {\n type: 'array',\n title: 'Mentions',\n items: {\n type: 'string'\n }\n },\n model: {\n type: 'string',\n title: 'Model'\n },\n prompt: {\n type: 'string',\n title: 'Prompt'\n },\n prompt_id: {\n type: 'string',\n title: 'Prompt Id'\n },\n prompt_type: {\n type: 'string',\n title: 'Prompt Type'\n },\n region: {\n type: 'string',\n title: 'Region'\n },\n response: {\n type: 'string',\n title: 'Response'\n },\n run_id: {\n type: 'string',\n title: 'Run Id'\n },\n search_queries: {\n type: 'array',\n title: 'Search Queries',\n items: {\n type: 'string'\n }\n },\n tags: {\n type: 'array',\n title: 'Tags',\n items: {\n type: 'string'\n }\n },\n themes: {\n type: 'array',\n title: 'Themes',\n items: {\n type: 'string'\n }\n },\n topic: {\n type: 'string',\n title: 'Topic'\n }\n }\n }\n },\n info: {\n type: 'object',\n title: 'Info',\n additionalProperties: true\n }\n },\n required: [ 'data',\n 'info'\n ]\n }\n }\n}\n```",
|
|
19
|
+
description: 'Get the answers for the prompts.',
|
|
22
20
|
inputSchema: {
|
|
23
21
|
type: 'object',
|
|
24
22
|
properties: {
|
|
@@ -39,61 +37,193 @@ export const tool: Tool = {
|
|
|
39
37
|
filters: {
|
|
40
38
|
type: 'array',
|
|
41
39
|
title: 'Filters',
|
|
40
|
+
description: 'List of filters to apply to the answers report.',
|
|
42
41
|
items: {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
anyOf: [
|
|
43
|
+
{
|
|
44
|
+
type: 'object',
|
|
45
|
+
title: 'RegionIdFilter',
|
|
46
|
+
properties: {
|
|
47
|
+
field: {
|
|
48
|
+
type: 'string',
|
|
49
|
+
title: 'Field',
|
|
50
|
+
description: '- `region` - Deprecated',
|
|
51
|
+
enum: ['region_id', 'region'],
|
|
52
|
+
},
|
|
53
|
+
operator: {
|
|
54
|
+
type: 'string',
|
|
55
|
+
title: 'Operator',
|
|
56
|
+
enum: ['is', 'not_is', 'in', 'not_in'],
|
|
57
|
+
},
|
|
58
|
+
value: {
|
|
59
|
+
anyOf: [
|
|
60
|
+
{
|
|
61
|
+
type: 'string',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
type: 'array',
|
|
65
|
+
items: {
|
|
66
|
+
type: 'string',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
title: 'Value',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
required: ['field', 'operator', 'value'],
|
|
50
74
|
},
|
|
51
|
-
|
|
52
|
-
type: '
|
|
53
|
-
title: '
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
75
|
+
{
|
|
76
|
+
type: 'object',
|
|
77
|
+
title: 'ModelIdFilter',
|
|
78
|
+
properties: {
|
|
79
|
+
field: {
|
|
80
|
+
type: 'string',
|
|
81
|
+
title: 'Field',
|
|
82
|
+
description: '- `model` - Deprecated',
|
|
83
|
+
enum: ['model_id', 'model'],
|
|
84
|
+
},
|
|
85
|
+
operator: {
|
|
86
|
+
type: 'string',
|
|
87
|
+
title: 'Operator',
|
|
88
|
+
enum: ['is', 'not_is', 'in', 'not_in'],
|
|
89
|
+
},
|
|
90
|
+
value: {
|
|
91
|
+
anyOf: [
|
|
92
|
+
{
|
|
93
|
+
type: 'string',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
type: 'array',
|
|
97
|
+
items: {
|
|
98
|
+
type: 'string',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
title: 'Value',
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
required: ['field', 'operator', 'value'],
|
|
65
106
|
},
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
107
|
+
{
|
|
108
|
+
type: 'object',
|
|
109
|
+
title: 'TagIdFilter',
|
|
110
|
+
properties: {
|
|
111
|
+
field: {
|
|
69
112
|
type: 'string',
|
|
70
|
-
title: '
|
|
113
|
+
title: 'Field',
|
|
114
|
+
description: '- `tag` - Deprecated',
|
|
115
|
+
enum: ['tag_id', 'tag'],
|
|
71
116
|
},
|
|
72
|
-
{
|
|
73
|
-
type: '
|
|
74
|
-
title: '
|
|
75
|
-
|
|
76
|
-
type: 'string',
|
|
77
|
-
},
|
|
117
|
+
operator: {
|
|
118
|
+
type: 'string',
|
|
119
|
+
title: 'Operator',
|
|
120
|
+
enum: ['is', 'not_is', 'in', 'not_in'],
|
|
78
121
|
},
|
|
79
|
-
{
|
|
80
|
-
|
|
81
|
-
|
|
122
|
+
value: {
|
|
123
|
+
anyOf: [
|
|
124
|
+
{
|
|
125
|
+
type: 'string',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
type: 'array',
|
|
129
|
+
items: {
|
|
130
|
+
type: 'string',
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
title: 'Value',
|
|
82
135
|
},
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
136
|
+
},
|
|
137
|
+
required: ['field', 'operator', 'value'],
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
type: 'object',
|
|
141
|
+
title: 'PromptTypeFilter',
|
|
142
|
+
description: 'Filter by prompt type (visibility or sentiment)',
|
|
143
|
+
properties: {
|
|
144
|
+
field: {
|
|
145
|
+
type: 'string',
|
|
146
|
+
title: 'Field',
|
|
147
|
+
enum: ['prompt_type'],
|
|
89
148
|
},
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
149
|
+
operator: {
|
|
150
|
+
type: 'string',
|
|
151
|
+
title: 'Operator',
|
|
152
|
+
enum: [
|
|
153
|
+
'is',
|
|
154
|
+
'not_is',
|
|
155
|
+
'in',
|
|
156
|
+
'not_in',
|
|
157
|
+
'contains',
|
|
158
|
+
'not_contains',
|
|
159
|
+
'matches',
|
|
160
|
+
'contains_case_insensitive',
|
|
161
|
+
'not_contains_case_insensitive',
|
|
162
|
+
],
|
|
163
|
+
},
|
|
164
|
+
value: {
|
|
165
|
+
anyOf: [
|
|
166
|
+
{
|
|
167
|
+
type: 'string',
|
|
168
|
+
enum: ['visibility', 'sentiment'],
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
type: 'array',
|
|
172
|
+
items: {
|
|
173
|
+
type: 'string',
|
|
174
|
+
enum: ['visibility', 'sentiment'],
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
title: 'Value',
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
required: ['field', 'operator', 'value'],
|
|
94
182
|
},
|
|
95
|
-
|
|
96
|
-
|
|
183
|
+
{
|
|
184
|
+
type: 'object',
|
|
185
|
+
title: 'PromptFilter',
|
|
186
|
+
description: 'Filter by prompt text',
|
|
187
|
+
properties: {
|
|
188
|
+
field: {
|
|
189
|
+
type: 'string',
|
|
190
|
+
title: 'Field',
|
|
191
|
+
enum: ['prompt'],
|
|
192
|
+
},
|
|
193
|
+
operator: {
|
|
194
|
+
type: 'string',
|
|
195
|
+
title: 'Operator',
|
|
196
|
+
enum: [
|
|
197
|
+
'is',
|
|
198
|
+
'not_is',
|
|
199
|
+
'in',
|
|
200
|
+
'not_in',
|
|
201
|
+
'contains',
|
|
202
|
+
'not_contains',
|
|
203
|
+
'matches',
|
|
204
|
+
'contains_case_insensitive',
|
|
205
|
+
'not_contains_case_insensitive',
|
|
206
|
+
],
|
|
207
|
+
},
|
|
208
|
+
value: {
|
|
209
|
+
anyOf: [
|
|
210
|
+
{
|
|
211
|
+
type: 'string',
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
type: 'array',
|
|
215
|
+
items: {
|
|
216
|
+
type: 'string',
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
],
|
|
220
|
+
title: 'Value',
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
required: ['field', 'operator', 'value'],
|
|
224
|
+
},
|
|
225
|
+
],
|
|
226
|
+
description: 'Filter by prompt type (visibility or sentiment)',
|
|
97
227
|
},
|
|
98
228
|
},
|
|
99
229
|
include: {
|
|
@@ -165,12 +295,6 @@ export const tool: Tool = {
|
|
|
165
295
|
pagination: {
|
|
166
296
|
$ref: '#/$defs/pagination',
|
|
167
297
|
},
|
|
168
|
-
jq_filter: {
|
|
169
|
-
type: 'string',
|
|
170
|
-
title: 'jq Filter',
|
|
171
|
-
description:
|
|
172
|
-
'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/).',
|
|
173
|
-
},
|
|
174
298
|
},
|
|
175
299
|
required: ['category_id', 'end_date', 'start_date'],
|
|
176
300
|
$defs: {
|
|
@@ -197,8 +321,8 @@ export const tool: Tool = {
|
|
|
197
321
|
};
|
|
198
322
|
|
|
199
323
|
export const handler = async (client: Profound, args: Record<string, unknown> | undefined) => {
|
|
200
|
-
const
|
|
201
|
-
return asTextContentResult(await
|
|
324
|
+
const body = args as any;
|
|
325
|
+
return asTextContentResult(await client.prompts.answers(body));
|
|
202
326
|
};
|
|
203
327
|
|
|
204
328
|
export default { metadata, tool, handler };
|