infranodus-mcp-server 1.2.3 → 1.4.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/README.md +57 -31
- package/dist/http-server.js +209 -27
- package/dist/http-server.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/dist/instructions.d.ts +11 -0
- package/dist/instructions.d.ts.map +1 -0
- package/dist/instructions.js +37 -0
- package/dist/instructions.js.map +1 -0
- package/dist/prompts/index.js +1 -1
- package/dist/resources/about.d.ts.map +1 -1
- package/dist/resources/about.js +26 -24
- package/dist/resources/about.js.map +1 -1
- package/dist/resources/llms-txt.d.ts +33 -0
- package/dist/resources/llms-txt.d.ts.map +1 -0
- package/dist/resources/llms-txt.js +54 -0
- package/dist/resources/llms-txt.js.map +1 -0
- package/dist/schemas/index.d.ts +673 -86
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +306 -89
- package/dist/schemas/index.js.map +1 -1
- package/dist/tools/analyzeExistingGraph.d.ts.map +1 -1
- package/dist/tools/analyzeExistingGraph.js +13 -8
- package/dist/tools/analyzeExistingGraph.js.map +1 -1
- package/dist/tools/analyzeText.d.ts +36 -0
- package/dist/tools/analyzeText.d.ts.map +1 -0
- package/dist/tools/analyzeText.js +96 -0
- package/dist/tools/analyzeText.js.map +1 -0
- package/dist/tools/createKnowledgeGraph.d.ts +2 -2
- package/dist/tools/createKnowledgeGraph.d.ts.map +1 -1
- package/dist/tools/createKnowledgeGraph.js +26 -2
- package/dist/tools/createKnowledgeGraph.js.map +1 -1
- package/dist/tools/developConceptualBridges.d.ts +4 -3
- package/dist/tools/developConceptualBridges.d.ts.map +1 -1
- package/dist/tools/developConceptualBridges.js +45 -11
- package/dist/tools/developConceptualBridges.js.map +1 -1
- package/dist/tools/developLatentTopics.d.ts +4 -3
- package/dist/tools/developLatentTopics.d.ts.map +1 -1
- package/dist/tools/developLatentTopics.js +45 -11
- package/dist/tools/developLatentTopics.js.map +1 -1
- package/dist/tools/developTextTool.d.ts +3 -2
- package/dist/tools/developTextTool.d.ts.map +1 -1
- package/dist/tools/developTextTool.js +73 -23
- package/dist/tools/developTextTool.js.map +1 -1
- package/dist/tools/generateContentGaps.d.ts +3 -2
- package/dist/tools/generateContentGaps.d.ts.map +1 -1
- package/dist/tools/generateContentGaps.js +38 -10
- package/dist/tools/generateContentGaps.js.map +1 -1
- package/dist/tools/generateContextualHint.d.ts +3 -2
- package/dist/tools/generateContextualHint.d.ts.map +1 -1
- package/dist/tools/generateContextualHint.js +36 -8
- package/dist/tools/generateContextualHint.js.map +1 -1
- package/dist/tools/generateDifferenceGraphFromTexts.d.ts +15 -6
- package/dist/tools/generateDifferenceGraphFromTexts.d.ts.map +1 -1
- package/dist/tools/generateDifferenceGraphFromTexts.js +90 -7
- package/dist/tools/generateDifferenceGraphFromTexts.js.map +1 -1
- package/dist/tools/generateGoogleResultsVsQueriesGraph.d.ts +3 -1
- package/dist/tools/generateGoogleResultsVsQueriesGraph.d.ts.map +1 -1
- package/dist/tools/generateGoogleResultsVsQueriesGraph.js +18 -9
- package/dist/tools/generateGoogleResultsVsQueriesGraph.js.map +1 -1
- package/dist/tools/generateGoogleSearchQueriesGraph.d.ts +3 -1
- package/dist/tools/generateGoogleSearchQueriesGraph.d.ts.map +1 -1
- package/dist/tools/generateGoogleSearchQueriesGraph.js +21 -10
- package/dist/tools/generateGoogleSearchQueriesGraph.js.map +1 -1
- package/dist/tools/generateGoogleSearchResultsGraph.d.ts +4 -2
- package/dist/tools/generateGoogleSearchResultsGraph.d.ts.map +1 -1
- package/dist/tools/generateGoogleSearchResultsGraph.js +22 -10
- package/dist/tools/generateGoogleSearchResultsGraph.js.map +1 -1
- package/dist/tools/generateKnowledgeGraph.d.ts +2 -2
- package/dist/tools/generateKnowledgeGraph.d.ts.map +1 -1
- package/dist/tools/generateKnowledgeGraph.js +26 -2
- package/dist/tools/generateKnowledgeGraph.js.map +1 -1
- package/dist/tools/generateMergedGraphFromTexts.d.ts +52 -0
- package/dist/tools/generateMergedGraphFromTexts.d.ts.map +1 -0
- package/dist/tools/generateMergedGraphFromTexts.js +159 -0
- package/dist/tools/generateMergedGraphFromTexts.js.map +1 -0
- package/dist/tools/generateOverlapGraphFromTexts.d.ts +15 -6
- package/dist/tools/generateOverlapGraphFromTexts.d.ts.map +1 -1
- package/dist/tools/generateOverlapGraphFromTexts.js +91 -7
- package/dist/tools/generateOverlapGraphFromTexts.js.map +1 -1
- package/dist/tools/generateResearchIdeas.d.ts +4 -2
- package/dist/tools/generateResearchIdeas.d.ts.map +1 -1
- package/dist/tools/generateResearchIdeas.js +57 -16
- package/dist/tools/generateResearchIdeas.js.map +1 -1
- package/dist/tools/generateResearchQuestions.d.ts +3 -2
- package/dist/tools/generateResearchQuestions.d.ts.map +1 -1
- package/dist/tools/generateResearchQuestions.js +44 -9
- package/dist/tools/generateResearchQuestions.js.map +1 -1
- package/dist/tools/generateResponses.d.ts +34 -0
- package/dist/tools/generateResponses.d.ts.map +1 -0
- package/dist/tools/generateResponses.js +110 -0
- package/dist/tools/generateResponses.js.map +1 -0
- package/dist/tools/generateSEOGraphTool.d.ts +2 -0
- package/dist/tools/generateSEOGraphTool.d.ts.map +1 -1
- package/dist/tools/generateSEOGraphTool.js +16 -75
- package/dist/tools/generateSEOGraphTool.js.map +1 -1
- package/dist/tools/generateTopicalClusters.d.ts +3 -2
- package/dist/tools/generateTopicalClusters.d.ts.map +1 -1
- package/dist/tools/generateTopicalClusters.js +38 -10
- package/dist/tools/generateTopicalClusters.js.map +1 -1
- package/dist/tools/getMemory.d.ts.map +1 -1
- package/dist/tools/getMemory.js +7 -5
- package/dist/tools/getMemory.js.map +1 -1
- package/dist/tools/index.d.ts +4 -2
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +4 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/listGraphs.d.ts +1 -1
- package/dist/tools/listGraphs.d.ts.map +1 -1
- package/dist/tools/listGraphs.js +7 -5
- package/dist/tools/listGraphs.js.map +1 -1
- package/dist/tools/optimizeTextStructure.d.ts +34 -0
- package/dist/tools/optimizeTextStructure.d.ts.map +1 -0
- package/dist/tools/optimizeTextStructure.js +108 -0
- package/dist/tools/optimizeTextStructure.js.map +1 -0
- package/dist/types/index.d.ts +23 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/transformers.d.ts +2 -1
- package/dist/utils/transformers.d.ts.map +1 -1
- package/dist/utils/transformers.js +39 -1
- package/dist/utils/transformers.js.map +1 -1
- package/dist/utils/urlContent.d.ts +35 -0
- package/dist/utils/urlContent.d.ts.map +1 -0
- package/dist/utils/urlContent.js +87 -0
- package/dist/utils/urlContent.js.map +1 -0
- package/llms-full.txt +469 -0
- package/llms.txt +64 -0
- package/package.json +4 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"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"}
|
package/dist/schemas/index.js
CHANGED
|
@@ -2,15 +2,20 @@ import { z } from "zod";
|
|
|
2
2
|
export const GenerateGraphSchema = z.object({
|
|
3
3
|
text: z
|
|
4
4
|
.string()
|
|
5
|
-
.
|
|
6
|
-
.describe("Text that you'd like to analyze. Use new lines to separate separate statements or paragrams in each text (but not the sentences). Use [[wikilinks]] to mark entities (if required for social / knowledge graphs, ontology, or entity detection)."),
|
|
5
|
+
.optional()
|
|
6
|
+
.describe("Text that you'd like to analyze. Use new lines to separate separate statements or paragrams in each text (but not the sentences). Use [[wikilinks]] to mark entities (if required for social / knowledge graphs, ontology, or entity detection). Provide either this or url."),
|
|
7
|
+
url: z
|
|
8
|
+
.string()
|
|
9
|
+
.url()
|
|
10
|
+
.optional()
|
|
11
|
+
.describe("URL to fetch content from or YouTube video URL to fetch transcript. Provide either this or text, not both."),
|
|
7
12
|
includeStatements: z
|
|
8
13
|
.boolean()
|
|
9
14
|
.default(false)
|
|
10
15
|
.describe("Include processed statements in response (true only if explicitly needed or requested)"),
|
|
11
16
|
includeGraph: z
|
|
12
17
|
.boolean()
|
|
13
|
-
.default(
|
|
18
|
+
.default(true)
|
|
14
19
|
.describe("Include full graph structure in response (true only if explicitly needed or requested)"),
|
|
15
20
|
addNodesAndEdges: z
|
|
16
21
|
.boolean()
|
|
@@ -28,8 +33,13 @@ export const CreateGraphSchema = z.object({
|
|
|
28
33
|
.describe("Name of the graph to create in InfraNodus"),
|
|
29
34
|
text: z
|
|
30
35
|
.string()
|
|
31
|
-
.
|
|
32
|
-
.describe("Text that you'd like to analyze. Use new lines to separate separate statements or paragrams in each text (but not the sentences)."),
|
|
36
|
+
.optional()
|
|
37
|
+
.describe("Text that you'd like to analyze. Use new lines to separate separate statements or paragrams in each text (but not the sentences). Provide either this or url."),
|
|
38
|
+
url: z
|
|
39
|
+
.string()
|
|
40
|
+
.url()
|
|
41
|
+
.optional()
|
|
42
|
+
.describe("URL to fetch content from or YouTube video URL to fetch transcript. Provide either this or text, not both."),
|
|
33
43
|
includeStatements: z
|
|
34
44
|
.boolean()
|
|
35
45
|
.default(false)
|
|
@@ -69,16 +79,49 @@ export const AddMemorySchema = z.object({
|
|
|
69
79
|
.boolean()
|
|
70
80
|
.default(false)
|
|
71
81
|
.describe("Include nodes and edges in response (add only if needed for further analysis, not recommended for longer texts)"),
|
|
82
|
+
modifyAnalyzedText: z
|
|
83
|
+
.enum(["none", "detectEntities", "extractEntitiesOnly"])
|
|
84
|
+
.default("extractEntitiesOnly")
|
|
85
|
+
.describe("Entity detection: none (normal, graph is build from the words,), extractEntitiesOnly (automatic entity extraction — default setting), detectEntities (mix entities and words - use if explicitly requested by the user or needed for further analysis)"),
|
|
86
|
+
});
|
|
87
|
+
export const AnalyzeTextSchemaBase = z.object({
|
|
88
|
+
text: z
|
|
89
|
+
.string()
|
|
90
|
+
.optional()
|
|
91
|
+
.describe("Text that you'd like to analyze. Use new lines to separate separate statements or paragrams in each text (but not the sentences). Provide either this or url."),
|
|
92
|
+
url: z
|
|
93
|
+
.string()
|
|
94
|
+
.url()
|
|
95
|
+
.optional()
|
|
96
|
+
.describe("URL to fetch content from (e.g. webpage or YouTube video transcript). Provide either this or text."),
|
|
97
|
+
includeStatements: z
|
|
98
|
+
.boolean()
|
|
99
|
+
.default(false)
|
|
100
|
+
.describe("Include processed statements in response (add only if explicitly needed or if user requested the text of the URL / YouTube transcript)"),
|
|
101
|
+
includeGraph: z
|
|
102
|
+
.boolean()
|
|
103
|
+
.default(false)
|
|
104
|
+
.describe("Include full graph structure in response (add only if explicitly needed)"),
|
|
105
|
+
addNodesAndEdges: z
|
|
106
|
+
.boolean()
|
|
107
|
+
.default(false)
|
|
108
|
+
.describe("Include nodes and edges in response (add only if explicitly needed, not recommended for longer texts)"),
|
|
109
|
+
includeGraphSummary: z
|
|
110
|
+
.boolean()
|
|
111
|
+
.default(false)
|
|
112
|
+
.describe("Include AI-generated graph summary for RAG prompt augmentation"),
|
|
72
113
|
modifyAnalyzedText: z
|
|
73
114
|
.enum(["none", "detectEntities", "extractEntitiesOnly"])
|
|
74
115
|
.default("none")
|
|
75
|
-
.describe("Entity detection: none (normal,
|
|
116
|
+
.describe("Entity detection: none (normal), detectEntities (mix entities and words), extractEntitiesOnly (detect entities only - use for ontology and knowledge graph creation and entity extraction)"),
|
|
76
117
|
});
|
|
77
|
-
export const
|
|
118
|
+
export const AnalyzeTextSchema = AnalyzeTextSchemaBase.refine((data) => (data.text !== undefined && data.text.trim().length > 0) ||
|
|
119
|
+
(data.url !== undefined && data.url.length > 0), { message: "Provide either text or url for analysis." });
|
|
120
|
+
export const AnalyzeExistingGraphSchemaBase = z.object({
|
|
78
121
|
graphName: z
|
|
79
122
|
.string()
|
|
80
123
|
.min(1, "Graph name is required")
|
|
81
|
-
.describe("Name of
|
|
124
|
+
.describe("Name of an existing InfraNodus graph in your account to retrieve"),
|
|
82
125
|
includeStatements: z
|
|
83
126
|
.boolean()
|
|
84
127
|
.default(false)
|
|
@@ -100,6 +143,7 @@ export const AnalyzeExistingGraphSchema = z.object({
|
|
|
100
143
|
.default("none")
|
|
101
144
|
.describe("Entity detection: none (normal), detectEntities (mix entities and words), extractEntitiesOnly (detect entities only - use for ontology and knowledge graph creation and entity extraction)"),
|
|
102
145
|
});
|
|
146
|
+
export const AnalyzeExistingGraphSchema = AnalyzeExistingGraphSchemaBase;
|
|
103
147
|
export const SearchExistingGraphsSchema = z.object({
|
|
104
148
|
query: z
|
|
105
149
|
.string()
|
|
@@ -130,29 +174,78 @@ export const SearchExistingGraphsFetchSchema = z.object({
|
|
|
130
174
|
.min(1, "ID of the Search Result is required")
|
|
131
175
|
.describe("ID of the search result to retrieve (username:graph_name:search_query"),
|
|
132
176
|
});
|
|
133
|
-
export const
|
|
177
|
+
export const GenerateContentGapsSchemaBase = z.object({
|
|
134
178
|
text: z
|
|
135
179
|
.string()
|
|
136
|
-
.
|
|
137
|
-
.describe("Text that you'd like to retrieve content gaps from. Use new lines to separate separate statements or paragrams in each text (but not the sentences)."),
|
|
180
|
+
.optional()
|
|
181
|
+
.describe("Text that you'd like to retrieve content gaps from using knowledge graph analysis. Use new lines to separate separate statements or paragrams in each text (but not the sentences). Provide one of: text, url, or graphName."),
|
|
182
|
+
url: z
|
|
183
|
+
.string()
|
|
184
|
+
.url()
|
|
185
|
+
.optional()
|
|
186
|
+
.describe("URL to fetch content from or YouTube video URL to fetch transcript. Provide one of: text, url, or graphName."),
|
|
187
|
+
graphName: z
|
|
188
|
+
.string()
|
|
189
|
+
.min(1, "Graph name must be non-empty when provided")
|
|
190
|
+
.optional()
|
|
191
|
+
.describe("Name of an existing InfraNodus graph to use. Provide one of: text, url, or graphName."),
|
|
138
192
|
});
|
|
139
|
-
export const
|
|
193
|
+
export const GenerateContentGapsSchema = GenerateContentGapsSchemaBase.refine((data) => (data.text !== undefined && data.text.trim().length > 0) ||
|
|
194
|
+
(data.url !== undefined && data.url.length > 0) ||
|
|
195
|
+
(data.graphName !== undefined && data.graphName.trim().length > 0), { message: "Provide either text, url, or graphName for analysis." });
|
|
196
|
+
export const generateContextualHintSchemaBase = z.object({
|
|
140
197
|
text: z
|
|
141
198
|
.string()
|
|
142
|
-
.
|
|
143
|
-
.describe("Text that you'd like to get an overview of. Use new lines to separate separate statements or paragrams in each text (but not the sentences)."),
|
|
199
|
+
.optional()
|
|
200
|
+
.describe("Text that you'd like to get an overview of to augment RAG retrieval and text analysis. Use new lines to separate separate statements or paragrams in each text (but not the sentences). Provide one of: text, url, or graphName."),
|
|
201
|
+
url: z
|
|
202
|
+
.string()
|
|
203
|
+
.url()
|
|
204
|
+
.optional()
|
|
205
|
+
.describe("URL to fetch content from or YouTube video URL to fetch transcript. Provide one of: text, url, or graphName."),
|
|
206
|
+
graphName: z
|
|
207
|
+
.string()
|
|
208
|
+
.min(1, "Graph name must be non-empty when provided")
|
|
209
|
+
.optional()
|
|
210
|
+
.describe("Name of an existing InfraNodus graph to use. Provide one of: text, url, or graphName."),
|
|
144
211
|
});
|
|
145
|
-
export const
|
|
212
|
+
export const generateContextualHintSchema = generateContextualHintSchemaBase.refine((data) => (data.text !== undefined && data.text.trim().length > 0) ||
|
|
213
|
+
(data.url !== undefined && data.url.length > 0) ||
|
|
214
|
+
(data.graphName !== undefined && data.graphName.trim().length > 0), { message: "Provide either text, url, or graphName for analysis." });
|
|
215
|
+
export const GenerateTopicalClustersSchemaBase = z.object({
|
|
146
216
|
text: z
|
|
147
217
|
.string()
|
|
148
|
-
.
|
|
149
|
-
.describe("Text that you'd like to retrieve topics and topical clusters from. Use new lines to separate separate statements or paragrams in each text (but not the sentences)."),
|
|
218
|
+
.optional()
|
|
219
|
+
.describe("Text that you'd like to retrieve topics and topical clusters from using knowledge graph analysis. Use new lines to separate separate statements or paragrams in each text (but not the sentences). Provide one of: text, url, or graphName."),
|
|
220
|
+
url: z
|
|
221
|
+
.string()
|
|
222
|
+
.url()
|
|
223
|
+
.optional()
|
|
224
|
+
.describe("URL to fetch content from or YouTube video URL to fetch transcript. Provide one of: text, url, or graphName."),
|
|
225
|
+
graphName: z
|
|
226
|
+
.string()
|
|
227
|
+
.min(1, "Graph name must be non-empty when provided")
|
|
228
|
+
.optional()
|
|
229
|
+
.describe("Name of an existing InfraNodus graph to use. Provide one of: text, url, or graphName."),
|
|
150
230
|
});
|
|
151
|
-
export const
|
|
231
|
+
export const GenerateTopicalClustersSchema = GenerateTopicalClustersSchemaBase.refine((data) => (data.text !== undefined && data.text.trim().length > 0) ||
|
|
232
|
+
(data.url !== undefined && data.url.length > 0) ||
|
|
233
|
+
(data.graphName !== undefined && data.graphName.trim().length > 0), { message: "Provide either text, url, or graphName for analysis." });
|
|
234
|
+
export const GenerateResearchQuestionsSchemaBase = z.object({
|
|
152
235
|
text: z
|
|
153
236
|
.string()
|
|
154
|
-
.
|
|
155
|
-
.describe("Text that you'd like to generate research questions from. Use new lines to separate separate statements or paragrams in each text (but not the sentences)."),
|
|
237
|
+
.optional()
|
|
238
|
+
.describe("Text that you'd like to generate research questions from. Use new lines to separate separate statements or paragrams in each text (but not the sentences). Provide one of: text, url, or graphName."),
|
|
239
|
+
url: z
|
|
240
|
+
.string()
|
|
241
|
+
.url()
|
|
242
|
+
.optional()
|
|
243
|
+
.describe("URL to fetch content from or YouTube video URL to fetch transcript. Provide one of: text, url, or graphName."),
|
|
244
|
+
graphName: z
|
|
245
|
+
.string()
|
|
246
|
+
.min(1, "Graph name must be non-empty when provided")
|
|
247
|
+
.optional()
|
|
248
|
+
.describe("Name of an existing InfraNodus graph in your account to generate research questions from. Provide one of: text, url, or graphName."),
|
|
156
249
|
useSeveralGaps: z
|
|
157
250
|
.boolean()
|
|
158
251
|
.default(false)
|
|
@@ -180,11 +273,24 @@ export const GenerateResearchQuestionsSchema = z.object({
|
|
|
180
273
|
.default("gpt-4o")
|
|
181
274
|
.describe("AI model to use for generating research questions: claude-opus-4.1, claude-sonnet-4, gemini-2.5-flash, gemini-2.5-flash-lite, gpt-4o, gpt-4o-mini, gpt-5, gpt-5-mini"),
|
|
182
275
|
});
|
|
183
|
-
export const
|
|
276
|
+
export const GenerateResearchQuestionsSchema = GenerateResearchQuestionsSchemaBase.refine((data) => (data.text !== undefined && data.text.trim().length > 0) ||
|
|
277
|
+
(data.url !== undefined && data.url.length > 0) ||
|
|
278
|
+
(data.graphName !== undefined && data.graphName.trim().length > 0), { message: "Provide either text, url, or graphName for analysis." });
|
|
279
|
+
export const GenerateResearchIdeasSchemaBase = z.object({
|
|
184
280
|
text: z
|
|
185
281
|
.string()
|
|
186
|
-
.
|
|
187
|
-
.describe("Text that you'd like to generate research ideas from. Use new lines to separate separate statements or paragrams in each text (but not the sentences)."),
|
|
282
|
+
.optional()
|
|
283
|
+
.describe("Text that you'd like to generate research ideas from based on the content gaps identified between the topical clusters inside the text. Use new lines to separate separate statements or paragrams in each text (but not the sentences). Provide one of: text, url, or graphName."),
|
|
284
|
+
url: z
|
|
285
|
+
.string()
|
|
286
|
+
.url()
|
|
287
|
+
.optional()
|
|
288
|
+
.describe("URL to fetch content from or YouTube video URL to fetch transcript. Provide one of: text, url, or graphName."),
|
|
289
|
+
graphName: z
|
|
290
|
+
.string()
|
|
291
|
+
.min(1, "Graph name must be non-empty when provided")
|
|
292
|
+
.optional()
|
|
293
|
+
.describe("Name of an existing InfraNodus graph to use. Provide one of: text, url, or graphName."),
|
|
188
294
|
useSeveralGaps: z
|
|
189
295
|
.boolean()
|
|
190
296
|
.default(false)
|
|
@@ -196,7 +302,11 @@ export const GenerateResearchIdeasSchema = z.object({
|
|
|
196
302
|
shouldTranscend: z
|
|
197
303
|
.boolean()
|
|
198
304
|
.default(false)
|
|
199
|
-
.describe("Generate ideas that transcend the text and relate to a broader discourse. Only run if explicitly requested by the user to go beyond the text and relate to a broader discourse"),
|
|
305
|
+
.describe("Generate ideas that transcend and go beyond the content of the text and relate to a broader discourse. Only run if explicitly requested by the user to go beyond the text and relate to a broader discourse"),
|
|
306
|
+
responseType: z
|
|
307
|
+
.enum(["response", "idea"])
|
|
308
|
+
.default("response")
|
|
309
|
+
.describe("Type of response to generate: 'response' — generates a response based on the gaps identified; 'idea' — generate an business idea that bridges the gap."),
|
|
200
310
|
modelToUse: z
|
|
201
311
|
.enum([
|
|
202
312
|
"claude-opus-4.1",
|
|
@@ -216,15 +326,28 @@ export const GenerateResearchIdeasSchema = z.object({
|
|
|
216
326
|
.default("gpt-4o")
|
|
217
327
|
.describe("AI model to use for generating research questions: claude-opus-4.1, claude-sonnet-4, gemini-2.5-flash, gemini-2.5-flash-lite, gpt-4o, gpt-4o-mini, gpt-5, gpt-5-mini"),
|
|
218
328
|
});
|
|
219
|
-
export const
|
|
329
|
+
export const GenerateResearchIdeasSchema = GenerateResearchIdeasSchemaBase.refine((data) => (data.text !== undefined && data.text.trim().length > 0) ||
|
|
330
|
+
(data.url !== undefined && data.url.length > 0) ||
|
|
331
|
+
(data.graphName !== undefined && data.graphName.trim().length > 0), { message: "Provide either text, url, or graphName for analysis." });
|
|
332
|
+
export const OptimizeTextStructureSchemaBase = z.object({
|
|
220
333
|
text: z
|
|
221
334
|
.string()
|
|
222
|
-
.
|
|
223
|
-
.describe("Text that you'd like to
|
|
224
|
-
|
|
225
|
-
.
|
|
226
|
-
.
|
|
227
|
-
.
|
|
335
|
+
.optional()
|
|
336
|
+
.describe("Text that you'd like to optimize the structure of by analyzing its bias and coherence using knowledge graph analysis. Use new lines to separate separate statements or paragrams in each text (but not the sentences). Provide one of: text, url, or graphName."),
|
|
337
|
+
url: z
|
|
338
|
+
.string()
|
|
339
|
+
.url()
|
|
340
|
+
.optional()
|
|
341
|
+
.describe("URL to fetch content from or YouTube video URL to fetch transcript. Provide one of: text, url, or graphName."),
|
|
342
|
+
graphName: z
|
|
343
|
+
.string()
|
|
344
|
+
.min(1, "Graph name must be non-empty when provided")
|
|
345
|
+
.optional()
|
|
346
|
+
.describe("Name of an existing InfraNodus graph to use. Provide one of: text, url, or graphName."),
|
|
347
|
+
responseType: z
|
|
348
|
+
.enum(["response", "idea", "question", "transcend"])
|
|
349
|
+
.default("response")
|
|
350
|
+
.describe("Type of response to generate: 'response' — generates a response based on the gaps identified; 'idea' — generate a business idea that bridges the gap; 'question' — generate questions that focus on this context; 'transcend' — generate responses that go beyond the text and relate to a broader discourse."),
|
|
228
351
|
modelToUse: z
|
|
229
352
|
.enum([
|
|
230
353
|
"claude-opus-4.1",
|
|
@@ -242,21 +365,30 @@ export const DevelopLatentConceptsSchema = z.object({
|
|
|
242
365
|
"gpt-5-mini",
|
|
243
366
|
])
|
|
244
367
|
.default("gpt-4o")
|
|
245
|
-
.describe("AI model to use for generating
|
|
368
|
+
.describe("AI model to use for generating optimization suggestions: claude-opus-4.1, claude-sonnet-4, gemini-2.5-flash, gemini-2.5-flash-lite, gpt-4o, gpt-4o-mini, gpt-5, gpt-5-mini"),
|
|
246
369
|
});
|
|
247
|
-
export const
|
|
370
|
+
export const OptimizeTextStructureSchema = OptimizeTextStructureSchemaBase.refine((data) => (data.text !== undefined && data.text.trim().length > 0) ||
|
|
371
|
+
(data.url !== undefined && data.url.length > 0) ||
|
|
372
|
+
(data.graphName !== undefined && data.graphName.trim().length > 0), { message: "Provide either text, url, or graphName for analysis." });
|
|
373
|
+
export const DevelopLatentConceptsSchemaBase = z.object({
|
|
374
|
+
text: z
|
|
375
|
+
.string()
|
|
376
|
+
.optional()
|
|
377
|
+
.describe("Text that you'd like to develop based on the latent concepts that connect this text to a broader discourse. Use new lines to separate separate statements or paragrams in each text (but not the sentences). Provide one of: text, url, or graphName."),
|
|
378
|
+
url: z
|
|
379
|
+
.string()
|
|
380
|
+
.url()
|
|
381
|
+
.optional()
|
|
382
|
+
.describe("URL to fetch content from or YouTube video URL to fetch transcript. Provide one of: text, url, or graphName."),
|
|
248
383
|
graphName: z
|
|
249
384
|
.string()
|
|
250
|
-
.min(1, "Graph name
|
|
251
|
-
.
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
.
|
|
255
|
-
.
|
|
256
|
-
|
|
257
|
-
.number()
|
|
258
|
-
.default(0)
|
|
259
|
-
.describe("Depth of content gaps to generate questions for"),
|
|
385
|
+
.min(1, "Graph name must be non-empty when provided")
|
|
386
|
+
.optional()
|
|
387
|
+
.describe("Name of an existing InfraNodus graph to use. Provide one of: text, url, or graphName."),
|
|
388
|
+
requestMode: z
|
|
389
|
+
.enum(["question", "transcend"])
|
|
390
|
+
.default("transcend")
|
|
391
|
+
.describe("Request mode: 'question' — generate questions that focus on this context; 'transcend' — generate responses that transcend and go beyond the content of the text and relate to a broader discourse."),
|
|
260
392
|
modelToUse: z
|
|
261
393
|
.enum([
|
|
262
394
|
"claude-opus-4.1",
|
|
@@ -276,6 +408,9 @@ export const GenerateResearchQuestionsFromGraphSchema = z.object({
|
|
|
276
408
|
.default("gpt-4o")
|
|
277
409
|
.describe("AI model to use for generating research questions: claude-opus-4.1, claude-sonnet-4, gemini-2.5-flash, gemini-2.5-flash-lite, gpt-4o, gpt-4o-mini, gpt-5, gpt-5-mini"),
|
|
278
410
|
});
|
|
411
|
+
export const DevelopLatentConceptsSchema = DevelopLatentConceptsSchemaBase.refine((data) => (data.text !== undefined && data.text.trim().length > 0) ||
|
|
412
|
+
(data.url !== undefined && data.url.length > 0) ||
|
|
413
|
+
(data.graphName !== undefined && data.graphName.trim().length > 0), { message: "Provide either text, url, or graphName for analysis." });
|
|
279
414
|
export const RetrieveContextForPromptFromGraphSchema = z.object({
|
|
280
415
|
graphName: z
|
|
281
416
|
.string()
|
|
@@ -302,11 +437,21 @@ export const RetrieveContextForPromptFromGraphSchema = z.object({
|
|
|
302
437
|
.default(false)
|
|
303
438
|
.describe("Include graph in the response to provide underlying knowledge graph structure"),
|
|
304
439
|
});
|
|
305
|
-
export const
|
|
440
|
+
export const GenerateResponsesFromGraphSchemaBase = z.object({
|
|
306
441
|
graphName: z
|
|
307
442
|
.string()
|
|
308
|
-
.min(1, "Graph name
|
|
309
|
-
.
|
|
443
|
+
.min(1, "Graph name must be non-empty when provided")
|
|
444
|
+
.optional()
|
|
445
|
+
.describe("Name of an existing InfraNodus graph in your account to retrieve. Provide one of: text, url, or graphName."),
|
|
446
|
+
text: z
|
|
447
|
+
.string()
|
|
448
|
+
.optional()
|
|
449
|
+
.describe("Text that you'd like to generate responses from. Use new lines to separate separate statements or paragrams in each text (but not the sentences). Provide one of: text, url, or graphName."),
|
|
450
|
+
url: z
|
|
451
|
+
.string()
|
|
452
|
+
.url()
|
|
453
|
+
.optional()
|
|
454
|
+
.describe("URL to fetch content from or YouTube video URL to fetch transcript. Provide one of: text, url, or graphName."),
|
|
310
455
|
prompt: z
|
|
311
456
|
.string()
|
|
312
457
|
.min(1, "Prompt is required")
|
|
@@ -330,6 +475,9 @@ export const GenerateResponsesFromGraphSchema = z.object({
|
|
|
330
475
|
.default("gpt-4o")
|
|
331
476
|
.describe("AI model to use for generating research questions: claude-opus-4.1, claude-sonnet-4, gemini-2.5-flash, gemini-2.5-flash-lite, gpt-4o, gpt-4o-mini, gpt-5, gpt-5-mini"),
|
|
332
477
|
});
|
|
478
|
+
export const GenerateResponsesFromGraphSchema = GenerateResponsesFromGraphSchemaBase.refine((data) => (data.text !== undefined && data.text.trim().length > 0) ||
|
|
479
|
+
(data.url !== undefined && data.url.length > 0) ||
|
|
480
|
+
(data.graphName !== undefined && data.graphName.trim().length > 0), { message: "Provide either text, url, or graphName for analysis." });
|
|
333
481
|
// This is used for adding options later to each tool
|
|
334
482
|
export const GenerateGeneralGraphSchema = z.object({
|
|
335
483
|
text: z
|
|
@@ -370,20 +518,43 @@ export const GenerateGeneralGraphSchema = z.object({
|
|
|
370
518
|
.default("none")
|
|
371
519
|
.describe("Entity detection: none (normal), detectEntities (mix entities and words), extractEntitiesOnly (detect entities only - use for ontology and knowledge graph creation and entity extraction)"),
|
|
372
520
|
});
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
521
|
+
/** Shared context item: one of { text }, { url }, or { graphName }. Used by overlap and difference tools. */
|
|
522
|
+
const contextItemTextUrlOrGraphSchema = z.union([
|
|
523
|
+
z
|
|
524
|
+
.object({
|
|
376
525
|
text: z
|
|
377
526
|
.string()
|
|
378
527
|
.min(1, "Text is required for analysis")
|
|
379
|
-
.describe("Text
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
528
|
+
.describe("Text content - use new lines to separate statements (but not sentences)."),
|
|
529
|
+
})
|
|
530
|
+
.describe("Context from plain text."),
|
|
531
|
+
z
|
|
532
|
+
.object({
|
|
533
|
+
url: z
|
|
534
|
+
.string()
|
|
535
|
+
.min(1, "URL is required")
|
|
536
|
+
.url("Must be a valid URL")
|
|
537
|
+
.describe("URL to fetch content from (or YouTube transcript)."),
|
|
538
|
+
})
|
|
539
|
+
.describe("Context from a URL."),
|
|
540
|
+
z
|
|
541
|
+
.object({
|
|
542
|
+
graphName: z
|
|
543
|
+
.string()
|
|
544
|
+
.min(1, "Graph name is required when provided")
|
|
545
|
+
.describe("Name of an existing InfraNodus graph; its statements are retrieved and used as text."),
|
|
546
|
+
})
|
|
547
|
+
.describe("Context from an existing InfraNodus graph by name."),
|
|
548
|
+
]);
|
|
549
|
+
const GenerateOverlapGraphFromTextsSchemaBase = z.object({
|
|
550
|
+
contexts: z
|
|
551
|
+
.array(contextItemTextUrlOrGraphSchema)
|
|
552
|
+
.min(2, "At least two contexts are required for overlap")
|
|
553
|
+
.describe("Array of sources to analyze and find content overlaps for. Each item is an object with exactly one of: { text: string }, { url: string }, or { graphName: string }. Example: [{ text: '...' }, { url: 'https://...' }, { graphName: 'my-graph' }]."),
|
|
554
|
+
modifyAnalyzedText: z
|
|
555
|
+
.enum(["none", "detectEntities", "extractEntitiesOnly"])
|
|
556
|
+
.default("none")
|
|
557
|
+
.describe("Entity detection: none (normal), detectEntities (mix entities and words), extractEntitiesOnly (detect entities only - use for ontology and knowledge graph creation and entity extraction)"),
|
|
387
558
|
includeStatements: z
|
|
388
559
|
.boolean()
|
|
389
560
|
.default(false)
|
|
@@ -397,20 +568,17 @@ export const GenerateOverlapGraphFromTextsSchema = z.object({
|
|
|
397
568
|
.default(false)
|
|
398
569
|
.describe("Include nodes and edges in response (add only if explicitly needed, not recommended for longer texts)"),
|
|
399
570
|
});
|
|
400
|
-
export
|
|
571
|
+
export { GenerateOverlapGraphFromTextsSchemaBase };
|
|
572
|
+
export const GenerateOverlapGraphFromTextsSchema = GenerateOverlapGraphFromTextsSchemaBase;
|
|
573
|
+
const GenerateDifferenceGraphFromTextsSchemaBase = z.object({
|
|
401
574
|
contexts: z
|
|
402
|
-
.array(
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
.default("none")
|
|
410
|
-
.describe("Entity detection: none (normal), detectEntities (mix entities and words), extractEntitiesOnly (detect entities only - use for ontology and knowledge graph creation and entity extraction)"),
|
|
411
|
-
}))
|
|
412
|
-
.min(2, "At least two contexts are required - one target text and one reference text")
|
|
413
|
-
.describe("Array of texts where the FIRST text is analyzed for missing parts compared to the REMAINING reference texts. Example: [targetText, referenceText1, referenceText2, ...]"),
|
|
575
|
+
.array(contextItemTextUrlOrGraphSchema)
|
|
576
|
+
.min(2, "At least two contexts (target + one reference) are required")
|
|
577
|
+
.describe("Array where the FIRST item is the target to analyze for missing parts; REMAINING items are reference sources. Each item is an object with exactly one of: { text: string }, { url: string }, or { graphName: string }. Example: [{ text: '...' }, { url: 'https://...' }, { graphName: 'my-graph' }]."),
|
|
578
|
+
modifyAnalyzedText: z
|
|
579
|
+
.enum(["none", "detectEntities", "extractEntitiesOnly"])
|
|
580
|
+
.default("none")
|
|
581
|
+
.describe("Entity detection: none (normal), detectEntities (mix entities and words), extractEntitiesOnly (detect entities only - use for ontology and knowledge graph creation and entity extraction)"),
|
|
414
582
|
includeStatements: z
|
|
415
583
|
.boolean()
|
|
416
584
|
.default(false)
|
|
@@ -424,23 +592,33 @@ export const GenerateDifferenceGraphFromTextsSchema = z.object({
|
|
|
424
592
|
.default(false)
|
|
425
593
|
.describe("Include nodes and edges in response (add only if explicitly needed, not recommended for longer texts)"),
|
|
426
594
|
});
|
|
595
|
+
export { GenerateDifferenceGraphFromTextsSchemaBase };
|
|
596
|
+
export const GenerateDifferenceGraphFromTextsSchema = GenerateDifferenceGraphFromTextsSchemaBase;
|
|
427
597
|
export const GenerateGoogleSearchResultsGraphSchema = z.object({
|
|
428
598
|
queries: z
|
|
429
599
|
.array(z.string())
|
|
430
600
|
.min(1, "Queries are required for analysis")
|
|
431
|
-
.describe("Queries that you'd like to get Google search results for, can be
|
|
432
|
-
|
|
601
|
+
.describe("Queries that you'd like to get Google search results for, can be multiple queries"),
|
|
602
|
+
includeSearchResults: z
|
|
433
603
|
.boolean()
|
|
434
604
|
.default(false)
|
|
435
|
-
.describe("
|
|
436
|
-
|
|
605
|
+
.describe("Include search results in the response"),
|
|
606
|
+
includeGraph: z
|
|
437
607
|
.boolean()
|
|
438
|
-
.default(
|
|
439
|
-
.describe("
|
|
608
|
+
.default(false)
|
|
609
|
+
.describe("Include the graph structure and keywords in the response (add only if explicitly needed"),
|
|
440
610
|
showExtendedGraphInfo: z
|
|
441
611
|
.boolean()
|
|
442
612
|
.default(false)
|
|
443
|
-
.describe("Include extended graph information in the response (
|
|
613
|
+
.describe("Include extended graph information in the response (additional information about the content gaps and main topics)"),
|
|
614
|
+
includeSearchResultsOnly: z
|
|
615
|
+
.boolean()
|
|
616
|
+
.default(false)
|
|
617
|
+
.describe("Only include search results in the response (do not include the knowledge graph, analysis, and keywords)"),
|
|
618
|
+
includeNodesAndEdges: z
|
|
619
|
+
.boolean()
|
|
620
|
+
.default(false)
|
|
621
|
+
.describe("Include nodes and edges in the response (true only if explicitly required)"),
|
|
444
622
|
importLanguage: z
|
|
445
623
|
.enum([
|
|
446
624
|
"EN",
|
|
@@ -501,6 +679,10 @@ export const GenerateGoogleSearchQueriesGraphSchema = z.object({
|
|
|
501
679
|
.array(z.string())
|
|
502
680
|
.min(1, "Queries are required for analysis")
|
|
503
681
|
.describe("Queries that you'd like to get Google related queries for, can be comma-separated for multiple queries"),
|
|
682
|
+
includeSearchQueries: z
|
|
683
|
+
.boolean()
|
|
684
|
+
.default(false)
|
|
685
|
+
.describe("Include search queries in the response"),
|
|
504
686
|
includeSearchQueriesOnly: z
|
|
505
687
|
.boolean()
|
|
506
688
|
.default(false)
|
|
@@ -509,14 +691,18 @@ export const GenerateGoogleSearchQueriesGraphSchema = z.object({
|
|
|
509
691
|
.enum(["related", "adwords"])
|
|
510
692
|
.default("related")
|
|
511
693
|
.describe("Source of keywords to use for the graph: related (Google suggestions) or adwords (Google Ads suggestions - broader range)"),
|
|
512
|
-
|
|
694
|
+
includeGraph: z
|
|
513
695
|
.boolean()
|
|
514
|
-
.default(
|
|
515
|
-
.describe("
|
|
696
|
+
.default(false)
|
|
697
|
+
.describe("Include the graph structure and keywords in the response (add only if explicitly needed)"),
|
|
516
698
|
showExtendedGraphInfo: z
|
|
517
699
|
.boolean()
|
|
518
700
|
.default(false)
|
|
519
|
-
.describe("Include extended graph information in the response (
|
|
701
|
+
.describe("Include extended graph information in the response (additional information about the content gaps, main topics, and keywords)"),
|
|
702
|
+
includeNodesAndEdges: z
|
|
703
|
+
.boolean()
|
|
704
|
+
.default(false)
|
|
705
|
+
.describe("Include nodes and edges in the response (true only if explicitly required)"),
|
|
520
706
|
importLanguage: z
|
|
521
707
|
.enum([
|
|
522
708
|
"EN",
|
|
@@ -577,14 +763,22 @@ export const GenerateGoogleResultsVsQueriesGraphSchema = z.object({
|
|
|
577
763
|
.array(z.string())
|
|
578
764
|
.min(1, "Queries are required for analysis")
|
|
579
765
|
.describe("Queries for which you'd like to find the difference between what people find and what people are looking for"),
|
|
580
|
-
|
|
766
|
+
includeGraph: z
|
|
581
767
|
.boolean()
|
|
582
|
-
.default(
|
|
583
|
-
.describe("
|
|
768
|
+
.default(false)
|
|
769
|
+
.describe("Include the graph structure and keywords in the response"),
|
|
584
770
|
showExtendedGraphInfo: z
|
|
585
771
|
.boolean()
|
|
586
772
|
.default(false)
|
|
587
773
|
.describe("Include extended graph information in the response (add only if explicitly needed)"),
|
|
774
|
+
includeSearchQueries: z
|
|
775
|
+
.boolean()
|
|
776
|
+
.default(false)
|
|
777
|
+
.describe("Include search queries in the response"),
|
|
778
|
+
includeSearchQueriesOnly: z
|
|
779
|
+
.boolean()
|
|
780
|
+
.default(false)
|
|
781
|
+
.describe("Only include search queries in the response (do not include the knowledge graph, analysis, and keywords)"),
|
|
588
782
|
importLanguage: z
|
|
589
783
|
.enum([
|
|
590
784
|
"EN",
|
|
@@ -655,6 +849,16 @@ export const GenerateSEOGraphSchema = z.object({
|
|
|
655
849
|
.enum(["all", "header tags", "link tags"])
|
|
656
850
|
.default("all")
|
|
657
851
|
.describe("What to extract from URL: 'all' (default), 'header tags', or 'link tags'."),
|
|
852
|
+
numberOfKeywordsToExtract: z
|
|
853
|
+
.number()
|
|
854
|
+
.max(4)
|
|
855
|
+
.default(2)
|
|
856
|
+
.describe("Number of the top keyword groups extracted from text to use for the SEO analysis, default is 2, maximum is 4. Use more if you want to get deeper insights but longer processing. In case the tool fails, reduce to 2 or less."),
|
|
857
|
+
numberOfTopicsToExtract: z
|
|
858
|
+
.number()
|
|
859
|
+
.max(4)
|
|
860
|
+
.default(2)
|
|
861
|
+
.describe("Number of the top topical cluster names extracted from text to use for the SEO analysis, default is 2, maximum is 4. Use more if you want to get deeper insights but longer processing. In case the tool fails, reduce to 2 or less."),
|
|
658
862
|
importLanguage: z
|
|
659
863
|
.enum([
|
|
660
864
|
"EN",
|
|
@@ -714,11 +918,21 @@ export const GenerateSEOGraphSchema = z.object({
|
|
|
714
918
|
.default(false)
|
|
715
919
|
.describe("Use proxy to fetch content from URL (true only if the first request fails, returns javascript only,or is requested by user)"),
|
|
716
920
|
});
|
|
717
|
-
export const
|
|
921
|
+
export const DevelopTextToolSchemaBase = z.object({
|
|
718
922
|
text: z
|
|
719
923
|
.string()
|
|
720
|
-
.
|
|
721
|
-
.describe("Text that you'd like to think about and analyze. Use new lines to separate separate statements or paragrams in each text (but not the sentences)."),
|
|
924
|
+
.optional()
|
|
925
|
+
.describe("Text that you'd like to think about and analyze. Use new lines to separate separate statements or paragrams in each text (but not the sentences). Provide one of: text, url, or graphName."),
|
|
926
|
+
url: z
|
|
927
|
+
.string()
|
|
928
|
+
.url()
|
|
929
|
+
.optional()
|
|
930
|
+
.describe("URL to fetch content from or YouTube video URL to fetch transcript. Provide one of: text, url, or graphName."),
|
|
931
|
+
graphName: z
|
|
932
|
+
.string()
|
|
933
|
+
.min(1, "Graph name must be non-empty when provided")
|
|
934
|
+
.optional()
|
|
935
|
+
.describe("Name of an existing InfraNodus graph to use. Provide one of: text, url, or graphName."),
|
|
722
936
|
useSeveralGaps: z
|
|
723
937
|
.boolean()
|
|
724
938
|
.default(false)
|
|
@@ -730,7 +944,7 @@ export const DevelopTextToolSchema = z.object({
|
|
|
730
944
|
transcendDiscourse: z
|
|
731
945
|
.boolean()
|
|
732
946
|
.default(false)
|
|
733
|
-
.describe("Shall we transcend this text
|
|
947
|
+
.describe("Shall we transcend and go beyond this text to relate to a broader discourse? If false, the focus is on this text only."),
|
|
734
948
|
modelToUse: z
|
|
735
949
|
.enum([
|
|
736
950
|
"claude-opus-4.1",
|
|
@@ -750,8 +964,11 @@ export const DevelopTextToolSchema = z.object({
|
|
|
750
964
|
.default("gpt-4o")
|
|
751
965
|
.describe("AI model to use for generating insights: claude-opus-4.1, claude-sonnet-4, gemini-2.5-flash, gemini-2.5-flash-lite, gpt-4o, gpt-4o-mini, gpt-5, gpt-5-mini"),
|
|
752
966
|
});
|
|
967
|
+
export const DevelopTextToolSchema = DevelopTextToolSchemaBase.refine((data) => (data.text !== undefined && data.text.trim().length > 0) ||
|
|
968
|
+
(data.url !== undefined && data.url.length > 0) ||
|
|
969
|
+
(data.graphName !== undefined && data.graphName.trim().length > 0), { message: "Provide either text, url, or graphName for analysis." });
|
|
753
970
|
export const ListGraphsSchema = z.object({
|
|
754
|
-
|
|
971
|
+
nameContains: z
|
|
755
972
|
.string()
|
|
756
973
|
.optional()
|
|
757
974
|
.describe("Values that should be matched to in the graph name. Use comma-separated values for OR logic (e.g., 'youtube,google,evernote'). Leave empty to list all graphs."),
|