@enokdev/springdocs-mcp 1.2.7 → 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 +108 -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 +184 -69
- 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 +19 -9
- package/build/services/advanced-features.d.ts.map +1 -1
- package/build/services/advanced-features.js +266 -191
- 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 +98 -0
- package/build/services/spring-projects-config.d.ts.map +1 -0
- package/build/services/spring-projects-config.js +397 -0
- package/build/services/spring-projects-config.js.map +1 -0
- package/build/services/springboot-docs-optimized.d.ts +72 -21
- package/build/services/springboot-docs-optimized.d.ts.map +1 -1
- package/build/services/springboot-docs-optimized.js +354 -208
- 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 +393 -2
- package/build/tools/index.d.ts.map +1 -1
- package/build/tools/index.js +188 -15
- 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 +9 -7
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,qBAAa,eAAe;IAC1B,MAAM,CAAC,WAAW
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,qBAAa,eAAe;IAC1B,MAAM,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsbnB"}
|
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
|
},
|
|
@@ -109,17 +126,37 @@ export class ToolDefinitions {
|
|
|
109
126
|
},
|
|
110
127
|
{
|
|
111
128
|
name: "get_spring_reference",
|
|
112
|
-
description: "
|
|
129
|
+
description: "Get specific section of Spring reference documentation (supports Spring Boot, Spring AI, Spring Framework, etc.)",
|
|
113
130
|
inputSchema: {
|
|
114
131
|
type: "object",
|
|
115
132
|
properties: {
|
|
133
|
+
project: {
|
|
134
|
+
type: "string",
|
|
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)",
|
|
137
|
+
default: "boot",
|
|
138
|
+
},
|
|
116
139
|
section: {
|
|
117
140
|
type: "string",
|
|
118
|
-
|
|
141
|
+
maxLength: 100,
|
|
142
|
+
description: "Documentation section (e.g., 'web', 'data' for Boot; 'chatclient', 'rag' for AI; 'core', 'web' for Framework)",
|
|
119
143
|
},
|
|
120
144
|
subsection: {
|
|
121
145
|
type: "string",
|
|
122
|
-
|
|
146
|
+
maxLength: 100,
|
|
147
|
+
description: "Optional subsection for more precise navigation",
|
|
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.",
|
|
123
160
|
},
|
|
124
161
|
},
|
|
125
162
|
required: ["section"],
|
|
@@ -127,18 +164,19 @@ export class ToolDefinitions {
|
|
|
127
164
|
},
|
|
128
165
|
{
|
|
129
166
|
name: "search_spring_concepts",
|
|
130
|
-
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)",
|
|
131
168
|
inputSchema: {
|
|
132
169
|
type: "object",
|
|
133
170
|
properties: {
|
|
134
171
|
concept: {
|
|
135
172
|
type: "string",
|
|
173
|
+
maxLength: 200,
|
|
136
174
|
description: "Le concept Spring Boot à rechercher (par exemple: 'auto-configuration', 'profiles', 'actuator')",
|
|
137
175
|
},
|
|
138
|
-
|
|
176
|
+
version: {
|
|
139
177
|
type: "string",
|
|
140
|
-
|
|
141
|
-
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)",
|
|
142
180
|
},
|
|
143
181
|
},
|
|
144
182
|
required: ["concept"],
|
|
@@ -146,18 +184,19 @@ export class ToolDefinitions {
|
|
|
146
184
|
},
|
|
147
185
|
{
|
|
148
186
|
name: "search_spring_ecosystem",
|
|
149
|
-
description: "Search across the entire Spring ecosystem including all projects, guides, and
|
|
187
|
+
description: "Search across the entire Spring ecosystem including all projects, guides, documentation, and Spring AI",
|
|
150
188
|
inputSchema: {
|
|
151
189
|
type: "object",
|
|
152
190
|
properties: {
|
|
153
191
|
query: {
|
|
154
192
|
type: "string",
|
|
193
|
+
maxLength: 200,
|
|
155
194
|
description: "Keywords to search across the entire Spring ecosystem",
|
|
156
195
|
},
|
|
157
196
|
scope: {
|
|
158
197
|
type: "string",
|
|
159
|
-
enum: ["all", "projects", "guides", "docs", "api"],
|
|
160
|
-
description: "Scope of search",
|
|
198
|
+
enum: ["all", "projects", "guides", "docs", "api", "ai"],
|
|
199
|
+
description: "Scope of search (use 'ai' for Spring AI specific searches)",
|
|
161
200
|
default: "all",
|
|
162
201
|
},
|
|
163
202
|
limit: {
|
|
@@ -179,6 +218,7 @@ export class ToolDefinitions {
|
|
|
179
218
|
properties: {
|
|
180
219
|
topic: {
|
|
181
220
|
type: "string",
|
|
221
|
+
maxLength: 200,
|
|
182
222
|
description: "Tutorial topic (e.g., 'rest-api', 'jpa', 'security', 'testing')",
|
|
183
223
|
},
|
|
184
224
|
level: {
|
|
@@ -190,7 +230,7 @@ export class ToolDefinitions {
|
|
|
190
230
|
detail_level: {
|
|
191
231
|
type: "string",
|
|
192
232
|
enum: ["summary", "medium", "full"],
|
|
193
|
-
description: "Content detail: summary (1500 chars), medium (4000 chars), full (
|
|
233
|
+
description: "Content detail: summary (1500 chars), medium (4000 chars), full (50000 chars)",
|
|
194
234
|
default: "medium",
|
|
195
235
|
},
|
|
196
236
|
},
|
|
@@ -205,10 +245,12 @@ export class ToolDefinitions {
|
|
|
205
245
|
properties: {
|
|
206
246
|
version1: {
|
|
207
247
|
type: "string",
|
|
248
|
+
maxLength: 50,
|
|
208
249
|
description: "First Spring Boot version to compare (e.g., '2.7.0')",
|
|
209
250
|
},
|
|
210
251
|
version2: {
|
|
211
252
|
type: "string",
|
|
253
|
+
maxLength: 50,
|
|
212
254
|
description: "Second Spring Boot version to compare (e.g., '3.0.0')",
|
|
213
255
|
},
|
|
214
256
|
focus: {
|
|
@@ -221,6 +263,72 @@ export class ToolDefinitions {
|
|
|
221
263
|
required: ["version1", "version2"],
|
|
222
264
|
},
|
|
223
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
|
+
},
|
|
224
332
|
{
|
|
225
333
|
name: "get_spring_best_practices",
|
|
226
334
|
description: "Get best practices and recommendations for Spring Boot development",
|
|
@@ -250,6 +358,7 @@ export class ToolDefinitions {
|
|
|
250
358
|
properties: {
|
|
251
359
|
error_message: {
|
|
252
360
|
type: "string",
|
|
361
|
+
maxLength: 2000,
|
|
253
362
|
description: "Error message or issue description",
|
|
254
363
|
},
|
|
255
364
|
component: {
|
|
@@ -259,12 +368,76 @@ export class ToolDefinitions {
|
|
|
259
368
|
},
|
|
260
369
|
stack_trace: {
|
|
261
370
|
type: "string",
|
|
371
|
+
maxLength: 10000,
|
|
262
372
|
description: "Stack trace (optional, for more specific diagnosis)",
|
|
263
373
|
},
|
|
264
374
|
},
|
|
265
375
|
required: ["error_message"],
|
|
266
376
|
},
|
|
267
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
|
+
},
|
|
268
441
|
];
|
|
269
442
|
}
|
|
270
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":"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,IAAI,EAAE,uBAAuB;gBAC7B,WAAW,EAAE,mLAAmL;gBAChM,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,OAAO,EAAE;4BACP,IAAI,EAAE,QAAQ;4BACd,IAAI,EAAE,CAAC,SAAS,EAAE,cAAc,CAAC;4BACjC,WAAW,EAAE,6EAA6E;4BAC1F,OAAO,EAAE,SAAS;yBACnB;wBACD,KAAK,EAAE;4BACL,IAAI,EAAE,QAAQ;4BACd,SAAS,EAAE,GAAG;4BACd,WAAW,EAAE,+GAA+G;yBAC7H;qBACF;oBACD,QAAQ,EAAE,EAAE;iBACb;aACF;YACD;gBACE,IAAI,EAAE,wBAAwB;gBAC9B,WAAW,EAAE,uNAAuN;gBACpO,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,IAAI,EAAE;4BACJ,IAAI,EAAE,QAAQ;4BACd,SAAS,EAAE,GAAG;4BACd,WAAW,EAAE,qFAAqF;yBACnG;wBACD,KAAK,EAAE;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
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAenD;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,QAAgB,EAAE,OAAgB;IACtE,MAAM,IAAI,GAAI,eAAe,CAAC,WAAW,EAA8B,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;IACvG,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CAAC,iBAAiB,QAAQ,EAAE,CAAC,CAAC;IAC/C,CAAC;IAED,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK,IAAI,IAAI,CAAC,OAAO,OAAO,KAAK,QAAQ,IAAI,KAAK,CA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gC,IAAI,CAAC,SAAS,cAAc,CAAC,CAAC;YAC5F,CAAC;YACD,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC5C,MAAM,IAAI,KAAK,CAAC,QAAQ,IAAI,+BAA+B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACrF,CAAC;YACD,SAAS,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;QAC1B,CAAC;aAAM,CAAC;YACN,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;gBACzD,MAAM,IAAI,KAAK,CAAC,QAAQ,IAAI,8BAA8B,CAAC,CAAC;YAC9D,CAAC;YACD,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,IAAI,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enokdev/springdocs-mcp",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Enhanced MCP server for
|
|
3
|
+
"version": "1.4.1",
|
|
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",
|
|
7
7
|
"repository": {
|
|
@@ -26,9 +26,10 @@
|
|
|
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
|
-
"
|
|
31
|
-
"
|
|
31
|
+
"docker:tools": "node scripts/generate-tools-json.js",
|
|
32
|
+
"docker:build": "docker build -t mcp/springdocs-mcp:$(node -p \"require('./package.json').version\") .",
|
|
32
33
|
"install-global": "npm install -g .",
|
|
33
34
|
"version:patch": "npm version patch && git push origin main --follow-tags",
|
|
34
35
|
"version:minor": "npm version minor && git push origin main --follow-tags",
|
|
@@ -63,10 +64,10 @@
|
|
|
63
64
|
"access": "public"
|
|
64
65
|
},
|
|
65
66
|
"engines": {
|
|
66
|
-
"node": ">=18.
|
|
67
|
+
"node": ">=20.18.1"
|
|
67
68
|
},
|
|
68
69
|
"dependencies": {
|
|
69
|
-
"@modelcontextprotocol/sdk": "^
|
|
70
|
+
"@modelcontextprotocol/sdk": "^1.31.0",
|
|
70
71
|
"cheerio": "^1.0.0-rc.12",
|
|
71
72
|
"node-fetch": "^3.3.2",
|
|
72
73
|
"turndown": "^7.2.0"
|
|
@@ -74,6 +75,7 @@
|
|
|
74
75
|
"devDependencies": {
|
|
75
76
|
"@types/node": "^20.0.0",
|
|
76
77
|
"@types/turndown": "^5.0.0",
|
|
77
|
-
"typescript": "^5.3.0"
|
|
78
|
+
"typescript": "^5.3.0",
|
|
79
|
+
"vitest": "^3.2.7"
|
|
78
80
|
}
|
|
79
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":""}
|