profound-mcp 0.2.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/LICENSE +201 -0
- package/README.md +231 -0
- package/code-tool-paths.cjs +6 -0
- package/code-tool-paths.cjs.map +1 -0
- package/code-tool-paths.d.cts +2 -0
- package/code-tool-paths.d.cts.map +1 -0
- package/code-tool-types.d.mts +14 -0
- package/code-tool-types.d.mts.map +1 -0
- package/code-tool-types.d.ts +14 -0
- package/code-tool-types.d.ts.map +1 -0
- package/code-tool-types.js +4 -0
- package/code-tool-types.js.map +1 -0
- package/code-tool-types.mjs +3 -0
- package/code-tool-types.mjs.map +1 -0
- package/code-tool-worker.d.mts +5 -0
- package/code-tool-worker.d.mts.map +1 -0
- package/code-tool-worker.d.ts +5 -0
- package/code-tool-worker.d.ts.map +1 -0
- package/code-tool-worker.js +45 -0
- package/code-tool-worker.js.map +1 -0
- package/code-tool-worker.mjs +40 -0
- package/code-tool-worker.mjs.map +1 -0
- package/code-tool.d.mts +12 -0
- package/code-tool.d.mts.map +1 -0
- package/code-tool.d.ts +12 -0
- package/code-tool.d.ts.map +1 -0
- package/code-tool.js +157 -0
- package/code-tool.js.map +1 -0
- package/code-tool.mjs +121 -0
- package/code-tool.mjs.map +1 -0
- package/compat.d.mts +58 -0
- package/compat.d.mts.map +1 -0
- package/compat.d.ts +58 -0
- package/compat.d.ts.map +1 -0
- package/compat.js +387 -0
- package/compat.js.map +1 -0
- package/compat.mjs +378 -0
- package/compat.mjs.map +1 -0
- package/docs-search-tool.d.mts +44 -0
- package/docs-search-tool.d.mts.map +1 -0
- package/docs-search-tool.d.ts +44 -0
- package/docs-search-tool.d.ts.map +1 -0
- package/docs-search-tool.js +43 -0
- package/docs-search-tool.js.map +1 -0
- package/docs-search-tool.mjs +39 -0
- package/docs-search-tool.mjs.map +1 -0
- package/dynamic-tools.d.mts +12 -0
- package/dynamic-tools.d.mts.map +1 -0
- package/dynamic-tools.d.ts +12 -0
- package/dynamic-tools.d.ts.map +1 -0
- package/dynamic-tools.js +135 -0
- package/dynamic-tools.js.map +1 -0
- package/dynamic-tools.mjs +132 -0
- package/dynamic-tools.mjs.map +1 -0
- package/filtering.d.mts +2 -0
- package/filtering.d.mts.map +1 -0
- package/filtering.d.ts +2 -0
- package/filtering.d.ts.map +1 -0
- package/filtering.js +20 -0
- package/filtering.js.map +1 -0
- package/filtering.mjs +13 -0
- package/filtering.mjs.map +1 -0
- package/headers.d.mts +4 -0
- package/headers.d.mts.map +1 -0
- package/headers.d.ts +4 -0
- package/headers.d.ts.map +1 -0
- package/headers.js +10 -0
- package/headers.js.map +1 -0
- package/headers.mjs +6 -0
- package/headers.mjs.map +1 -0
- package/http.d.mts +9 -0
- package/http.d.mts.map +1 -0
- package/http.d.ts +9 -0
- package/http.d.ts.map +1 -0
- package/http.js +108 -0
- package/http.js.map +1 -0
- package/http.mjs +100 -0
- package/http.mjs.map +1 -0
- package/index.d.mts +3 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +3 -0
- package/index.d.ts.map +1 -0
- package/index.js +91 -0
- package/index.js.map +1 -0
- package/index.mjs +89 -0
- package/index.mjs.map +1 -0
- package/options.d.mts +20 -0
- package/options.d.mts.map +1 -0
- package/options.d.ts +20 -0
- package/options.d.ts.map +1 -0
- package/options.js +424 -0
- package/options.js.map +1 -0
- package/options.mjs +417 -0
- package/options.mjs.map +1 -0
- package/package.json +216 -0
- package/server.d.mts +35 -0
- package/server.d.mts.map +1 -0
- package/server.d.ts +35 -0
- package/server.d.ts.map +1 -0
- package/server.js +174 -0
- package/server.js.map +1 -0
- package/server.mjs +160 -0
- package/server.mjs.map +1 -0
- package/src/code-tool-paths.cts +3 -0
- package/src/code-tool-types.ts +14 -0
- package/src/code-tool-worker.ts +46 -0
- package/src/code-tool.ts +146 -0
- package/src/compat.ts +483 -0
- package/src/docs-search-tool.ts +48 -0
- package/src/dynamic-tools.ts +153 -0
- package/src/filtering.ts +14 -0
- package/src/headers.ts +10 -0
- package/src/http.ts +127 -0
- package/src/index.ts +108 -0
- package/src/options.ts +466 -0
- package/src/server.ts +207 -0
- package/src/stdio.ts +13 -0
- package/src/tools/index.ts +95 -0
- package/src/tools/logs/raw/bots-logs-raw.ts +196 -0
- package/src/tools/logs/raw/logs-logs-raw.ts +186 -0
- package/src/tools/organizations/categories/list-organizations-categories.ts +44 -0
- package/src/tools/organizations/categories/prompts-organizations-categories.ts +50 -0
- package/src/tools/organizations/categories/tags-organizations-categories.ts +50 -0
- package/src/tools/organizations/categories/topics-organizations-categories.ts +50 -0
- package/src/tools/organizations/domains-organizations.ts +44 -0
- package/src/tools/organizations/models-organizations.ts +44 -0
- package/src/tools/organizations/regions-organizations.ts +44 -0
- package/src/tools/prompts/answers-prompts.ts +200 -0
- package/src/tools/reports/citations-reports.ts +173 -0
- package/src/tools/reports/sentiment-reports.ts +173 -0
- package/src/tools/reports/visibility-reports.ts +173 -0
- package/src/tools/types.ts +103 -0
- package/src/tools.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/stdio.d.mts +3 -0
- package/stdio.d.mts.map +1 -0
- package/stdio.d.ts +3 -0
- package/stdio.d.ts.map +1 -0
- package/stdio.js +14 -0
- package/stdio.js.map +1 -0
- package/stdio.mjs +10 -0
- package/stdio.mjs.map +1 -0
- package/tools/index.d.mts +10 -0
- package/tools/index.d.mts.map +1 -0
- package/tools/index.d.ts +10 -0
- package/tools/index.d.ts.map +1 -0
- package/tools/index.js +79 -0
- package/tools/index.js.map +1 -0
- package/tools/index.mjs +72 -0
- package/tools/index.mjs.map +1 -0
- package/tools/logs/raw/bots-logs-raw.d.mts +45 -0
- package/tools/logs/raw/bots-logs-raw.d.mts.map +1 -0
- package/tools/logs/raw/bots-logs-raw.d.ts +45 -0
- package/tools/logs/raw/bots-logs-raw.d.ts.map +1 -0
- package/tools/logs/raw/bots-logs-raw.js +187 -0
- package/tools/logs/raw/bots-logs-raw.js.map +1 -0
- package/tools/logs/raw/bots-logs-raw.mjs +183 -0
- package/tools/logs/raw/bots-logs-raw.mjs.map +1 -0
- package/tools/logs/raw/logs-logs-raw.d.mts +45 -0
- package/tools/logs/raw/logs-logs-raw.d.mts.map +1 -0
- package/tools/logs/raw/logs-logs-raw.d.ts +45 -0
- package/tools/logs/raw/logs-logs-raw.d.ts.map +1 -0
- package/tools/logs/raw/logs-logs-raw.js +177 -0
- package/tools/logs/raw/logs-logs-raw.js.map +1 -0
- package/tools/logs/raw/logs-logs-raw.mjs +173 -0
- package/tools/logs/raw/logs-logs-raw.mjs.map +1 -0
- package/tools/organizations/categories/list-organizations-categories.d.mts +45 -0
- package/tools/organizations/categories/list-organizations-categories.d.mts.map +1 -0
- package/tools/organizations/categories/list-organizations-categories.d.ts +45 -0
- package/tools/organizations/categories/list-organizations-categories.d.ts.map +1 -0
- package/tools/organizations/categories/list-organizations-categories.js +39 -0
- package/tools/organizations/categories/list-organizations-categories.js.map +1 -0
- package/tools/organizations/categories/list-organizations-categories.mjs +35 -0
- package/tools/organizations/categories/list-organizations-categories.mjs.map +1 -0
- package/tools/organizations/categories/prompts-organizations-categories.d.mts +45 -0
- package/tools/organizations/categories/prompts-organizations-categories.d.mts.map +1 -0
- package/tools/organizations/categories/prompts-organizations-categories.d.ts +45 -0
- package/tools/organizations/categories/prompts-organizations-categories.d.ts.map +1 -0
- package/tools/organizations/categories/prompts-organizations-categories.js +43 -0
- package/tools/organizations/categories/prompts-organizations-categories.js.map +1 -0
- package/tools/organizations/categories/prompts-organizations-categories.mjs +39 -0
- package/tools/organizations/categories/prompts-organizations-categories.mjs.map +1 -0
- package/tools/organizations/categories/tags-organizations-categories.d.mts +45 -0
- package/tools/organizations/categories/tags-organizations-categories.d.mts.map +1 -0
- package/tools/organizations/categories/tags-organizations-categories.d.ts +45 -0
- package/tools/organizations/categories/tags-organizations-categories.d.ts.map +1 -0
- package/tools/organizations/categories/tags-organizations-categories.js +43 -0
- package/tools/organizations/categories/tags-organizations-categories.js.map +1 -0
- package/tools/organizations/categories/tags-organizations-categories.mjs +39 -0
- package/tools/organizations/categories/tags-organizations-categories.mjs.map +1 -0
- package/tools/organizations/categories/topics-organizations-categories.d.mts +45 -0
- package/tools/organizations/categories/topics-organizations-categories.d.mts.map +1 -0
- package/tools/organizations/categories/topics-organizations-categories.d.ts +45 -0
- package/tools/organizations/categories/topics-organizations-categories.d.ts.map +1 -0
- package/tools/organizations/categories/topics-organizations-categories.js +43 -0
- package/tools/organizations/categories/topics-organizations-categories.js.map +1 -0
- package/tools/organizations/categories/topics-organizations-categories.mjs +39 -0
- package/tools/organizations/categories/topics-organizations-categories.mjs.map +1 -0
- package/tools/organizations/domains-organizations.d.mts +45 -0
- package/tools/organizations/domains-organizations.d.mts.map +1 -0
- package/tools/organizations/domains-organizations.d.ts +45 -0
- package/tools/organizations/domains-organizations.d.ts.map +1 -0
- package/tools/organizations/domains-organizations.js +39 -0
- package/tools/organizations/domains-organizations.js.map +1 -0
- package/tools/organizations/domains-organizations.mjs +35 -0
- package/tools/organizations/domains-organizations.mjs.map +1 -0
- package/tools/organizations/models-organizations.d.mts +45 -0
- package/tools/organizations/models-organizations.d.mts.map +1 -0
- package/tools/organizations/models-organizations.d.ts +45 -0
- package/tools/organizations/models-organizations.d.ts.map +1 -0
- package/tools/organizations/models-organizations.js +39 -0
- package/tools/organizations/models-organizations.js.map +1 -0
- package/tools/organizations/models-organizations.mjs +35 -0
- package/tools/organizations/models-organizations.mjs.map +1 -0
- package/tools/organizations/regions-organizations.d.mts +45 -0
- package/tools/organizations/regions-organizations.d.mts.map +1 -0
- package/tools/organizations/regions-organizations.d.ts +45 -0
- package/tools/organizations/regions-organizations.d.ts.map +1 -0
- package/tools/organizations/regions-organizations.js +39 -0
- package/tools/organizations/regions-organizations.js.map +1 -0
- package/tools/organizations/regions-organizations.mjs +35 -0
- package/tools/organizations/regions-organizations.mjs.map +1 -0
- package/tools/prompts/answers-prompts.d.mts +45 -0
- package/tools/prompts/answers-prompts.d.mts.map +1 -0
- package/tools/prompts/answers-prompts.d.ts +45 -0
- package/tools/prompts/answers-prompts.d.ts.map +1 -0
- package/tools/prompts/answers-prompts.js +194 -0
- package/tools/prompts/answers-prompts.js.map +1 -0
- package/tools/prompts/answers-prompts.mjs +190 -0
- package/tools/prompts/answers-prompts.mjs.map +1 -0
- package/tools/reports/citations-reports.d.mts +45 -0
- package/tools/reports/citations-reports.d.mts.map +1 -0
- package/tools/reports/citations-reports.d.ts +45 -0
- package/tools/reports/citations-reports.d.ts.map +1 -0
- package/tools/reports/citations-reports.js +164 -0
- package/tools/reports/citations-reports.js.map +1 -0
- package/tools/reports/citations-reports.mjs +160 -0
- package/tools/reports/citations-reports.mjs.map +1 -0
- package/tools/reports/sentiment-reports.d.mts +45 -0
- package/tools/reports/sentiment-reports.d.mts.map +1 -0
- package/tools/reports/sentiment-reports.d.ts +45 -0
- package/tools/reports/sentiment-reports.d.ts.map +1 -0
- package/tools/reports/sentiment-reports.js +164 -0
- package/tools/reports/sentiment-reports.js.map +1 -0
- package/tools/reports/sentiment-reports.mjs +160 -0
- package/tools/reports/sentiment-reports.mjs.map +1 -0
- package/tools/reports/visibility-reports.d.mts +45 -0
- package/tools/reports/visibility-reports.d.mts.map +1 -0
- package/tools/reports/visibility-reports.d.ts +45 -0
- package/tools/reports/visibility-reports.d.ts.map +1 -0
- package/tools/reports/visibility-reports.js +164 -0
- package/tools/reports/visibility-reports.js.map +1 -0
- package/tools/reports/visibility-reports.mjs +160 -0
- package/tools/reports/visibility-reports.mjs.map +1 -0
- package/tools/types.d.mts +51 -0
- package/tools/types.d.mts.map +1 -0
- package/tools/types.d.ts +51 -0
- package/tools/types.d.ts.map +1 -0
- package/tools/types.js +46 -0
- package/tools/types.js.map +1 -0
- package/tools/types.mjs +42 -0
- package/tools/types.mjs.map +1 -0
- package/tools.d.mts +2 -0
- package/tools.d.mts.map +1 -0
- package/tools.d.ts +2 -0
- package/tools.d.ts.map +1 -0
- package/tools.js +18 -0
- package/tools.js.map +1 -0
- package/tools.mjs +2 -0
- package/tools.mjs.map +1 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { maybeFilter } from 'profound-mcp/filtering';
|
|
3
|
+
import { asTextContentResult } from 'profound-mcp/tools/types';
|
|
4
|
+
export const metadata = {
|
|
5
|
+
resource: 'reports',
|
|
6
|
+
operation: 'write',
|
|
7
|
+
tags: [],
|
|
8
|
+
httpMethod: 'post',
|
|
9
|
+
httpPath: '/v1/reports/sentiment',
|
|
10
|
+
operationId: 'query_sentiment_v1_reports_sentiment_post',
|
|
11
|
+
};
|
|
12
|
+
export const tool = {
|
|
13
|
+
name: 'sentiment_reports',
|
|
14
|
+
description: "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_response',\n $defs: {\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```",
|
|
15
|
+
inputSchema: {
|
|
16
|
+
type: 'object',
|
|
17
|
+
properties: {
|
|
18
|
+
category_id: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
title: 'Category Id',
|
|
21
|
+
},
|
|
22
|
+
end_date: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
title: 'End Date',
|
|
25
|
+
description: 'End date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full ISO timestamp.',
|
|
26
|
+
format: 'date-time',
|
|
27
|
+
},
|
|
28
|
+
metrics: {
|
|
29
|
+
type: 'array',
|
|
30
|
+
title: 'Metrics',
|
|
31
|
+
items: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
enum: ['positive', 'negative'],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
start_date: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
title: 'Start Date',
|
|
39
|
+
description: 'Start date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full ISO timestamp.',
|
|
40
|
+
format: 'date-time',
|
|
41
|
+
},
|
|
42
|
+
date_interval: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
title: 'Date Interval',
|
|
45
|
+
description: 'Date interval for the report. (only used with date dimension)',
|
|
46
|
+
enum: ['day', 'week', 'month', 'year'],
|
|
47
|
+
},
|
|
48
|
+
dimensions: {
|
|
49
|
+
type: 'array',
|
|
50
|
+
title: 'Dimensions',
|
|
51
|
+
description: 'Dimensions to group the report by.',
|
|
52
|
+
items: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
enum: ['theme', 'date', 'region', 'topic', 'model', 'asset_name', 'tag', 'prompt'],
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
filters: {
|
|
58
|
+
type: 'array',
|
|
59
|
+
title: 'Filters',
|
|
60
|
+
description: 'List of filters to apply to the report. Each filter has an operator, field, and value.',
|
|
61
|
+
items: {
|
|
62
|
+
type: 'object',
|
|
63
|
+
title: "Filter[Literal['asset_name', 'theme', 'region', 'topic', 'model', 'tag']]",
|
|
64
|
+
properties: {
|
|
65
|
+
field: {
|
|
66
|
+
type: 'string',
|
|
67
|
+
title: 'Field',
|
|
68
|
+
enum: ['asset_name', 'theme', 'region', 'topic', 'model', 'tag'],
|
|
69
|
+
},
|
|
70
|
+
operator: {
|
|
71
|
+
type: 'string',
|
|
72
|
+
title: 'Operator',
|
|
73
|
+
enum: [
|
|
74
|
+
'is',
|
|
75
|
+
'not_is',
|
|
76
|
+
'in',
|
|
77
|
+
'not_in',
|
|
78
|
+
'contains',
|
|
79
|
+
'not_contains',
|
|
80
|
+
'contains_case_insensitive',
|
|
81
|
+
'not_contains_case_insensitive',
|
|
82
|
+
'matches',
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
value: {
|
|
86
|
+
anyOf: [
|
|
87
|
+
{
|
|
88
|
+
type: 'string',
|
|
89
|
+
title: 'FilterStringValue',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
type: 'array',
|
|
93
|
+
title: 'FilterStringListValue',
|
|
94
|
+
items: {
|
|
95
|
+
type: 'string',
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
type: 'integer',
|
|
100
|
+
title: 'FilterIntegerValue',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
type: 'array',
|
|
104
|
+
title: 'FilterIntegerListValue',
|
|
105
|
+
items: {
|
|
106
|
+
type: 'integer',
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
title: 'Value',
|
|
111
|
+
description: 'Value for the filter. Can be a single value or a list of depending on the operator.',
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
required: ['field', 'operator', 'value'],
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
order_by: {
|
|
118
|
+
type: 'object',
|
|
119
|
+
title: 'Order By',
|
|
120
|
+
description: "\nCustom ordering of the report results.\n\nThe order is a record of key-value pairs where:\n- key is the field to order by, which can be a metric or dimension\n- value is the direction of the order, either 'asc' for ascending or 'desc' for descending.\n\nWhen not specified, the default order is the first metric in the query descending.\n ",
|
|
121
|
+
additionalProperties: true,
|
|
122
|
+
},
|
|
123
|
+
pagination: {
|
|
124
|
+
$ref: '#/$defs/pagination',
|
|
125
|
+
},
|
|
126
|
+
jq_filter: {
|
|
127
|
+
type: 'string',
|
|
128
|
+
title: 'jq Filter',
|
|
129
|
+
description: '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/).',
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
required: ['category_id', 'end_date', 'metrics', 'start_date'],
|
|
133
|
+
$defs: {
|
|
134
|
+
pagination: {
|
|
135
|
+
type: 'object',
|
|
136
|
+
title: 'Pagination',
|
|
137
|
+
description: 'Report pagination model.',
|
|
138
|
+
properties: {
|
|
139
|
+
limit: {
|
|
140
|
+
type: 'integer',
|
|
141
|
+
title: 'Limit',
|
|
142
|
+
description: 'Maximum number of results to return. Default is 10,000, maximum is 50,000.',
|
|
143
|
+
},
|
|
144
|
+
offset: {
|
|
145
|
+
type: 'integer',
|
|
146
|
+
title: 'Offset',
|
|
147
|
+
description: 'Offset for the results. Used for pagination.',
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
annotations: {},
|
|
154
|
+
};
|
|
155
|
+
export const handler = async (client, args) => {
|
|
156
|
+
const { jq_filter, ...body } = args;
|
|
157
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.reports.sentiment(body)));
|
|
158
|
+
};
|
|
159
|
+
export default { metadata, tool, handler };
|
|
160
|
+
//# sourceMappingURL=sentiment-reports.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sentiment-reports.mjs","sourceRoot":"","sources":["../../src/tools/reports/sentiment-reports.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,wBAAwB;OAC7C,EAAY,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I,EAAE,QAAQ;gBACd,KAAK,EAAE,UAAU;gBACjB,WAAW,EACT,8VAA8V;gBAChW,oBAAoB,EAAE,IAAI;aAC3B;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,oBAAoB;aAC3B;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,CAAC;QAC9D,KAAK,EAAE;YACL,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,YAAY;gBACnB,WAAW,EAAE,0BAA0B;gBACvC,UAAU,EAAE;oBACV,KAAK,EAAE;wBACL,IAAI,EAAE,SAAS;wBACf,KAAK,EAAE,OAAO;wBACd,WAAW,EAAE,4EAA4E;qBAC1F;oBACD,MAAM,EAAE;wBACN,IAAI,EAAE,SAAS;wBACf,KAAK,EAAE,QAAQ;wBACf,WAAW,EAAE,8CAA8C;qBAC5D;iBACF;aACF;SACF;KACF;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC3C,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACjG,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Metadata } from 'profound-mcp/tools/types';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import Profound from 'profoundai';
|
|
4
|
+
export declare const metadata: Metadata;
|
|
5
|
+
export declare const tool: Tool;
|
|
6
|
+
export declare const handler: (client: Profound, args: Record<string, unknown> | undefined) => Promise<import("profound-mcp/tools/types").ToolCallResult>;
|
|
7
|
+
declare const _default: {
|
|
8
|
+
metadata: Metadata;
|
|
9
|
+
tool: {
|
|
10
|
+
[x: string]: unknown;
|
|
11
|
+
name: string;
|
|
12
|
+
inputSchema: {
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
type: "object";
|
|
15
|
+
properties?: {
|
|
16
|
+
[x: string]: unknown;
|
|
17
|
+
} | undefined;
|
|
18
|
+
required?: string[] | undefined;
|
|
19
|
+
};
|
|
20
|
+
title?: string | undefined;
|
|
21
|
+
description?: string | undefined;
|
|
22
|
+
outputSchema?: {
|
|
23
|
+
[x: string]: unknown;
|
|
24
|
+
type: "object";
|
|
25
|
+
properties?: {
|
|
26
|
+
[x: string]: unknown;
|
|
27
|
+
} | undefined;
|
|
28
|
+
required?: string[] | undefined;
|
|
29
|
+
} | undefined;
|
|
30
|
+
annotations?: {
|
|
31
|
+
[x: string]: unknown;
|
|
32
|
+
title?: string | undefined;
|
|
33
|
+
readOnlyHint?: boolean | undefined;
|
|
34
|
+
destructiveHint?: boolean | undefined;
|
|
35
|
+
idempotentHint?: boolean | undefined;
|
|
36
|
+
openWorldHint?: boolean | undefined;
|
|
37
|
+
} | undefined;
|
|
38
|
+
_meta?: {
|
|
39
|
+
[x: string]: unknown;
|
|
40
|
+
} | undefined;
|
|
41
|
+
};
|
|
42
|
+
handler: (client: Profound, args: Record<string, unknown> | undefined) => Promise<import("profound-mcp/tools/types").ToolCallResult>;
|
|
43
|
+
};
|
|
44
|
+
export default _default;
|
|
45
|
+
//# sourceMappingURL=visibility-reports.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visibility-reports.d.mts","sourceRoot":"","sources":["../../src/tools/reports/visibility-reports.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,0BAA0B;OAEjE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAoJlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAGxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAKzF,wBAA2C"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Metadata } from 'profound-mcp/tools/types';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import Profound from 'profoundai';
|
|
4
|
+
export declare const metadata: Metadata;
|
|
5
|
+
export declare const tool: Tool;
|
|
6
|
+
export declare const handler: (client: Profound, args: Record<string, unknown> | undefined) => Promise<import("profound-mcp/tools/types").ToolCallResult>;
|
|
7
|
+
declare const _default: {
|
|
8
|
+
metadata: Metadata;
|
|
9
|
+
tool: {
|
|
10
|
+
[x: string]: unknown;
|
|
11
|
+
name: string;
|
|
12
|
+
inputSchema: {
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
type: "object";
|
|
15
|
+
properties?: {
|
|
16
|
+
[x: string]: unknown;
|
|
17
|
+
} | undefined;
|
|
18
|
+
required?: string[] | undefined;
|
|
19
|
+
};
|
|
20
|
+
title?: string | undefined;
|
|
21
|
+
description?: string | undefined;
|
|
22
|
+
outputSchema?: {
|
|
23
|
+
[x: string]: unknown;
|
|
24
|
+
type: "object";
|
|
25
|
+
properties?: {
|
|
26
|
+
[x: string]: unknown;
|
|
27
|
+
} | undefined;
|
|
28
|
+
required?: string[] | undefined;
|
|
29
|
+
} | undefined;
|
|
30
|
+
annotations?: {
|
|
31
|
+
[x: string]: unknown;
|
|
32
|
+
title?: string | undefined;
|
|
33
|
+
readOnlyHint?: boolean | undefined;
|
|
34
|
+
destructiveHint?: boolean | undefined;
|
|
35
|
+
idempotentHint?: boolean | undefined;
|
|
36
|
+
openWorldHint?: boolean | undefined;
|
|
37
|
+
} | undefined;
|
|
38
|
+
_meta?: {
|
|
39
|
+
[x: string]: unknown;
|
|
40
|
+
} | undefined;
|
|
41
|
+
};
|
|
42
|
+
handler: (client: Profound, args: Record<string, unknown> | undefined) => Promise<import("profound-mcp/tools/types").ToolCallResult>;
|
|
43
|
+
};
|
|
44
|
+
export default _default;
|
|
45
|
+
//# sourceMappingURL=visibility-reports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visibility-reports.d.ts","sourceRoot":"","sources":["../../src/tools/reports/visibility-reports.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,0BAA0B;OAEjE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAoJlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAGxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAKzF,wBAA2C"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.handler = exports.tool = exports.metadata = void 0;
|
|
5
|
+
const filtering_1 = require("profound-mcp/filtering");
|
|
6
|
+
const types_1 = require("profound-mcp/tools/types");
|
|
7
|
+
exports.metadata = {
|
|
8
|
+
resource: 'reports',
|
|
9
|
+
operation: 'write',
|
|
10
|
+
tags: [],
|
|
11
|
+
httpMethod: 'post',
|
|
12
|
+
httpPath: '/v1/reports/visibility',
|
|
13
|
+
operationId: 'query_visibility_v1_reports_visibility_post',
|
|
14
|
+
};
|
|
15
|
+
exports.tool = {
|
|
16
|
+
name: 'visibility_reports',
|
|
17
|
+
description: "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\nQuery visibility report.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/report_response',\n $defs: {\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```",
|
|
18
|
+
inputSchema: {
|
|
19
|
+
type: 'object',
|
|
20
|
+
properties: {
|
|
21
|
+
category_id: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
title: 'Category Id',
|
|
24
|
+
},
|
|
25
|
+
end_date: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
title: 'End Date',
|
|
28
|
+
description: 'End date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full ISO timestamp.',
|
|
29
|
+
format: 'date-time',
|
|
30
|
+
},
|
|
31
|
+
metrics: {
|
|
32
|
+
type: 'array',
|
|
33
|
+
title: 'Metrics',
|
|
34
|
+
items: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
enum: ['share_of_voice', 'mentions_count', 'visibility_score'],
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
start_date: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
title: 'Start Date',
|
|
42
|
+
description: 'Start date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full ISO timestamp.',
|
|
43
|
+
format: 'date-time',
|
|
44
|
+
},
|
|
45
|
+
date_interval: {
|
|
46
|
+
type: 'string',
|
|
47
|
+
title: 'Date Interval',
|
|
48
|
+
description: 'Date interval for the report. (only used with date dimension)',
|
|
49
|
+
enum: ['day', 'week', 'month', 'year'],
|
|
50
|
+
},
|
|
51
|
+
dimensions: {
|
|
52
|
+
type: 'array',
|
|
53
|
+
title: 'Dimensions',
|
|
54
|
+
description: 'Dimensions to group the report by.',
|
|
55
|
+
items: {
|
|
56
|
+
type: 'string',
|
|
57
|
+
enum: ['date', 'region', 'topic', 'model', 'asset_name', 'prompt', 'tag'],
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
filters: {
|
|
61
|
+
type: 'array',
|
|
62
|
+
title: 'Filters',
|
|
63
|
+
description: 'List of filters to apply to the report. Each filter has an operator, field, and value.',
|
|
64
|
+
items: {
|
|
65
|
+
type: 'object',
|
|
66
|
+
title: "Filter[Literal['region', 'topic', 'model', 'asset_name', 'prompt', 'tag']]",
|
|
67
|
+
properties: {
|
|
68
|
+
field: {
|
|
69
|
+
type: 'string',
|
|
70
|
+
title: 'Field',
|
|
71
|
+
enum: ['region', 'topic', 'model', 'asset_name', 'prompt', 'tag'],
|
|
72
|
+
},
|
|
73
|
+
operator: {
|
|
74
|
+
type: 'string',
|
|
75
|
+
title: 'Operator',
|
|
76
|
+
enum: [
|
|
77
|
+
'is',
|
|
78
|
+
'not_is',
|
|
79
|
+
'in',
|
|
80
|
+
'not_in',
|
|
81
|
+
'contains',
|
|
82
|
+
'not_contains',
|
|
83
|
+
'contains_case_insensitive',
|
|
84
|
+
'not_contains_case_insensitive',
|
|
85
|
+
'matches',
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
value: {
|
|
89
|
+
anyOf: [
|
|
90
|
+
{
|
|
91
|
+
type: 'string',
|
|
92
|
+
title: 'FilterStringValue',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
type: 'array',
|
|
96
|
+
title: 'FilterStringListValue',
|
|
97
|
+
items: {
|
|
98
|
+
type: 'string',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
type: 'integer',
|
|
103
|
+
title: 'FilterIntegerValue',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
type: 'array',
|
|
107
|
+
title: 'FilterIntegerListValue',
|
|
108
|
+
items: {
|
|
109
|
+
type: 'integer',
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
title: 'Value',
|
|
114
|
+
description: 'Value for the filter. Can be a single value or a list of depending on the operator.',
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
required: ['field', 'operator', 'value'],
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
order_by: {
|
|
121
|
+
type: 'object',
|
|
122
|
+
title: 'Order By',
|
|
123
|
+
description: "\nCustom ordering of the report results.\n\nThe order is a record of key-value pairs where:\n- key is the field to order by, which can be a metric or dimension\n- value is the direction of the order, either 'asc' for ascending or 'desc' for descending.\n\nWhen not specified, the default order is the first metric in the query descending.\n ",
|
|
124
|
+
additionalProperties: true,
|
|
125
|
+
},
|
|
126
|
+
pagination: {
|
|
127
|
+
$ref: '#/$defs/pagination',
|
|
128
|
+
},
|
|
129
|
+
jq_filter: {
|
|
130
|
+
type: 'string',
|
|
131
|
+
title: 'jq Filter',
|
|
132
|
+
description: '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/).',
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
required: ['category_id', 'end_date', 'metrics', 'start_date'],
|
|
136
|
+
$defs: {
|
|
137
|
+
pagination: {
|
|
138
|
+
type: 'object',
|
|
139
|
+
title: 'Pagination',
|
|
140
|
+
description: 'Report pagination model.',
|
|
141
|
+
properties: {
|
|
142
|
+
limit: {
|
|
143
|
+
type: 'integer',
|
|
144
|
+
title: 'Limit',
|
|
145
|
+
description: 'Maximum number of results to return. Default is 10,000, maximum is 50,000.',
|
|
146
|
+
},
|
|
147
|
+
offset: {
|
|
148
|
+
type: 'integer',
|
|
149
|
+
title: 'Offset',
|
|
150
|
+
description: 'Offset for the results. Used for pagination.',
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
annotations: {},
|
|
157
|
+
};
|
|
158
|
+
const handler = async (client, args) => {
|
|
159
|
+
const { jq_filter, ...body } = args;
|
|
160
|
+
return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.reports.visibility(body)));
|
|
161
|
+
};
|
|
162
|
+
exports.handler = handler;
|
|
163
|
+
exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
|
|
164
|
+
//# sourceMappingURL=visibility-reports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visibility-reports.js","sourceRoot":"","sources":["../../src/tools/reports/visibility-reports.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sDAAqD;AACrD,oDAAyE;AAK5D,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM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AAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,CAAC;QAC9D,KAAK,EAAE;YACL,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,YAAY;gBACnB,WAAW,EAAE,0BAA0B;gBACvC,UAAU,EAAE;oBACV,KAAK,EAAE;wBACL,IAAI,EAAE,SAAS;wBACf,KAAK,EAAE,OAAO;wBACd,WAAW,EAAE,4EAA4E;qBAC1F;oBACD,MAAM,EAAE;wBACN,IAAI,EAAE,SAAS;wBACf,KAAK,EAAE,QAAQ;wBACf,WAAW,EAAE,8CAA8C;qBAC5D;iBACF;aACF;SACF;KACF;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC3C,OAAO,IAAA,2BAAmB,EAAC,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClG,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { maybeFilter } from 'profound-mcp/filtering';
|
|
3
|
+
import { asTextContentResult } from 'profound-mcp/tools/types';
|
|
4
|
+
export const metadata = {
|
|
5
|
+
resource: 'reports',
|
|
6
|
+
operation: 'write',
|
|
7
|
+
tags: [],
|
|
8
|
+
httpMethod: 'post',
|
|
9
|
+
httpPath: '/v1/reports/visibility',
|
|
10
|
+
operationId: 'query_visibility_v1_reports_visibility_post',
|
|
11
|
+
};
|
|
12
|
+
export const tool = {
|
|
13
|
+
name: 'visibility_reports',
|
|
14
|
+
description: "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\nQuery visibility report.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/report_response',\n $defs: {\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```",
|
|
15
|
+
inputSchema: {
|
|
16
|
+
type: 'object',
|
|
17
|
+
properties: {
|
|
18
|
+
category_id: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
title: 'Category Id',
|
|
21
|
+
},
|
|
22
|
+
end_date: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
title: 'End Date',
|
|
25
|
+
description: 'End date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full ISO timestamp.',
|
|
26
|
+
format: 'date-time',
|
|
27
|
+
},
|
|
28
|
+
metrics: {
|
|
29
|
+
type: 'array',
|
|
30
|
+
title: 'Metrics',
|
|
31
|
+
items: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
enum: ['share_of_voice', 'mentions_count', 'visibility_score'],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
start_date: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
title: 'Start Date',
|
|
39
|
+
description: 'Start date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full ISO timestamp.',
|
|
40
|
+
format: 'date-time',
|
|
41
|
+
},
|
|
42
|
+
date_interval: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
title: 'Date Interval',
|
|
45
|
+
description: 'Date interval for the report. (only used with date dimension)',
|
|
46
|
+
enum: ['day', 'week', 'month', 'year'],
|
|
47
|
+
},
|
|
48
|
+
dimensions: {
|
|
49
|
+
type: 'array',
|
|
50
|
+
title: 'Dimensions',
|
|
51
|
+
description: 'Dimensions to group the report by.',
|
|
52
|
+
items: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
enum: ['date', 'region', 'topic', 'model', 'asset_name', 'prompt', 'tag'],
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
filters: {
|
|
58
|
+
type: 'array',
|
|
59
|
+
title: 'Filters',
|
|
60
|
+
description: 'List of filters to apply to the report. Each filter has an operator, field, and value.',
|
|
61
|
+
items: {
|
|
62
|
+
type: 'object',
|
|
63
|
+
title: "Filter[Literal['region', 'topic', 'model', 'asset_name', 'prompt', 'tag']]",
|
|
64
|
+
properties: {
|
|
65
|
+
field: {
|
|
66
|
+
type: 'string',
|
|
67
|
+
title: 'Field',
|
|
68
|
+
enum: ['region', 'topic', 'model', 'asset_name', 'prompt', 'tag'],
|
|
69
|
+
},
|
|
70
|
+
operator: {
|
|
71
|
+
type: 'string',
|
|
72
|
+
title: 'Operator',
|
|
73
|
+
enum: [
|
|
74
|
+
'is',
|
|
75
|
+
'not_is',
|
|
76
|
+
'in',
|
|
77
|
+
'not_in',
|
|
78
|
+
'contains',
|
|
79
|
+
'not_contains',
|
|
80
|
+
'contains_case_insensitive',
|
|
81
|
+
'not_contains_case_insensitive',
|
|
82
|
+
'matches',
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
value: {
|
|
86
|
+
anyOf: [
|
|
87
|
+
{
|
|
88
|
+
type: 'string',
|
|
89
|
+
title: 'FilterStringValue',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
type: 'array',
|
|
93
|
+
title: 'FilterStringListValue',
|
|
94
|
+
items: {
|
|
95
|
+
type: 'string',
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
type: 'integer',
|
|
100
|
+
title: 'FilterIntegerValue',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
type: 'array',
|
|
104
|
+
title: 'FilterIntegerListValue',
|
|
105
|
+
items: {
|
|
106
|
+
type: 'integer',
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
title: 'Value',
|
|
111
|
+
description: 'Value for the filter. Can be a single value or a list of depending on the operator.',
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
required: ['field', 'operator', 'value'],
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
order_by: {
|
|
118
|
+
type: 'object',
|
|
119
|
+
title: 'Order By',
|
|
120
|
+
description: "\nCustom ordering of the report results.\n\nThe order is a record of key-value pairs where:\n- key is the field to order by, which can be a metric or dimension\n- value is the direction of the order, either 'asc' for ascending or 'desc' for descending.\n\nWhen not specified, the default order is the first metric in the query descending.\n ",
|
|
121
|
+
additionalProperties: true,
|
|
122
|
+
},
|
|
123
|
+
pagination: {
|
|
124
|
+
$ref: '#/$defs/pagination',
|
|
125
|
+
},
|
|
126
|
+
jq_filter: {
|
|
127
|
+
type: 'string',
|
|
128
|
+
title: 'jq Filter',
|
|
129
|
+
description: '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/).',
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
required: ['category_id', 'end_date', 'metrics', 'start_date'],
|
|
133
|
+
$defs: {
|
|
134
|
+
pagination: {
|
|
135
|
+
type: 'object',
|
|
136
|
+
title: 'Pagination',
|
|
137
|
+
description: 'Report pagination model.',
|
|
138
|
+
properties: {
|
|
139
|
+
limit: {
|
|
140
|
+
type: 'integer',
|
|
141
|
+
title: 'Limit',
|
|
142
|
+
description: 'Maximum number of results to return. Default is 10,000, maximum is 50,000.',
|
|
143
|
+
},
|
|
144
|
+
offset: {
|
|
145
|
+
type: 'integer',
|
|
146
|
+
title: 'Offset',
|
|
147
|
+
description: 'Offset for the results. Used for pagination.',
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
annotations: {},
|
|
154
|
+
};
|
|
155
|
+
export const handler = async (client, args) => {
|
|
156
|
+
const { jq_filter, ...body } = args;
|
|
157
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.reports.visibility(body)));
|
|
158
|
+
};
|
|
159
|
+
export default { metadata, tool, handler };
|
|
160
|
+
//# sourceMappingURL=visibility-reports.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visibility-reports.mjs","sourceRoot":"","sources":["../../src/tools/reports/visibility-reports.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,wBAAwB;OAC7C,EAAY,mBAAmB,EAAE,MAAM,0BAA0B;AAKxE,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,wBAAwB;IAClC,WAAW,EAAE,6CAA6C;CAC3D,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB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