@enokdev/springdocs-mcp 1.2.8 → 1.4.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/README.md +83 -40
- package/build/config.d.ts +9 -0
- package/build/config.d.ts.map +1 -0
- package/build/config.js +32 -0
- package/build/config.js.map +1 -0
- package/build/format.d.ts +6 -0
- package/build/format.d.ts.map +1 -0
- package/build/format.js +23 -0
- package/build/format.js.map +1 -0
- package/build/http-server.d.ts +15 -0
- package/build/http-server.d.ts.map +1 -0
- package/build/http-server.js +131 -0
- package/build/http-server.js.map +1 -0
- package/build/index.js +182 -68
- package/build/index.js.map +1 -1
- package/build/prompts.d.ts +23 -0
- package/build/prompts.d.ts.map +1 -0
- package/build/prompts.js +112 -0
- package/build/prompts.js.map +1 -0
- package/build/resources.d.ts +31 -0
- package/build/resources.d.ts.map +1 -0
- package/build/resources.js +66 -0
- package/build/resources.js.map +1 -0
- package/build/services/advanced-features.d.ts +14 -9
- package/build/services/advanced-features.d.ts.map +1 -1
- package/build/services/advanced-features.js +205 -195
- package/build/services/advanced-features.js.map +1 -1
- package/build/services/boot-wiki.d.ts +25 -0
- package/build/services/boot-wiki.d.ts.map +1 -0
- package/build/services/boot-wiki.js +103 -0
- package/build/services/boot-wiki.js.map +1 -0
- package/build/services/cache.d.ts +18 -3
- package/build/services/cache.d.ts.map +1 -1
- package/build/services/cache.js +84 -3
- package/build/services/cache.js.map +1 -1
- package/build/services/dependency-finder.d.ts +46 -0
- package/build/services/dependency-finder.d.ts.map +1 -0
- package/build/services/dependency-finder.js +181 -0
- package/build/services/dependency-finder.js.map +1 -0
- package/build/services/diagnosis.d.ts +46 -0
- package/build/services/diagnosis.d.ts.map +1 -0
- package/build/services/diagnosis.js +481 -0
- package/build/services/diagnosis.js.map +1 -0
- package/build/services/guides-list.d.ts +16 -0
- package/build/services/guides-list.d.ts.map +1 -0
- package/build/services/guides-list.js +45 -0
- package/build/services/guides-list.js.map +1 -0
- package/build/services/http.d.ts +21 -0
- package/build/services/http.d.ts.map +1 -0
- package/build/services/http.js +168 -0
- package/build/services/http.js.map +1 -0
- package/build/services/initializr.d.ts +41 -0
- package/build/services/initializr.d.ts.map +1 -0
- package/build/services/initializr.js +135 -0
- package/build/services/initializr.js.map +1 -0
- package/build/services/markdown.d.ts +56 -0
- package/build/services/markdown.d.ts.map +1 -0
- package/build/services/markdown.js +146 -0
- package/build/services/markdown.js.map +1 -0
- package/build/services/migration-sources.d.ts +13 -0
- package/build/services/migration-sources.d.ts.map +1 -0
- package/build/services/migration-sources.js +48 -0
- package/build/services/migration-sources.js.map +1 -0
- package/build/services/release-notes.d.ts +23 -0
- package/build/services/release-notes.d.ts.map +1 -0
- package/build/services/release-notes.js +94 -0
- package/build/services/release-notes.js.map +1 -0
- package/build/services/search-index.d.ts +33 -0
- package/build/services/search-index.d.ts.map +1 -0
- package/build/services/search-index.js +147 -0
- package/build/services/search-index.js.map +1 -0
- package/build/services/spring-projects-config.d.ts +26 -33
- package/build/services/spring-projects-config.d.ts.map +1 -1
- package/build/services/spring-projects-config.js +248 -79
- package/build/services/spring-projects-config.js.map +1 -1
- package/build/services/springboot-docs-optimized.d.ts +57 -16
- package/build/services/springboot-docs-optimized.d.ts.map +1 -1
- package/build/services/springboot-docs-optimized.js +315 -197
- package/build/services/springboot-docs-optimized.js.map +1 -1
- package/build/services/url.d.ts +15 -0
- package/build/services/url.d.ts.map +1 -0
- package/build/services/url.js +40 -0
- package/build/services/url.js.map +1 -0
- package/build/tools/index.d.ts +376 -2
- package/build/tools/index.d.ts.map +1 -1
- package/build/tools/index.js +178 -11
- package/build/tools/index.js.map +1 -1
- package/build/validation.d.ts +7 -0
- package/build/validation.d.ts.map +1 -0
- package/build/validation.js +50 -0
- package/build/validation.js.map +1 -0
- package/build/version.d.ts +3 -0
- package/build/version.d.ts.map +1 -0
- package/build/version.js +6 -0
- package/build/version.js.map +1 -0
- package/package.json +6 -6
- package/build/debug.d.ts +0 -3
- package/build/debug.d.ts.map +0 -1
- package/build/debug.js +0 -292
- package/build/debug.js.map +0 -1
- package/build/services/advanced-features-old.d.ts +0 -45
- package/build/services/advanced-features-old.d.ts.map +0 -1
- package/build/services/advanced-features-old.js +0 -792
- package/build/services/advanced-features-old.js.map +0 -1
- package/build/services/springboot-docs-optimized-old.d.ts +0 -55
- package/build/services/springboot-docs-optimized-old.d.ts.map +0 -1
- package/build/services/springboot-docs-optimized-old.js +0 -588
- package/build/services/springboot-docs-optimized-old.js.map +0 -1
- package/build/services/springboot-docs.d.ts +0 -65
- package/build/services/springboot-docs.d.ts.map +0 -1
- package/build/services/springboot-docs.js +0 -708
- package/build/services/springboot-docs.js.map +0 -1
package/build/tools/index.js
CHANGED
|
@@ -12,12 +12,13 @@ export class ToolDefinitions {
|
|
|
12
12
|
properties: {
|
|
13
13
|
query: {
|
|
14
14
|
type: "string",
|
|
15
|
+
maxLength: 200,
|
|
15
16
|
description: "Les mots-clés à rechercher dans la documentation",
|
|
16
17
|
},
|
|
17
18
|
docType: {
|
|
18
19
|
type: "string",
|
|
19
|
-
enum: ["guides", "reference", "
|
|
20
|
-
description: "Type de documentation à rechercher",
|
|
20
|
+
enum: ["guides", "reference", "projects", "content", "all"],
|
|
21
|
+
description: "Type de documentation à rechercher. `content` = recherche plein texte (classement BM25) dans les pages déjà lues par le serveur (get_spring_project, get_spring_reference, get_spring_guide) ; inclus dans `all`.",
|
|
21
22
|
default: "all",
|
|
22
23
|
},
|
|
23
24
|
limit: {
|
|
@@ -27,6 +28,11 @@ export class ToolDefinitions {
|
|
|
27
28
|
minimum: 1,
|
|
28
29
|
maximum: 50,
|
|
29
30
|
},
|
|
31
|
+
version: {
|
|
32
|
+
type: "string",
|
|
33
|
+
maxLength: 20,
|
|
34
|
+
description: "Version de la documentation de référence Spring Boot (ex. '3.4' ou '3.4.2' ; le patch est ignoré ; 'current' ou absent = dernière). Ne s'applique qu'à la partie référence (et aux pages de référence Boot de la recherche plein texte) : les guides et les projets ne sont pas versionnés et ignorent ce paramètre.",
|
|
35
|
+
},
|
|
30
36
|
},
|
|
31
37
|
required: ["query"],
|
|
32
38
|
},
|
|
@@ -39,6 +45,7 @@ export class ToolDefinitions {
|
|
|
39
45
|
properties: {
|
|
40
46
|
query: {
|
|
41
47
|
type: "string",
|
|
48
|
+
maxLength: 200,
|
|
42
49
|
description: "Les mots-clés à rechercher dans les projets Spring (ex: 'security', 'data', 'cloud')",
|
|
43
50
|
},
|
|
44
51
|
limit: {
|
|
@@ -60,8 +67,16 @@ export class ToolDefinitions {
|
|
|
60
67
|
properties: {
|
|
61
68
|
projectName: {
|
|
62
69
|
type: "string",
|
|
70
|
+
maxLength: 100,
|
|
63
71
|
description: "Le nom du projet Spring (ex: 'spring-boot', 'spring-security', 'spring-data')",
|
|
64
72
|
},
|
|
73
|
+
offset: {
|
|
74
|
+
type: "number",
|
|
75
|
+
minimum: 0,
|
|
76
|
+
maximum: 10000000,
|
|
77
|
+
default: 0,
|
|
78
|
+
description: "Position (en caractères) pour lire la suite d'un document tronqué, fournie dans le pied de la réponse précédente",
|
|
79
|
+
},
|
|
65
80
|
},
|
|
66
81
|
required: ["projectName"],
|
|
67
82
|
},
|
|
@@ -74,6 +89,7 @@ export class ToolDefinitions {
|
|
|
74
89
|
properties: {
|
|
75
90
|
category: {
|
|
76
91
|
type: "string",
|
|
92
|
+
maxLength: 100,
|
|
77
93
|
description: "Catégorie de guides à filtrer (ex: 'Web', 'Data', 'Security', 'Testing')",
|
|
78
94
|
},
|
|
79
95
|
limit: {
|
|
@@ -95,12 +111,13 @@ export class ToolDefinitions {
|
|
|
95
111
|
properties: {
|
|
96
112
|
guideId: {
|
|
97
113
|
type: "string",
|
|
98
|
-
|
|
114
|
+
maxLength: 100,
|
|
115
|
+
description: "L'identifiant du guide Spring Boot (par exemple: 'rest-service', 'accessing-data-jpa')",
|
|
99
116
|
},
|
|
100
117
|
detail_level: {
|
|
101
118
|
type: "string",
|
|
102
119
|
enum: ["summary", "medium", "full"],
|
|
103
|
-
description: "Niveau de détail: summary (1500 chars), medium (4000 chars), full (
|
|
120
|
+
description: "Niveau de détail: summary (1500 chars), medium (4000 chars), full (50000 chars)",
|
|
104
121
|
default: "medium",
|
|
105
122
|
},
|
|
106
123
|
},
|
|
@@ -115,36 +132,51 @@ export class ToolDefinitions {
|
|
|
115
132
|
properties: {
|
|
116
133
|
project: {
|
|
117
134
|
type: "string",
|
|
118
|
-
enum: ["boot", "ai", "framework"],
|
|
119
|
-
description: "Spring project to search ('boot' for Spring Boot, 'ai' for Spring AI, 'framework' for Spring Framework)",
|
|
135
|
+
enum: ["boot", "ai", "framework", "security", "data-jpa", "batch", "integration", "kafka", "modulith", "cloud-gateway", "cloud-config"],
|
|
136
|
+
description: "Spring project to search ('boot' for Spring Boot, 'ai' for Spring AI, 'framework' for Spring Framework, 'security' for Spring Security, 'data-jpa' for Spring Data JPA, 'batch' for Spring Batch, 'integration' for Spring Integration, 'kafka' for Spring for Apache Kafka, 'modulith' for Spring Modulith, 'cloud-gateway' for Spring Cloud Gateway, 'cloud-config' for Spring Cloud Config)",
|
|
120
137
|
default: "boot",
|
|
121
138
|
},
|
|
122
139
|
section: {
|
|
123
140
|
type: "string",
|
|
141
|
+
maxLength: 100,
|
|
124
142
|
description: "Documentation section (e.g., 'web', 'data' for Boot; 'chatclient', 'rag' for AI; 'core', 'web' for Framework)",
|
|
125
143
|
},
|
|
126
144
|
subsection: {
|
|
127
145
|
type: "string",
|
|
146
|
+
maxLength: 100,
|
|
128
147
|
description: "Optional subsection for more precise navigation",
|
|
129
148
|
},
|
|
149
|
+
offset: {
|
|
150
|
+
type: "number",
|
|
151
|
+
minimum: 0,
|
|
152
|
+
maximum: 10000000,
|
|
153
|
+
default: 0,
|
|
154
|
+
description: "Position (en caractères) pour lire la suite d'un document tronqué, fournie dans le pied de la réponse précédente",
|
|
155
|
+
},
|
|
156
|
+
version: {
|
|
157
|
+
type: "string",
|
|
158
|
+
maxLength: 20,
|
|
159
|
+
description: "Version de la documentation (ex: '3.4' ou '3.4.2' ; le patch est ignoré). Omis ou 'current' = dernière version. Les anciennes versions peuvent ne pas être publiées.",
|
|
160
|
+
},
|
|
130
161
|
},
|
|
131
162
|
required: ["section"],
|
|
132
163
|
},
|
|
133
164
|
},
|
|
134
165
|
{
|
|
135
166
|
name: "search_spring_concepts",
|
|
136
|
-
description: "Recherche des concepts Spring Boot
|
|
167
|
+
description: "Recherche des concepts Spring Boot dans la documentation de référence (titres de sections correspondants, extraits)",
|
|
137
168
|
inputSchema: {
|
|
138
169
|
type: "object",
|
|
139
170
|
properties: {
|
|
140
171
|
concept: {
|
|
141
172
|
type: "string",
|
|
173
|
+
maxLength: 200,
|
|
142
174
|
description: "Le concept Spring Boot à rechercher (par exemple: 'auto-configuration', 'profiles', 'actuator')",
|
|
143
175
|
},
|
|
144
|
-
|
|
176
|
+
version: {
|
|
145
177
|
type: "string",
|
|
146
|
-
|
|
147
|
-
description: "
|
|
178
|
+
maxLength: 20,
|
|
179
|
+
description: "Version de la documentation Spring Boot (ex. '3.4' ou '3.4.2' ; le patch est ignoré ; 'current' ou absent = dernière)",
|
|
148
180
|
},
|
|
149
181
|
},
|
|
150
182
|
required: ["concept"],
|
|
@@ -158,6 +190,7 @@ export class ToolDefinitions {
|
|
|
158
190
|
properties: {
|
|
159
191
|
query: {
|
|
160
192
|
type: "string",
|
|
193
|
+
maxLength: 200,
|
|
161
194
|
description: "Keywords to search across the entire Spring ecosystem",
|
|
162
195
|
},
|
|
163
196
|
scope: {
|
|
@@ -185,6 +218,7 @@ export class ToolDefinitions {
|
|
|
185
218
|
properties: {
|
|
186
219
|
topic: {
|
|
187
220
|
type: "string",
|
|
221
|
+
maxLength: 200,
|
|
188
222
|
description: "Tutorial topic (e.g., 'rest-api', 'jpa', 'security', 'testing')",
|
|
189
223
|
},
|
|
190
224
|
level: {
|
|
@@ -196,7 +230,7 @@ export class ToolDefinitions {
|
|
|
196
230
|
detail_level: {
|
|
197
231
|
type: "string",
|
|
198
232
|
enum: ["summary", "medium", "full"],
|
|
199
|
-
description: "Content detail: summary (1500 chars), medium (4000 chars), full (
|
|
233
|
+
description: "Content detail: summary (1500 chars), medium (4000 chars), full (50000 chars)",
|
|
200
234
|
default: "medium",
|
|
201
235
|
},
|
|
202
236
|
},
|
|
@@ -211,10 +245,12 @@ export class ToolDefinitions {
|
|
|
211
245
|
properties: {
|
|
212
246
|
version1: {
|
|
213
247
|
type: "string",
|
|
248
|
+
maxLength: 50,
|
|
214
249
|
description: "First Spring Boot version to compare (e.g., '2.7.0')",
|
|
215
250
|
},
|
|
216
251
|
version2: {
|
|
217
252
|
type: "string",
|
|
253
|
+
maxLength: 50,
|
|
218
254
|
description: "Second Spring Boot version to compare (e.g., '3.0.0')",
|
|
219
255
|
},
|
|
220
256
|
focus: {
|
|
@@ -227,6 +263,72 @@ export class ToolDefinitions {
|
|
|
227
263
|
required: ["version1", "version2"],
|
|
228
264
|
},
|
|
229
265
|
},
|
|
266
|
+
{
|
|
267
|
+
name: "get_release_notes",
|
|
268
|
+
description: "Récupère les notes de release GitHub d'un projet Spring (version précise ou dernière), avec filtre sur les changements majeurs, nouveautés ou dépréciations",
|
|
269
|
+
inputSchema: {
|
|
270
|
+
type: "object",
|
|
271
|
+
properties: {
|
|
272
|
+
project: {
|
|
273
|
+
type: "string",
|
|
274
|
+
enum: ["boot", "ai", "framework", "security", "data-jpa", "batch", "integration", "kafka", "modulith", "cloud-gateway", "cloud-config"],
|
|
275
|
+
description: "Projet Spring dont on veut les notes de release",
|
|
276
|
+
default: "boot",
|
|
277
|
+
},
|
|
278
|
+
version: {
|
|
279
|
+
type: "string",
|
|
280
|
+
maxLength: 50,
|
|
281
|
+
description: "Version de la release (ex. '3.5.0', 'v3.5.0', '4.2.0-M2' ; '3.5' = dernière release stable de cette mineure). Si omise ou 'latest' : dernière version stable. Jeton GitHub optionnel via la variable d'environnement GITHUB_TOKEN (limite de débit relevée)",
|
|
282
|
+
},
|
|
283
|
+
focus: {
|
|
284
|
+
type: "string",
|
|
285
|
+
enum: ["all", "breaking-changes", "new-features", "deprecations"],
|
|
286
|
+
description: "Aspect à mettre en avant : tout, changements majeurs, nouveautés ou dépréciations",
|
|
287
|
+
default: "all",
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
required: [],
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
name: "get_migration_guide",
|
|
295
|
+
description: "Récupère le guide de migration ou les notes de version d'upgrade de Spring Boot (par défaut), Spring Framework ou Spring Batch pour une version cible, avec filtre par section (ex: jakarta)",
|
|
296
|
+
inputSchema: {
|
|
297
|
+
type: "object",
|
|
298
|
+
properties: {
|
|
299
|
+
version: {
|
|
300
|
+
type: "string",
|
|
301
|
+
maxLength: 20,
|
|
302
|
+
description: "Version cible du projet (ex. '3.0', '3.4' ou '3.4.2' pour Boot, '6.2' pour Framework, '5.0' pour Batch ; le patch est ignoré)",
|
|
303
|
+
},
|
|
304
|
+
project: {
|
|
305
|
+
type: "string",
|
|
306
|
+
enum: ["spring-boot", "spring-framework", "spring-batch"],
|
|
307
|
+
description: "Projet concerné. spring-boot (défaut) : guide de migration / notes de version Boot ; spring-framework : notes de version (section « Upgrading From ») ; spring-batch : guide de migration (disponible pour 5.0 et 6.0). Pages markdown brutes du wiki du projet.",
|
|
308
|
+
default: "spring-boot",
|
|
309
|
+
},
|
|
310
|
+
document: {
|
|
311
|
+
type: "string",
|
|
312
|
+
enum: ["auto", "migration-guide", "release-notes"],
|
|
313
|
+
description: "Document à lire : auto (Boot : guide de migration pour les versions x.0, notes de version sinon ; Framework : notes de version ; Batch : guide de migration), guide de migration ou notes de version (Framework n'a que release-notes, Batch que migration-guide)",
|
|
314
|
+
default: "auto",
|
|
315
|
+
},
|
|
316
|
+
section: {
|
|
317
|
+
type: "string",
|
|
318
|
+
maxLength: 50,
|
|
319
|
+
description: "Mot-clé de titre : ne renvoie que les sections correspondantes (ex. 'jakarta')",
|
|
320
|
+
},
|
|
321
|
+
offset: {
|
|
322
|
+
type: "number",
|
|
323
|
+
minimum: 0,
|
|
324
|
+
maximum: 10000000,
|
|
325
|
+
description: "Décalage en caractères pour lire la suite d'une page paginée",
|
|
326
|
+
default: 0,
|
|
327
|
+
},
|
|
328
|
+
},
|
|
329
|
+
required: ["version"],
|
|
330
|
+
},
|
|
331
|
+
},
|
|
230
332
|
{
|
|
231
333
|
name: "get_spring_best_practices",
|
|
232
334
|
description: "Get best practices and recommendations for Spring Boot development",
|
|
@@ -256,6 +358,7 @@ export class ToolDefinitions {
|
|
|
256
358
|
properties: {
|
|
257
359
|
error_message: {
|
|
258
360
|
type: "string",
|
|
361
|
+
maxLength: 2000,
|
|
259
362
|
description: "Error message or issue description",
|
|
260
363
|
},
|
|
261
364
|
component: {
|
|
@@ -265,12 +368,76 @@ export class ToolDefinitions {
|
|
|
265
368
|
},
|
|
266
369
|
stack_trace: {
|
|
267
370
|
type: "string",
|
|
371
|
+
maxLength: 10000,
|
|
268
372
|
description: "Stack trace (optional, for more specific diagnosis)",
|
|
269
373
|
},
|
|
270
374
|
},
|
|
271
375
|
required: ["error_message"],
|
|
272
376
|
},
|
|
273
377
|
},
|
|
378
|
+
{
|
|
379
|
+
name: "spring_cache_stats",
|
|
380
|
+
description: "Affiche les statistiques du cache du serveur (entrées, expirées, capacité) et permet de purger les entrées expirées ou tout le cache",
|
|
381
|
+
inputSchema: {
|
|
382
|
+
type: "object",
|
|
383
|
+
properties: {
|
|
384
|
+
purge: {
|
|
385
|
+
type: "string",
|
|
386
|
+
enum: ["none", "expired", "all"],
|
|
387
|
+
description: "Purge à effectuer avant d'afficher les statistiques : aucune (lecture seule), entrées expirées, ou tout le cache",
|
|
388
|
+
default: "none",
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
required: [],
|
|
392
|
+
},
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
name: "get_spring_initializr",
|
|
396
|
+
description: "Liste les options de Spring Initializr (start.spring.io : build, Java, langage, versions de Spring Boot) ou ses dépendances, avec filtre texte sur l'id, le nom ou la description",
|
|
397
|
+
inputSchema: {
|
|
398
|
+
type: "object",
|
|
399
|
+
properties: {
|
|
400
|
+
section: {
|
|
401
|
+
type: "string",
|
|
402
|
+
enum: ["options", "dependencies"],
|
|
403
|
+
description: "Ce qu'il faut lister : les options du projet ou les dépendances disponibles",
|
|
404
|
+
default: "options",
|
|
405
|
+
},
|
|
406
|
+
query: {
|
|
407
|
+
type: "string",
|
|
408
|
+
maxLength: 100,
|
|
409
|
+
description: "Filtre texte sur les dépendances (id, nom, description), ex. 'jpa' ou 'security'. Ignoré pour section=options",
|
|
410
|
+
},
|
|
411
|
+
},
|
|
412
|
+
required: [],
|
|
413
|
+
},
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
name: "find_spring_dependency",
|
|
417
|
+
description: "Trouve les starters Spring correspondant à un besoin (mots-clés en anglais, ex. 'jpa', 'postgres', 'oauth2') et renvoie leurs coordonnées avec des snippets Maven et Gradle prêts à coller, d'après Spring Initializr",
|
|
418
|
+
inputSchema: {
|
|
419
|
+
type: "object",
|
|
420
|
+
properties: {
|
|
421
|
+
need: {
|
|
422
|
+
type: "string",
|
|
423
|
+
maxLength: 100,
|
|
424
|
+
description: "Besoin exprimé en mots-clés anglais (ex. 'jpa', 'postgres driver', 'oauth2 client')",
|
|
425
|
+
},
|
|
426
|
+
build: {
|
|
427
|
+
type: "string",
|
|
428
|
+
enum: ["maven", "gradle", "both"],
|
|
429
|
+
description: "Snippets à produire : Maven, Gradle ou les deux",
|
|
430
|
+
default: "both",
|
|
431
|
+
},
|
|
432
|
+
bootVersion: {
|
|
433
|
+
type: "string",
|
|
434
|
+
maxLength: 20,
|
|
435
|
+
description: "Version de Spring Boot ciblée au format X.Y.Z (ex. '4.0.8') ; par défaut, celle d'Initializr",
|
|
436
|
+
},
|
|
437
|
+
},
|
|
438
|
+
required: ["need"],
|
|
439
|
+
},
|
|
440
|
+
},
|
|
274
441
|
];
|
|
275
442
|
}
|
|
276
443
|
}
|
package/build/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,OAAO,eAAe;IAC1B,MAAM,CAAC,WAAW;QAChB,OAAO;YACL;gBACE,IAAI,EAAE,oBAAoB;gBAC1B,WAAW,EAAE,gEAAgE;gBAC7E,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,KAAK,EAAE;4BACL,IAAI,EAAE,QAAQ;4BACd,WAAW,EAAE,kDAAkD;yBAChE;wBACD,OAAO,EAAE;4BACP,IAAI,EAAE,QAAQ;4BACd,IAAI,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,OAAO,eAAe;IAC1B,MAAM,CAAC,WAAW;QAChB,OAAO;YACL;gBACE,IAAI,EAAE,oBAAoB;gBAC1B,WAAW,EAAE,gEAAgE;gBAC7E,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,KAAK,EAAE;4BACL,IAAI,EAAE,QAAQ;4BACd,SAAS,EAAE,GAAG;4BACd,WAAW,EAAE,kDAAkD;yBAChE;wBACD,OAAO,EAAE;4BACP,IAAI,EAAE,QAAQ;4BACd,IAAI,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,CAAC;4BAC3D,WAAW,EAAE,mNAAmN;4BAChO,OAAO,EAAE,KAAK;yBACf;wBACD,KAAK,EAAE;4BACL,IAAI,EAAE,QAAQ;4BACd,WAAW,EAAE,yCAAyC;4BACtD,OAAO,EAAE,EAAE;4BACX,OAAO,EAAE,CAAC;4BACV,OAAO,EAAE,EAAE;yBACZ;wBACD,OAAO,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E;4BACL,IAAI,EAAE,QAAQ;4BACd,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC;4BACjC,WAAW,EAAE,iDAAiD;4BAC9D,OAAO,EAAE,MAAM;yBAChB;wBACD,WAAW,EAAE;4BACX,IAAI,EAAE,QAAQ;4BACd,SAAS,EAAE,EAAE;4BACb,WAAW,EAAE,8FAA8F;yBAC5G;qBACF;oBACD,QAAQ,EAAE,CAAC,MAAM,CAAC;iBACnB;aACF;SACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validates the raw `arguments` of a tools/call request against the tool's own inputSchema,
|
|
3
|
+
* so the declared schema is the single source of truth. Returns only the declared parameters
|
|
4
|
+
* (unknown ones are dropped); numbers are clamped to [minimum, maximum] and truncated to integers.
|
|
5
|
+
*/
|
|
6
|
+
export declare function validateToolArguments(toolName: string, rawArgs: unknown): Record<string, string | number>;
|
|
7
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAeA;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CA4CzG"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ToolDefinitions } from "./tools/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Validates the raw `arguments` of a tools/call request against the tool's own inputSchema,
|
|
4
|
+
* so the declared schema is the single source of truth. Returns only the declared parameters
|
|
5
|
+
* (unknown ones are dropped); numbers are clamped to [minimum, maximum] and truncated to integers.
|
|
6
|
+
*/
|
|
7
|
+
export function validateToolArguments(toolName, rawArgs) {
|
|
8
|
+
const tool = ToolDefinitions.getToolList().find(t => t.name === toolName);
|
|
9
|
+
if (!tool) {
|
|
10
|
+
throw new Error(`Unknown tool: ${toolName}`);
|
|
11
|
+
}
|
|
12
|
+
if (rawArgs !== undefined && rawArgs !== null && (typeof rawArgs !== "object" || Array.isArray(rawArgs))) {
|
|
13
|
+
throw new Error("Tool arguments must be an object");
|
|
14
|
+
}
|
|
15
|
+
const input = (rawArgs ?? {});
|
|
16
|
+
const required = new Set(tool.inputSchema.required ?? []);
|
|
17
|
+
const validated = {};
|
|
18
|
+
for (const [name, prop] of Object.entries(tool.inputSchema.properties)) {
|
|
19
|
+
const value = input[name];
|
|
20
|
+
if (value === undefined || value === null) {
|
|
21
|
+
if (required.has(name)) {
|
|
22
|
+
throw new Error(`The '${name}' parameter is required`);
|
|
23
|
+
}
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
if (prop.type === "string") {
|
|
27
|
+
if (typeof value !== "string") {
|
|
28
|
+
throw new Error(`The '${name}' parameter must be a string`);
|
|
29
|
+
}
|
|
30
|
+
if (required.has(name) && value.trim() === "") {
|
|
31
|
+
throw new Error(`The '${name}' parameter must not be empty`);
|
|
32
|
+
}
|
|
33
|
+
if (prop.maxLength !== undefined && value.length > prop.maxLength) {
|
|
34
|
+
throw new Error(`The '${name}' parameter is too long (max ${prop.maxLength} characters)`);
|
|
35
|
+
}
|
|
36
|
+
if (prop.enum && !prop.enum.includes(value)) {
|
|
37
|
+
throw new Error(`The '${name}' parameter must be one of: ${prop.enum.join(", ")}`);
|
|
38
|
+
}
|
|
39
|
+
validated[name] = value;
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
43
|
+
throw new Error(`The '${name}' parameter must be a number`);
|
|
44
|
+
}
|
|
45
|
+
validated[name] = Math.min(prop.maximum ?? Infinity, Math.max(prop.minimum ?? -Infinity, Math.trunc(value)));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return validated;
|
|
49
|
+
}
|
|
50
|
+
//# sour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AAC,IAAI,CAAC,OAAO,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC/G,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,OAAO,EAAE,MAAoB,CAAC;AAC3C,eAAO,MAAM,UAAU,QAA+B,CAAC"}
|
package/build/version.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAwB,CAAC;AAE9D,MAAM,CAAC,MAAM,OAAO,GAAW,GAAG,CAAC,OAAO,CAAC;AAC3C,MAAM,CAAC,MAAM,UAAU,GAAG,mBAAmB,OAAO,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enokdev/springdocs-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Enhanced MCP server for Spring Boot and Spring AI documentation with advanced features, intelligent caching, and comprehensive ecosystem coverage",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|
|
@@ -26,9 +26,8 @@
|
|
|
26
26
|
"start": "node build/index.js",
|
|
27
27
|
"dev": "npm run build && node build/index.js",
|
|
28
28
|
"watch": "tsc --watch",
|
|
29
|
+
"test": "npm run build && vitest run",
|
|
29
30
|
"prepublishOnly": "npm run build",
|
|
30
|
-
"test": "bash test.sh",
|
|
31
|
-
"test-npx": "./test-npx.sh",
|
|
32
31
|
"docker:tools": "node scripts/generate-tools-json.js",
|
|
33
32
|
"docker:build": "docker build -t mcp/springdocs-mcp:$(node -p \"require('./package.json').version\") .",
|
|
34
33
|
"install-global": "npm install -g .",
|
|
@@ -65,10 +64,10 @@
|
|
|
65
64
|
"access": "public"
|
|
66
65
|
},
|
|
67
66
|
"engines": {
|
|
68
|
-
"node": ">=18.
|
|
67
|
+
"node": ">=20.18.1"
|
|
69
68
|
},
|
|
70
69
|
"dependencies": {
|
|
71
|
-
"@modelcontextprotocol/sdk": "^
|
|
70
|
+
"@modelcontextprotocol/sdk": "^1.31.0",
|
|
72
71
|
"cheerio": "^1.0.0-rc.12",
|
|
73
72
|
"node-fetch": "^3.3.2",
|
|
74
73
|
"turndown": "^7.2.0"
|
|
@@ -76,6 +75,7 @@
|
|
|
76
75
|
"devDependencies": {
|
|
77
76
|
"@types/node": "^20.0.0",
|
|
78
77
|
"@types/turndown": "^5.0.0",
|
|
79
|
-
"typescript": "^5.3.0"
|
|
78
|
+
"typescript": "^5.3.0",
|
|
79
|
+
"vitest": "^3.2.7"
|
|
80
80
|
}
|
|
81
81
|
}
|
package/build/debug.d.ts
DELETED
package/build/debug.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../src/debug.ts"],"names":[],"mappings":""}
|