cwtools-shared 0.1.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.
Files changed (53) hide show
  1. package/dist/generated/mcpTools.d.ts +1112 -0
  2. package/dist/generated/mcpTools.js +1247 -0
  3. package/dist/host/diagnostics.d.ts +41 -0
  4. package/dist/host/diagnostics.js +18 -0
  5. package/dist/host/filesystem.d.ts +18 -0
  6. package/dist/host/filesystem.js +2 -0
  7. package/dist/host/hostServices.d.ts +49 -0
  8. package/dist/host/hostServices.js +2 -0
  9. package/dist/host/indexing.d.ts +54 -0
  10. package/dist/host/indexing.js +2 -0
  11. package/dist/host/lsp.d.ts +8 -0
  12. package/dist/host/lsp.js +27 -0
  13. package/dist/host/readiness.d.ts +11 -0
  14. package/dist/host/readiness.js +71 -0
  15. package/dist/host/vanillaCache.d.ts +12 -0
  16. package/dist/host/vanillaCache.js +56 -0
  17. package/dist/host/vsCodeHostServices.d.ts +27 -0
  18. package/dist/host/vsCodeHostServices.js +30 -0
  19. package/dist/index.d.ts +25 -0
  20. package/dist/index.js +41 -0
  21. package/dist/knowledge/diagnosticRouting.d.ts +13 -0
  22. package/dist/knowledge/diagnosticRouting.js +57 -0
  23. package/dist/knowledge/gameKnowledge.d.ts +20 -0
  24. package/dist/knowledge/gameKnowledge.js +52 -0
  25. package/dist/knowledge/rules.d.ts +162 -0
  26. package/dist/knowledge/rules.js +1383 -0
  27. package/dist/knowledge/workflowHints.d.ts +11 -0
  28. package/dist/knowledge/workflowHints.js +31 -0
  29. package/dist/project/knowledge.d.ts +15 -0
  30. package/dist/project/knowledge.js +209 -0
  31. package/dist/project/profile.d.ts +45 -0
  32. package/dist/project/profile.js +177 -0
  33. package/dist/safety/localisation.d.ts +33 -0
  34. package/dist/safety/localisation.js +105 -0
  35. package/dist/safety/paths.d.ts +21 -0
  36. package/dist/safety/paths.js +122 -0
  37. package/dist/safety/writes.d.ts +3 -0
  38. package/dist/safety/writes.js +19 -0
  39. package/dist/tools/mcpSchema.d.ts +5 -0
  40. package/dist/tools/mcpSchema.js +19 -0
  41. package/dist/tools/names.d.ts +6 -0
  42. package/dist/tools/names.js +51 -0
  43. package/dist/tools/pdxBlock.d.ts +17 -0
  44. package/dist/tools/pdxBlock.js +140 -0
  45. package/dist/tools/registry.d.ts +10 -0
  46. package/dist/tools/registry.js +2 -0
  47. package/dist/tools/schema.d.ts +36 -0
  48. package/dist/tools/schema.js +21 -0
  49. package/dist/tools/symbols.d.ts +60 -0
  50. package/dist/tools/symbols.js +625 -0
  51. package/dist/tools/toolHandlers.d.ts +4 -0
  52. package/dist/tools/toolHandlers.js +291 -0
  53. package/package.json +24 -0
@@ -0,0 +1,1247 @@
1
+ "use strict";
2
+ // Generated by tools/generate-mcp-schema.cjs from client/extension/ai/tools/definitions.ts and registry.ts.
3
+ // Do not edit by hand; run npm run generate:mcp-schema.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.GENERATED_MCP_TOOLS = void 0;
6
+ exports.GENERATED_MCP_TOOLS = [
7
+ {
8
+ "tool": {
9
+ "name": "query_types",
10
+ "description": "Warning: MANDATORY before using any game ID. Query defined instances of a current-game PDXScript type from mod + vanilla cache. PDXscript IDs are routinely hallucinated - always verify through this tool. Set filter to narrow results.",
11
+ "inputSchema": {
12
+ "type": "object",
13
+ "properties": {
14
+ "typeName": {
15
+ "type": "string",
16
+ "description": "Exact current-game type name returned by query_cwt_schema, completion, or another typed LSP result."
17
+ },
18
+ "filter": {
19
+ "type": "string",
20
+ "description": "Prefix or substring filter. ALWAYS use when looking up a specific vanilla ID to avoid unrelated results."
21
+ },
22
+ "limit": {
23
+ "type": "number",
24
+ "description": "Max results to return (default 30, keep low for token efficiency)"
25
+ },
26
+ "vanilla": {
27
+ "type": "boolean",
28
+ "description": "If true, return ONLY vanilla game definitions. If false (default), return mod + vanilla combined."
29
+ }
30
+ },
31
+ "required": [
32
+ "typeName"
33
+ ]
34
+ }
35
+ },
36
+ "registry": {
37
+ "name": "query_types",
38
+ "isWrite": false,
39
+ "isReadOnly": true,
40
+ "effect": "workspace_read",
41
+ "riskLevel": 0,
42
+ "concurrencyClass": "parallel"
43
+ }
44
+ },
45
+ {
46
+ "tool": {
47
+ "name": "query_rules",
48
+ "description": "Query syntax rules for triggers, effects, scope changes, or modifiers from CWT/LSP-backed rule evidence. Returns hardFacts (legal syntax/scopes/push_scope/type filters) plus semanticHints from trigger_docs.log/scopes.cwt comments. Treat semanticHints as search guidance, not proof of legality. Fuzzy-matches if exact name not found.",
49
+ "inputSchema": {
50
+ "type": "object",
51
+ "properties": {
52
+ "category": {
53
+ "type": "string",
54
+ "enum": [
55
+ "trigger",
56
+ "effect",
57
+ "scope_change",
58
+ "modifier"
59
+ ],
60
+ "description": "Rule category"
61
+ },
62
+ "name": {
63
+ "type": "string",
64
+ "description": "Specific rule name (optional, lists all if omitted or returns fuzzy matches if exact miss)"
65
+ },
66
+ "scope": {
67
+ "type": "string",
68
+ "description": "Filter by an exact supported scope returned by query_scope/explain_scope. Optional, but heavily recommended."
69
+ }
70
+ },
71
+ "required": [
72
+ "category"
73
+ ]
74
+ }
75
+ },
76
+ "registry": {
77
+ "name": "query_rules",
78
+ "isWrite": false,
79
+ "isReadOnly": true,
80
+ "effect": "workspace_read",
81
+ "riskLevel": 0,
82
+ "concurrencyClass": "parallel"
83
+ }
84
+ },
85
+ {
86
+ "tool": {
87
+ "name": "query_cwt_schema",
88
+ "description": "CWT-FIRST schema lookup for entity definitions and other non-trigger/effect rules. Use BEFORE writing or planning a PDXScript target. Pass the actual project file/directory plus an optional field/rule name. Returns active CWT source snippets, line numbers, and parsed type/path/subtype entity summaries. If snippets are structural only, confirm intent from verified current-version examples.",
89
+ "inputSchema": {
90
+ "type": "object",
91
+ "properties": {
92
+ "target": {
93
+ "type": "string",
94
+ "description": "Actual project file/directory or a CWT-relative path returned by active schema metadata."
95
+ },
96
+ "file": {
97
+ "type": "string",
98
+ "description": "Alias for target when you have a concrete project file path."
99
+ },
100
+ "directory": {
101
+ "type": "string",
102
+ "description": "Alias for target when an active project/schema result supplied the entity directory."
103
+ },
104
+ "name": {
105
+ "type": "string",
106
+ "description": "Optional field, type, alias, or rule name to locate inside matched CWT files."
107
+ },
108
+ "includeContent": {
109
+ "type": "boolean",
110
+ "description": "If true, return a larger excerpt from matched schema files. Default false."
111
+ },
112
+ "limit": {
113
+ "type": "number",
114
+ "description": "Maximum CWT files to return. Default 5, max 20."
115
+ }
116
+ },
117
+ "required": []
118
+ }
119
+ },
120
+ "registry": {
121
+ "name": "query_cwt_schema",
122
+ "isWrite": false,
123
+ "isReadOnly": true,
124
+ "effect": "workspace_read",
125
+ "riskLevel": 0,
126
+ "concurrencyClass": "parallel"
127
+ }
128
+ },
129
+ {
130
+ "tool": {
131
+ "name": "search_rule_capabilities",
132
+ "description": "Search CWT/LSP rule evidence by intent and scope capability instead of guessing a rule name. Use this when you know what you want to do but do not know the exact trigger/effect/scope_change name. Returns ranked candidates with hardFacts and semanticHints; validate the selected rule before writing.",
133
+ "inputSchema": {
134
+ "type": "object",
135
+ "properties": {
136
+ "intent": {
137
+ "type": "string",
138
+ "description": "Natural-language intent. Exact current-game terms from CWT docs improve ranking."
139
+ },
140
+ "category": {
141
+ "type": "string",
142
+ "enum": [
143
+ "trigger",
144
+ "effect",
145
+ "scope_change",
146
+ "modifier",
147
+ "all"
148
+ ],
149
+ "description": "Optional CWT rule category filter."
150
+ },
151
+ "currentScope": {
152
+ "type": "string",
153
+ "description": "Optional exact current CWT scope returned by query_scope."
154
+ },
155
+ "desiredPushScope": {
156
+ "type": "string",
157
+ "description": "Optional exact resulting scope returned by explain_scope/schema evidence."
158
+ },
159
+ "limit": {
160
+ "type": "number",
161
+ "description": "Maximum candidates to return. Default 10, max 50."
162
+ }
163
+ },
164
+ "required": []
165
+ }
166
+ },
167
+ "registry": {
168
+ "name": "search_rule_capabilities",
169
+ "isWrite": false,
170
+ "isReadOnly": true,
171
+ "effect": "workspace_read",
172
+ "riskLevel": 0,
173
+ "concurrencyClass": "parallel"
174
+ }
175
+ },
176
+ {
177
+ "tool": {
178
+ "name": "explain_scope",
179
+ "description": "Explain a current CWT scope from scopes.cwt, including aliases, is_subscope_of, source location, and semantic hints. Scope descriptions are hints, not legality proof.",
180
+ "inputSchema": {
181
+ "type": "object",
182
+ "properties": {
183
+ "scope": {
184
+ "type": "string",
185
+ "description": "Exact scope or alias observed in current CWT/LSP output."
186
+ }
187
+ },
188
+ "required": [
189
+ "scope"
190
+ ]
191
+ }
192
+ },
193
+ "registry": {
194
+ "name": "explain_scope",
195
+ "isWrite": false,
196
+ "isReadOnly": true,
197
+ "effect": "workspace_read",
198
+ "riskLevel": 0,
199
+ "concurrencyClass": "parallel"
200
+ }
201
+ },
202
+ {
203
+ "tool": {
204
+ "name": "parse_pdx_fragment",
205
+ "description": "Parse a PDXScript fragment through the CWTools language server without writing a file. Use this for quick syntax, brace, and recovery checks after selecting rules. This is not a full semantic validation substitute; final project edits still need get_diagnostics/completions or verified examples.",
206
+ "inputSchema": {
207
+ "type": "object",
208
+ "properties": {
209
+ "code": {
210
+ "type": "string",
211
+ "description": "PDXScript fragment text to parse."
212
+ }
213
+ },
214
+ "required": [
215
+ "code"
216
+ ]
217
+ }
218
+ },
219
+ "registry": {
220
+ "name": "parse_pdx_fragment",
221
+ "isWrite": false,
222
+ "isReadOnly": true,
223
+ "effect": "workspace_read",
224
+ "riskLevel": 0,
225
+ "concurrencyClass": "parallel"
226
+ }
227
+ },
228
+ {
229
+ "tool": {
230
+ "name": "query_scope",
231
+ "description": "Query the scope context at a specific position in a file. Returns current/root/prior scope chains plus provenance and inference evidence reported by CWTools. Use it to determine which active CWT rules are valid at that position.",
232
+ "inputSchema": {
233
+ "type": "object",
234
+ "properties": {
235
+ "file": {
236
+ "type": "string",
237
+ "description": "Absolute file path"
238
+ },
239
+ "line": {
240
+ "type": "number",
241
+ "description": "Line number (0-based)"
242
+ },
243
+ "column": {
244
+ "type": "number",
245
+ "description": "Column number (0-based)"
246
+ }
247
+ },
248
+ "required": [
249
+ "file",
250
+ "line",
251
+ "column"
252
+ ]
253
+ }
254
+ },
255
+ "registry": {
256
+ "name": "query_scope",
257
+ "isWrite": false,
258
+ "isReadOnly": true,
259
+ "effect": "workspace_read",
260
+ "riskLevel": 0,
261
+ "concurrencyClass": "parallel"
262
+ }
263
+ },
264
+ {
265
+ "tool": {
266
+ "name": "get_diagnostics",
267
+ "description": "Get errors, warnings, information, and hints from the VS Code Problems diagnostics snapshot, optionally filtered by file and severity. Returns totals and truncation metadata; check truncated before treating the returned list as complete.",
268
+ "inputSchema": {
269
+ "type": "object",
270
+ "properties": {
271
+ "file": {
272
+ "type": "string",
273
+ "description": "Optional: restrict to a specific file path (absolute) or a path substring to match. Leave empty to get all workspace diagnostics."
274
+ },
275
+ "severity": {
276
+ "type": "string",
277
+ "enum": [
278
+ "error",
279
+ "warning",
280
+ "info",
281
+ "hint",
282
+ "all"
283
+ ],
284
+ "description": "Filter by severity. Default: \"all\""
285
+ },
286
+ "limit": {
287
+ "type": "number",
288
+ "description": "Max diagnostics to return (default 500, max 2000). For full project reviews, omit this parameter to get all diagnostics. Only set a low limit when you want a quick summary."
289
+ }
290
+ },
291
+ "required": []
292
+ }
293
+ },
294
+ "registry": {
295
+ "name": "get_diagnostics",
296
+ "isWrite": false,
297
+ "isReadOnly": true,
298
+ "effect": "workspace_read",
299
+ "riskLevel": 0,
300
+ "concurrencyClass": "lsp-limited"
301
+ }
302
+ },
303
+ {
304
+ "tool": {
305
+ "name": "analyze_diagnostic_error",
306
+ "description": "Classify an existing diagnostic or tool/write failure and return routing advice. Use after a write, validation, ReadTracker, or tool-argument failure. Prefer passing diagnosticsSnapshot/toolResult from get_diagnostics or a write tool so this does not re-query diagnostics. When a concrete identifier/sprite/sound/localisation key appears, the result tells the agent to verify it against project + vanilla sources; when LSP has no feedback, it avoids blind searches.",
307
+ "inputSchema": {
308
+ "type": "object",
309
+ "properties": {
310
+ "file": {
311
+ "type": "string",
312
+ "description": "Optional file where the diagnostic or failed tool operation occurred. Used only to scope a fallback get_diagnostics call if no snapshot is supplied."
313
+ },
314
+ "errorCode": {
315
+ "type": "string",
316
+ "description": "Optional diagnostic code or compact error message."
317
+ },
318
+ "message": {
319
+ "type": "string",
320
+ "description": "Optional raw failure message from a tool or validation step."
321
+ },
322
+ "previousAttempt": {
323
+ "type": "string",
324
+ "description": "Optional summary of the last attempted fix. Helps detect repeated blind retries."
325
+ },
326
+ "toolName": {
327
+ "type": "string",
328
+ "description": "Optional name of the tool that failed, e.g. edit_file, write_localisation, get_diagnostics."
329
+ },
330
+ "diagnosticsSnapshot": {
331
+ "type": "object",
332
+ "description": "Optional raw get_diagnostics result, write-tool diagnostics payload, or compact diagnostic object to classify without querying diagnostics again."
333
+ },
334
+ "toolResult": {
335
+ "type": "object",
336
+ "description": "Optional raw failed tool result to classify without querying diagnostics again."
337
+ },
338
+ "reflection": {
339
+ "type": "string",
340
+ "description": "Optional legacy free-form analysis from the model. Kept for backward compatibility; the host still returns deterministic routing advice."
341
+ }
342
+ },
343
+ "required": []
344
+ }
345
+ },
346
+ "registry": {
347
+ "name": "analyze_diagnostic_error",
348
+ "isWrite": false,
349
+ "isReadOnly": true,
350
+ "effect": "none",
351
+ "riskLevel": 2,
352
+ "concurrencyClass": "global-exclusive"
353
+ }
354
+ },
355
+ {
356
+ "tool": {
357
+ "name": "query_project_profile",
358
+ "description": "Read the /init-generated Agent project profile from .cwtools/project/profile.json. Use this before broad scans to get workspace type, key directories, localisation languages/encoding, namespaces, workflow routing, validation hints, and mode-specific prompt cards.",
359
+ "inputSchema": {
360
+ "type": "object",
361
+ "properties": {
362
+ "section": {
363
+ "type": "string",
364
+ "enum": [
365
+ "summary",
366
+ "routing",
367
+ "directories",
368
+ "localisation",
369
+ "identifiers",
370
+ "validation",
371
+ "promptCards",
372
+ "all"
373
+ ],
374
+ "description": "Targeted profile section to return. Default summary. Use all only when you need the whole profile."
375
+ },
376
+ "mode": {
377
+ "type": "string",
378
+ "enum": [
379
+ "build",
380
+ "plan",
381
+ "explore",
382
+ "general",
383
+ "utility",
384
+ "review",
385
+ "gui_expert",
386
+ "script_reviewer",
387
+ "loc_translator",
388
+ "loc_writer",
389
+ "orchestrator",
390
+ "script",
391
+ "asset"
392
+ ],
393
+ "description": "Optional mode card to return, e.g. build, plan, loc_writer, asset, orchestrator, script."
394
+ }
395
+ },
396
+ "required": []
397
+ }
398
+ },
399
+ "registry": {
400
+ "name": "query_project_profile",
401
+ "isWrite": false,
402
+ "isReadOnly": true,
403
+ "effect": "workspace_read",
404
+ "riskLevel": 0,
405
+ "concurrencyClass": "parallel"
406
+ }
407
+ },
408
+ {
409
+ "tool": {
410
+ "name": "query_project_knowledge",
411
+ "description": "Query the /init-generated project + vanilla SQLite knowledge graph for complex cross-subsystem work. Returns project patterns, bounded vanilla archetypes, definition stacks, dependency edges, typed relationship structure/logic, freshness, and unresolved facts with source paths. Use this before write_design_blueprint or any plan spanning multiple current-game entity families. CWT/LSP exact checks remain authoritative.",
412
+ "inputSchema": {
413
+ "type": "object",
414
+ "properties": {
415
+ "intent": {
416
+ "type": "string",
417
+ "description": "Concise design or investigation intent used to rank evidence."
418
+ },
419
+ "domains": {
420
+ "type": "array",
421
+ "items": {
422
+ "type": "string"
423
+ },
424
+ "description": "Subsystem domains returned by the project knowledge manifest or an earlier query."
425
+ },
426
+ "identifiers": {
427
+ "type": "array",
428
+ "items": {
429
+ "type": "string"
430
+ },
431
+ "description": "Known or proposed IDs used as indexed graph seeds. Exact IDs and stable prefixes give the fastest, most accurate retrieval."
432
+ },
433
+ "entityTypes": {
434
+ "type": "array",
435
+ "items": {
436
+ "type": "string"
437
+ },
438
+ "description": "CWTools entity types to prioritize."
439
+ },
440
+ "includeProjectPatterns": {
441
+ "type": "boolean",
442
+ "description": "Include existing workspace examples. Default true."
443
+ },
444
+ "includeVanillaArchetypes": {
445
+ "type": "boolean",
446
+ "description": "Include bounded vanilla examples with exact sources. Default true."
447
+ },
448
+ "includeTopology": {
449
+ "type": "boolean",
450
+ "description": "Include project dependency/reference edges. Default true."
451
+ },
452
+ "includeUnresolved": {
453
+ "type": "boolean",
454
+ "description": "Include ambiguous definition stacks and snapshot warnings. Default true."
455
+ },
456
+ "includeEventGraph": {
457
+ "type": "boolean",
458
+ "description": "Include event nodes, structural call/entry edges, and state/scope logic relations. Default true."
459
+ },
460
+ "limit": {
461
+ "type": "number",
462
+ "minimum": 1,
463
+ "maximum": 300,
464
+ "description": "Maximum ranked evidence records. Default 80."
465
+ }
466
+ },
467
+ "required": []
468
+ }
469
+ },
470
+ "registry": {
471
+ "name": "query_project_knowledge",
472
+ "isWrite": false,
473
+ "isReadOnly": true,
474
+ "effect": "workspace_read",
475
+ "riskLevel": 0,
476
+ "concurrencyClass": "parallel"
477
+ }
478
+ },
479
+ {
480
+ "tool": {
481
+ "name": "query_workspace_index",
482
+ "description": "Query the shared incremental workspace index for PDXScript symbols and named .gfx/.asset/.gui assets without scanning files. Use this before broad grep/search for any named project symbol. Results report indexedSymbolNames, indexUpdatedAt, fileVersion, and optional lightweight references for freshness/coverage awareness.",
483
+ "inputSchema": {
484
+ "type": "object",
485
+ "properties": {
486
+ "name": {
487
+ "type": "string",
488
+ "description": "Exact, prefix, or substring symbol/asset name to search for."
489
+ },
490
+ "kind": {
491
+ "type": "string",
492
+ "description": "Optional exact kind returned by the active index or CWT type metadata."
493
+ },
494
+ "category": {
495
+ "type": "string",
496
+ "description": "Optional broad category returned by an earlier index result."
497
+ },
498
+ "source": {
499
+ "type": "string",
500
+ "enum": [
501
+ "script",
502
+ "asset",
503
+ "gui"
504
+ ],
505
+ "description": "Optional source filter. script=.txt, asset=.gfx/.asset, gui=.gui."
506
+ },
507
+ "origin": {
508
+ "type": "string",
509
+ "enum": [
510
+ "workspace",
511
+ "vanilla",
512
+ "both"
513
+ ],
514
+ "description": "Optional origin filter. workspace=mod files, vanilla=configured game cache, both/default=combined."
515
+ },
516
+ "directory": {
517
+ "type": "string",
518
+ "description": "Optional project path fragment; prefer a path returned by project profile or CWT schema."
519
+ },
520
+ "prefix": {
521
+ "type": "boolean",
522
+ "description": "If true, name is treated as a prefix. Default false."
523
+ },
524
+ "exact": {
525
+ "type": "boolean",
526
+ "description": "If true, name must match exactly. Default false."
527
+ },
528
+ "includeReferences": {
529
+ "type": "boolean",
530
+ "description": "If true, include lightweight cross-file reference contexts captured by the index. Default false."
531
+ },
532
+ "limit": {
533
+ "type": "number",
534
+ "description": "Maximum entries to return. Default 50, max 200."
535
+ }
536
+ },
537
+ "required": []
538
+ }
539
+ },
540
+ "registry": {
541
+ "name": "query_workspace_index",
542
+ "isWrite": false,
543
+ "isReadOnly": true,
544
+ "effect": "workspace_read",
545
+ "riskLevel": 0,
546
+ "concurrencyClass": "parallel"
547
+ }
548
+ },
549
+ {
550
+ "tool": {
551
+ "name": "explore_pdx_project",
552
+ "description": "Primary semantic exploration entry point for large Paradox projects. Queries the live CWTools type/reference graph and returns bounded entry points, typed nodes, dependency edges, file facts, provenance, truncation, and freshness without scanning or reading whole files. Use this FIRST for questions such as how an entity is connected, what calls or references an ID, what a file depends on, or what may be affected by a change. Follow with exact query_rules/query_scope/query_types/get_pdx_block checks before writing.",
553
+ "inputSchema": {
554
+ "type": "object",
555
+ "properties": {
556
+ "query": {
557
+ "type": "string",
558
+ "description": "Identifier or concise semantic search text. Exact PDX IDs give the strongest results. Optional when file or typeName is supplied."
559
+ },
560
+ "file": {
561
+ "type": "string",
562
+ "description": "Optional workspace-relative or absolute file path used to restrict entry points."
563
+ },
564
+ "typeName": {
565
+ "type": "string",
566
+ "description": "Optional exact CWTools type name obtained from active schema/type evidence."
567
+ },
568
+ "exact": {
569
+ "type": "boolean",
570
+ "description": "Require query to exactly match an entity ID. Default false."
571
+ },
572
+ "depth": {
573
+ "type": "number",
574
+ "minimum": 0,
575
+ "maximum": 3,
576
+ "description": "Incoming/outgoing graph traversal depth. Default 1; use 2-3 only for focused IDs."
577
+ },
578
+ "maxNodes": {
579
+ "type": "number",
580
+ "minimum": 1,
581
+ "maximum": 100,
582
+ "description": "Maximum graph nodes. Default 30."
583
+ },
584
+ "maxEdges": {
585
+ "type": "number",
586
+ "minimum": 1,
587
+ "maximum": 300,
588
+ "description": "Maximum graph edges and per-file semantic facts. Default 80."
589
+ },
590
+ "includeMetadata": {
591
+ "type": "boolean",
592
+ "description": "Include documentation, variables, event targets, and block metadata. Default true."
593
+ }
594
+ },
595
+ "required": []
596
+ }
597
+ },
598
+ "registry": {
599
+ "name": "explore_pdx_project",
600
+ "isWrite": false,
601
+ "isReadOnly": true,
602
+ "effect": "workspace_read",
603
+ "riskLevel": 0,
604
+ "concurrencyClass": "lsp-limited"
605
+ }
606
+ },
607
+ {
608
+ "tool": {
609
+ "name": "query_localisation_index",
610
+ "description": "Query the shared incremental localisation index for mod YML keys without scanning files. Use this before creating or updating localisation keys, and when checking whether a key already exists.",
611
+ "inputSchema": {
612
+ "type": "object",
613
+ "properties": {
614
+ "key": {
615
+ "type": "string",
616
+ "description": "Exact key, prefix, or substring to search for."
617
+ },
618
+ "language": {
619
+ "type": "string",
620
+ "description": "Optional language tag returned by the active project/profile localisation metadata."
621
+ },
622
+ "prefix": {
623
+ "type": "boolean",
624
+ "description": "If true, key is treated as a prefix. Default false."
625
+ },
626
+ "contains": {
627
+ "type": "boolean",
628
+ "description": "If true, key is treated as a case-insensitive substring. Useful when you only know part of a localisation key."
629
+ },
630
+ "caseSensitive": {
631
+ "type": "boolean",
632
+ "description": "Only applies to prefix/contains searches. Default false."
633
+ },
634
+ "limit": {
635
+ "type": "number",
636
+ "description": "Maximum entries to return. Default 20, max 100."
637
+ }
638
+ },
639
+ "required": []
640
+ }
641
+ },
642
+ "registry": {
643
+ "name": "query_localisation_index",
644
+ "isWrite": false,
645
+ "isReadOnly": true,
646
+ "effect": "workspace_read",
647
+ "riskLevel": 0,
648
+ "concurrencyClass": "parallel"
649
+ }
650
+ },
651
+ {
652
+ "tool": {
653
+ "name": "get_pdx_block",
654
+ "description": "Extract exactly one complete AST block by symbol name. Works with .txt (events, common), .gui (containerWindowType by name), and .gfx (pdxmesh by name). Returns 1-based startLine/endLine that can be passed directly to replace_lines. If the symbol is not found, the error response includes a full list of available symbols with line ranges so you can retry with the correct name.",
655
+ "inputSchema": {
656
+ "type": "object",
657
+ "properties": {
658
+ "file": {
659
+ "type": "string",
660
+ "description": "Absolute file path"
661
+ },
662
+ "symbol": {
663
+ "type": "string",
664
+ "description": "Exact symbol returned by document_symbols or another active typed lookup. If not found, the error lists available symbols and line ranges."
665
+ }
666
+ },
667
+ "required": [
668
+ "file",
669
+ "symbol"
670
+ ]
671
+ }
672
+ },
673
+ "registry": {
674
+ "name": "get_pdx_block",
675
+ "isWrite": false,
676
+ "isReadOnly": true,
677
+ "effect": "workspace_read",
678
+ "riskLevel": 0,
679
+ "concurrencyClass": "parallel"
680
+ }
681
+ },
682
+ {
683
+ "tool": {
684
+ "name": "get_completion_at",
685
+ "description": "Get auto-completion suggestions and bounded context at a specific position through the active VS Code language provider. In Paradox projects, CWTools may enrich the result with game-aware scope and schema context.",
686
+ "inputSchema": {
687
+ "type": "object",
688
+ "properties": {
689
+ "file": {
690
+ "type": "string",
691
+ "description": "Absolute file path (must be in the workspace)"
692
+ },
693
+ "line": {
694
+ "type": "number",
695
+ "description": "Line number (0-based)"
696
+ },
697
+ "column": {
698
+ "type": "number",
699
+ "description": "Column number (0-based)"
700
+ },
701
+ "limit": {
702
+ "type": "number",
703
+ "description": "Max completions to return (default 30). Increase if you need to see more options."
704
+ }
705
+ },
706
+ "required": [
707
+ "file",
708
+ "line",
709
+ "column"
710
+ ]
711
+ }
712
+ },
713
+ "registry": {
714
+ "name": "get_completion_at",
715
+ "isWrite": false,
716
+ "isReadOnly": true,
717
+ "effect": "workspace_read",
718
+ "riskLevel": 0,
719
+ "concurrencyClass": "parallel"
720
+ }
721
+ },
722
+ {
723
+ "tool": {
724
+ "name": "document_symbols",
725
+ "description": "Get symbols defined in a file as a hierarchical tree with 0-based line ranges from the active VS Code language provider. Use this first to understand file structure before choosing targeted reads.",
726
+ "inputSchema": {
727
+ "type": "object",
728
+ "properties": {
729
+ "file": {
730
+ "type": "string",
731
+ "description": "Absolute file path"
732
+ }
733
+ },
734
+ "required": [
735
+ "file"
736
+ ]
737
+ }
738
+ },
739
+ "registry": {
740
+ "name": "document_symbols",
741
+ "isWrite": false,
742
+ "isReadOnly": true,
743
+ "effect": "workspace_read",
744
+ "riskLevel": 0,
745
+ "concurrencyClass": "lsp-limited"
746
+ }
747
+ },
748
+ {
749
+ "tool": {
750
+ "name": "workspace_symbols",
751
+ "description": "Search symbol definitions by name through active VS Code workspace symbol providers. Use a specific query. Empty results may reflect provider coverage or indexing state and are not proof that text is absent from the repository.",
752
+ "inputSchema": {
753
+ "type": "object",
754
+ "properties": {
755
+ "query": {
756
+ "type": "string",
757
+ "description": "Symbol name or partial name to search for. Be specific to avoid large result sets."
758
+ },
759
+ "limit": {
760
+ "type": "number",
761
+ "description": "Max results (default 20; keep low for broad searches to avoid token waste)."
762
+ }
763
+ },
764
+ "required": [
765
+ "query"
766
+ ]
767
+ }
768
+ },
769
+ "registry": {
770
+ "name": "workspace_symbols",
771
+ "isWrite": false,
772
+ "isReadOnly": true,
773
+ "effect": "workspace_read",
774
+ "riskLevel": 0,
775
+ "concurrencyClass": "lsp-limited"
776
+ }
777
+ },
778
+ {
779
+ "tool": {
780
+ "name": "query_definition",
781
+ "description": "GoToDefinition at a position, or FindAllRefs if no definition exists. Uses CWTools AST - faster than grep. If you know the symbol name, prefer query_definition_by_name instead.",
782
+ "inputSchema": {
783
+ "type": "object",
784
+ "properties": {
785
+ "file": {
786
+ "type": "string",
787
+ "description": "Absolute file path"
788
+ },
789
+ "line": {
790
+ "type": "number",
791
+ "description": "Line number (0-based)"
792
+ },
793
+ "column": {
794
+ "type": "number",
795
+ "description": "Column number (0-based)"
796
+ }
797
+ },
798
+ "required": [
799
+ "file",
800
+ "line",
801
+ "column"
802
+ ]
803
+ }
804
+ },
805
+ "registry": {
806
+ "name": "query_definition",
807
+ "isWrite": false,
808
+ "isReadOnly": true,
809
+ "effect": "workspace_read",
810
+ "riskLevel": 0,
811
+ "concurrencyClass": "lsp-limited"
812
+ }
813
+ },
814
+ {
815
+ "tool": {
816
+ "name": "query_definition_by_name",
817
+ "description": "Find where a named symbol is defined - no file/position needed. Returns file path and line number. Works for any top-level PDXScript key (events, triggers, effects, etc.).",
818
+ "inputSchema": {
819
+ "type": "object",
820
+ "properties": {
821
+ "symbolName": {
822
+ "type": "string",
823
+ "description": "The exact name of the symbol to find (e.g. \"kuat_has_psionic_research\", \"distar.001\")"
824
+ }
825
+ },
826
+ "required": [
827
+ "symbolName"
828
+ ]
829
+ }
830
+ },
831
+ "registry": {
832
+ "name": "query_definition_by_name",
833
+ "isWrite": false,
834
+ "isReadOnly": true,
835
+ "effect": "workspace_read",
836
+ "riskLevel": 0,
837
+ "concurrencyClass": "parallel"
838
+ }
839
+ },
840
+ {
841
+ "tool": {
842
+ "name": "query_references",
843
+ "description": "Find references to an identifier through the active language provider, with a bounded workspace text-search fallback.",
844
+ "inputSchema": {
845
+ "type": "object",
846
+ "properties": {
847
+ "identifier": {
848
+ "type": "string",
849
+ "description": "The identifier to search for"
850
+ },
851
+ "file": {
852
+ "type": "string",
853
+ "description": "Optional file to limit search to"
854
+ }
855
+ },
856
+ "required": [
857
+ "identifier"
858
+ ]
859
+ }
860
+ },
861
+ "registry": {
862
+ "name": "query_references",
863
+ "isWrite": false,
864
+ "isReadOnly": true,
865
+ "effect": "workspace_read",
866
+ "riskLevel": 0,
867
+ "concurrencyClass": "lsp-limited"
868
+ }
869
+ },
870
+ {
871
+ "tool": {
872
+ "name": "query_scripted_effects",
873
+ "description": "Warning: MANDATORY before using any scripted_effect. Lists all scripted effects with name, scope constraints, and type. PDXscript effect names are frequently hallucinated - always verify here first.",
874
+ "inputSchema": {
875
+ "type": "object",
876
+ "properties": {
877
+ "filter": {
878
+ "type": "string",
879
+ "description": "Optional substring filter on effect name. Without filter, results are limited to 50; with filter, up to 200."
880
+ },
881
+ "limit": {
882
+ "type": "number",
883
+ "description": "Max results (default 50 without filter, 200 with filter)"
884
+ }
885
+ },
886
+ "required": []
887
+ }
888
+ },
889
+ "registry": {
890
+ "name": "query_scripted_effects",
891
+ "isWrite": false,
892
+ "isReadOnly": true,
893
+ "effect": "workspace_read",
894
+ "riskLevel": 0,
895
+ "concurrencyClass": "parallel"
896
+ }
897
+ },
898
+ {
899
+ "tool": {
900
+ "name": "query_scripted_triggers",
901
+ "description": "Warning: MANDATORY before using any scripted_trigger. Lists all scripted triggers with name, scope constraints, and type. Trigger names are frequently hallucinated - always verify here first.",
902
+ "inputSchema": {
903
+ "type": "object",
904
+ "properties": {
905
+ "filter": {
906
+ "type": "string",
907
+ "description": "Optional substring filter on trigger name. Without filter, results are limited to 50; with filter, up to 200."
908
+ },
909
+ "limit": {
910
+ "type": "number",
911
+ "description": "Max results (default 50 without filter, 200 with filter)"
912
+ }
913
+ },
914
+ "required": []
915
+ }
916
+ },
917
+ "registry": {
918
+ "name": "query_scripted_triggers",
919
+ "isWrite": false,
920
+ "isReadOnly": true,
921
+ "effect": "workspace_read",
922
+ "riskLevel": 0,
923
+ "concurrencyClass": "parallel"
924
+ }
925
+ },
926
+ {
927
+ "tool": {
928
+ "name": "query_enums",
929
+ "description": "Warning: MANDATORY before using any enum field. Query enum values from CWTools rules. Call with no enumName to list all enums, then query specific enum for values. Always verify - enum values are domain-specific.",
930
+ "inputSchema": {
931
+ "type": "object",
932
+ "properties": {
933
+ "enumName": {
934
+ "type": "string",
935
+ "description": "Exact enum name discovered from CWT/schema evidence. Leave empty to list all enum names."
936
+ },
937
+ "limit": {
938
+ "type": "number",
939
+ "description": "Max values to return (default 500)"
940
+ }
941
+ },
942
+ "required": []
943
+ }
944
+ },
945
+ "registry": {
946
+ "name": "query_enums",
947
+ "isWrite": false,
948
+ "isReadOnly": true,
949
+ "effect": "workspace_read",
950
+ "riskLevel": 0,
951
+ "concurrencyClass": "parallel"
952
+ }
953
+ },
954
+ {
955
+ "tool": {
956
+ "name": "query_static_modifiers",
957
+ "description": "Warning: MANDATORY before using add_modifier. Lists static modifiers with categories. Modifier names are domain-specific - always verify. Dynamic/engine modifiers may not appear here - use query_rules(category=\"modifier\") as fallback.",
958
+ "inputSchema": {
959
+ "type": "object",
960
+ "properties": {
961
+ "filter": {
962
+ "type": "string",
963
+ "description": "Optional substring filter on modifier tag"
964
+ },
965
+ "limit": {
966
+ "type": "number",
967
+ "description": "Max results (default 300)"
968
+ }
969
+ },
970
+ "required": []
971
+ }
972
+ },
973
+ "registry": {
974
+ "name": "query_static_modifiers",
975
+ "isWrite": false,
976
+ "isReadOnly": true,
977
+ "effect": "workspace_read",
978
+ "riskLevel": 0,
979
+ "concurrencyClass": "parallel"
980
+ }
981
+ },
982
+ {
983
+ "tool": {
984
+ "name": "query_variables",
985
+ "description": "List all scripted variables (@variable_name = value) defined across the mod and vanilla. Use this to look up numeric constant values defined with @-prefix before using them in generated code.",
986
+ "inputSchema": {
987
+ "type": "object",
988
+ "properties": {
989
+ "filter": {
990
+ "type": "string",
991
+ "description": "Optional substring filter on variable name"
992
+ }
993
+ },
994
+ "required": []
995
+ }
996
+ },
997
+ "registry": {
998
+ "name": "query_variables",
999
+ "isWrite": false,
1000
+ "isReadOnly": true,
1001
+ "effect": "workspace_read",
1002
+ "riskLevel": 0,
1003
+ "concurrencyClass": "parallel"
1004
+ }
1005
+ },
1006
+ {
1007
+ "tool": {
1008
+ "name": "get_entity_info",
1009
+ "description": "Get deep structural info from the CWTools cache, including referenced types, variables, classified rule blocks, and saved scopes. Use it to understand file dependencies before modification.",
1010
+ "inputSchema": {
1011
+ "type": "object",
1012
+ "properties": {
1013
+ "file": {
1014
+ "type": "string",
1015
+ "description": "Absolute file path (must be a parsed mod file)"
1016
+ }
1017
+ },
1018
+ "required": [
1019
+ "file"
1020
+ ]
1021
+ }
1022
+ },
1023
+ "registry": {
1024
+ "name": "get_entity_info",
1025
+ "isWrite": false,
1026
+ "isReadOnly": true,
1027
+ "effect": "workspace_read",
1028
+ "riskLevel": 0,
1029
+ "concurrencyClass": "parallel"
1030
+ }
1031
+ },
1032
+ {
1033
+ "tool": {
1034
+ "name": "query_shader_symbol",
1035
+ "description": "Read-only. Query declared Paradox shader symbols (Effects, MainCode stages, constant buffers, render states) from the CWTools shader model across mod, dependencies, and vanilla. Effect entries carry a reachability classification: engine_or_unreferenced means reachability is UNKNOWN, not dead code - never treat it as safe to delete. Page with cursor when nextCursor is non-null.",
1036
+ "inputSchema": {
1037
+ "type": "object",
1038
+ "properties": {
1039
+ "filter": {
1040
+ "type": "string",
1041
+ "description": "Optional case-insensitive substring filter on the symbol name."
1042
+ },
1043
+ "kind": {
1044
+ "type": "string",
1045
+ "enum": [
1046
+ "all",
1047
+ "effect",
1048
+ "maincode",
1049
+ "constantbuffer",
1050
+ "state"
1051
+ ],
1052
+ "description": "Symbol kind filter. Default all."
1053
+ },
1054
+ "limit": {
1055
+ "type": "number",
1056
+ "description": "Max results to return (1-500, default 100)."
1057
+ },
1058
+ "cursor": {
1059
+ "type": "number",
1060
+ "description": "Numeric offset returned as nextCursor by a previous call. Default 0."
1061
+ }
1062
+ },
1063
+ "required": []
1064
+ }
1065
+ },
1066
+ "registry": {
1067
+ "name": "query_shader_symbol",
1068
+ "isWrite": false,
1069
+ "isReadOnly": true,
1070
+ "effect": "workspace_read",
1071
+ "riskLevel": 0,
1072
+ "concurrencyClass": "lsp-limited"
1073
+ }
1074
+ },
1075
+ {
1076
+ "tool": {
1077
+ "name": "query_shader_compile_unit",
1078
+ "description": "Read-only. Return the compile unit for a .shader root or .fxh include: root file, include members with resolution status and origin, include problems (missing/ambiguous/cycle), and the roots that include this file. MANDATORY before editing any .fxh: symbol validity depends on the whole compile unit (root + Includes + platform conditions), so raw text search across the repo does not prove shader semantics.",
1079
+ "inputSchema": {
1080
+ "type": "object",
1081
+ "properties": {
1082
+ "file": {
1083
+ "type": "string",
1084
+ "description": "Absolute or workspace-relative path of the .shader/.fxh file."
1085
+ }
1086
+ },
1087
+ "required": [
1088
+ "file"
1089
+ ]
1090
+ }
1091
+ },
1092
+ "registry": {
1093
+ "name": "query_shader_compile_unit",
1094
+ "isWrite": false,
1095
+ "isReadOnly": true,
1096
+ "effect": "workspace_read",
1097
+ "riskLevel": 0,
1098
+ "concurrencyClass": "lsp-limited"
1099
+ }
1100
+ },
1101
+ {
1102
+ "tool": {
1103
+ "name": "query_shader_platform_variants",
1104
+ "description": "Read-only. Compare presence conditions, macros, and active symbols for every supported Paradox shader platform profile in a compile unit. MANDATORY before changing conditional shader code or macros; validating only the current platform is insufficient.",
1105
+ "inputSchema": {
1106
+ "type": "object",
1107
+ "properties": {
1108
+ "file": {
1109
+ "type": "string",
1110
+ "description": "Absolute or workspace-relative path of the .shader/.fxh file."
1111
+ }
1112
+ },
1113
+ "required": [
1114
+ "file"
1115
+ ]
1116
+ }
1117
+ },
1118
+ "registry": {
1119
+ "name": "query_shader_platform_variants",
1120
+ "isWrite": false,
1121
+ "isReadOnly": true,
1122
+ "effect": "workspace_read",
1123
+ "riskLevel": 0,
1124
+ "concurrencyClass": "lsp-limited"
1125
+ }
1126
+ },
1127
+ {
1128
+ "tool": {
1129
+ "name": "query_shader_callers",
1130
+ "description": "Read-only. Return evidence of what references a shader Effect: data-script assignments and effectFile selections, each with file, logicalPath, origin, enclosingBlock, interfaceSprite/rendererSubtype, direct renderer inputs and bounded static GUI use sites when known, range, and provenance (sourceKind, confidence, gameVersion). MANDATORY before renaming or deleting an Effect.",
1131
+ "inputSchema": {
1132
+ "type": "object",
1133
+ "properties": {
1134
+ "effectName": {
1135
+ "type": "string",
1136
+ "description": "Exact shader Effect name."
1137
+ },
1138
+ "limit": {
1139
+ "type": "number",
1140
+ "description": "Max evidence entries to return (default 100)."
1141
+ }
1142
+ },
1143
+ "required": [
1144
+ "effectName"
1145
+ ]
1146
+ }
1147
+ },
1148
+ "registry": {
1149
+ "name": "query_shader_callers",
1150
+ "isWrite": false,
1151
+ "isReadOnly": true,
1152
+ "effect": "workspace_read",
1153
+ "riskLevel": 0,
1154
+ "concurrencyClass": "lsp-limited"
1155
+ }
1156
+ },
1157
+ {
1158
+ "tool": {
1159
+ "name": "explain_shader_reachability",
1160
+ "description": "Read-only. Explain why a shader Effect is reachable or why reachability is unknown: classification, declarations, evidence with provenance/confidence, and the rename policy decision. Respect renamePolicy - engine_hardcoded or unknown entry points must not be renamed. A newly declared Effect is NOT executed unless reachable via a data call, an effectFile convention, or a known engine entry. Pass effectName for one Effect, or file to page through all Effects declared in a shader file.",
1161
+ "inputSchema": {
1162
+ "type": "object",
1163
+ "properties": {
1164
+ "effectName": {
1165
+ "type": "string",
1166
+ "description": "Exact shader Effect name. Takes precedence over file."
1167
+ },
1168
+ "file": {
1169
+ "type": "string",
1170
+ "description": "Absolute or workspace-relative path of a .shader/.fxh file; lists its Effects with cursor pagination."
1171
+ },
1172
+ "limit": {
1173
+ "type": "number",
1174
+ "description": "Max results for the per-file form (1-500, default 100)."
1175
+ },
1176
+ "cursor": {
1177
+ "type": "number",
1178
+ "description": "Numeric offset returned as nextCursor by a previous per-file call. Default 0."
1179
+ }
1180
+ },
1181
+ "required": []
1182
+ }
1183
+ },
1184
+ "registry": {
1185
+ "name": "explain_shader_reachability",
1186
+ "isWrite": false,
1187
+ "isReadOnly": true,
1188
+ "effect": "workspace_read",
1189
+ "riskLevel": 0,
1190
+ "concurrencyClass": "lsp-limited"
1191
+ }
1192
+ },
1193
+ {
1194
+ "tool": {
1195
+ "name": "validate_shader",
1196
+ "description": "Read-only. Validate a .shader/.fxh file inside its compile unit and return structured diagnostics (code, severity, message, range). Run this on every affected compile-unit root after editing shader files.",
1197
+ "inputSchema": {
1198
+ "type": "object",
1199
+ "properties": {
1200
+ "file": {
1201
+ "type": "string",
1202
+ "description": "Absolute or workspace-relative path of the .shader/.fxh file."
1203
+ }
1204
+ },
1205
+ "required": [
1206
+ "file"
1207
+ ]
1208
+ }
1209
+ },
1210
+ "registry": {
1211
+ "name": "validate_shader",
1212
+ "isWrite": false,
1213
+ "isReadOnly": true,
1214
+ "effect": "workspace_read",
1215
+ "riskLevel": 0,
1216
+ "concurrencyClass": "lsp-limited"
1217
+ }
1218
+ },
1219
+ {
1220
+ "tool": {
1221
+ "name": "compare_shader_with_vanilla",
1222
+ "description": "Read-only. Structurally compare workspace shader declarations with vanilla: which declarations are effective and which vanilla declarations they override. Pass effectName for one Effect, or file for all Effects declared in a shader file.",
1223
+ "inputSchema": {
1224
+ "type": "object",
1225
+ "properties": {
1226
+ "effectName": {
1227
+ "type": "string",
1228
+ "description": "Exact shader Effect name. Takes precedence over file."
1229
+ },
1230
+ "file": {
1231
+ "type": "string",
1232
+ "description": "Absolute or workspace-relative path of a .shader/.fxh file."
1233
+ }
1234
+ },
1235
+ "required": []
1236
+ }
1237
+ },
1238
+ "registry": {
1239
+ "name": "compare_shader_with_vanilla",
1240
+ "isWrite": false,
1241
+ "isReadOnly": true,
1242
+ "effect": "workspace_read",
1243
+ "riskLevel": 0,
1244
+ "concurrencyClass": "lsp-limited"
1245
+ }
1246
+ }
1247
+ ];