@markdy/mcp-server 1.0.28 → 1.0.30

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 CHANGED
@@ -109,19 +109,30 @@ Validates MarkdyScript syntax and verifies Well-Architected governance rules (la
109
109
  | `code` | `string` | **Required** | *None* | The complete MarkdyScript diagram code starting with `scene`. |
110
110
  | `checkArchitecture` | `boolean` | Optional | `true` | When `true`, runs Well-Architected governance lint rules. |
111
111
 
112
- #### Example Request
113
- ```json
114
- {
115
- "name": "validate_markdy_code",
116
- "arguments": {
117
- "code": "scene theme=paper layout=LR\nservice API\ndatabase DB\nbeat main:\n API -> DB \"query\"\n API <- DB \"200 OK\""
118
- }
119
- }
120
- ```
112
+ ---
113
+
114
+ ### 2. `diagnose_markdy_syntax`
115
+ Deep diagnostic tool that analyzes MarkdyScript syntax, performs fuzzy typo matching for keywords/node kinds/operators/nodes, identifies unquoted multi-word strings, detects flow cycle overlaps, and returns line-by-line snippets, "Did you mean?" suggestions, and proposed auto-repaired code.
116
+
117
+ #### Parameters
118
+ | Parameter | Type | Presence | Default | Description |
119
+ | :--- | :--- | :--- | :--- | :--- |
120
+ | `code` | `string` | **Required** | *None* | The MarkdyScript diagram code to inspect. |
121
+ | `checkArchitecture` | `boolean` | Optional | `true` | When `true`, includes governance rules in the report. |
121
122
 
122
123
  ---
123
124
 
124
- ### 2. `transpile_to_markdy`
125
+ ### 3. `fix_markdy_code`
126
+ Automatically repairs common MarkdyScript syntax errors, typos, missing colons, invalid flow operators, unquoted multi-word strings, cycle return edges, and wraps top-level bare cues into a valid scene.
127
+
128
+ #### Parameters
129
+ | Parameter | Type | Presence | Description |
130
+ | :--- | :--- | :--- | :--- |
131
+ | `code` | `string` | **Required** | The broken or draft MarkdyScript diagram code to automatically repair. |
132
+
133
+ ---
134
+
135
+ ### 4. `transpile_to_markdy`
125
136
  Converts existing infrastructure definitions or diagrams into animated MarkdyScript scenes.
126
137
 
127
138
  #### Parameters
@@ -131,21 +142,9 @@ Converts existing infrastructure definitions or diagrams into animated MarkdyScr
131
142
  | `format` | `string` | **Required** | `mermaid`, `docker-compose`, `k8s`, `terraform`, `drawio` | Format of the input source. |
132
143
  | `title` | `string` | Optional | `"Imported Scene"` | Scene title rendered in the output diagram header. |
133
144
 
134
- #### Example Request
135
- ```json
136
- {
137
- "name": "transpile_to_markdy",
138
- "arguments": {
139
- "format": "docker-compose",
140
- "source": "version: '3'\nservices:\n web:\n image: nginx\n api:\n image: node-app",
141
- "title": "Container Stack"
142
- }
143
- }
144
- ```
145
-
146
145
  ---
147
146
 
148
- ### 3. `explain_architecture`
147
+ ### 5. `explain_architecture`
149
148
  Parses a MarkdyScript AST to output structural topology summaries, component role counts, and governance health metrics.
150
149
 
151
150
  #### Parameters
@@ -155,7 +154,7 @@ Parses a MarkdyScript AST to output structural topology summaries, component rol
155
154
 
156
155
  ---
157
156
 
158
- ### 4. `generate_markdy_prompt`
157
+ ### 6. `generate_markdy_prompt`
159
158
  Generates optimal, hallucination-resistant LLM system prompts and grammar constraints tailored to a specific user goal.
160
159
 
161
160
  #### Parameters
@@ -165,7 +164,7 @@ Generates optimal, hallucination-resistant LLM system prompts and grammar constr
165
164
 
166
165
  ---
167
166
 
168
- ### 5. `get_architecture_catalog`
167
+ ### 7. `get_architecture_catalog`
169
168
  Returns production-grade golden architecture templates (Microservices, RAG, Kafka Event-Driven, K8s Ingress, GitOps CI/CD, OAuth2, HA Multi-Region, Flowcharts) with full runnable MarkdyScript source code.
170
169
 
171
170
  #### Parameters
@@ -175,6 +174,18 @@ Returns production-grade golden architecture templates (Microservices, RAG, Kafk
175
174
 
176
175
  ---
177
176
 
177
+ ### 8. `get_intellicode_completions`
178
+ Provides context-aware autocompletions, technology presets, next-line flow predictions, and proactive architectural recommendations based on current diagram context.
179
+
180
+ #### Parameters
181
+ | Parameter | Type | Presence | Default | Description |
182
+ | :--- | :--- | :--- | :--- | :--- |
183
+ | `code` | `string` | **Required** | *None* | The MarkdyScript diagram code. |
184
+ | `line` | `number` | Optional | End of doc | 0-indexed cursor line. |
185
+ | `column` | `number` | Optional | End of line | 0-indexed cursor column. |
186
+
187
+ ---
188
+
178
189
  ## 📦 Provided Resources
179
190
 
180
191
  AI agents can directly read these canonical context URIs via MCP:
@@ -182,6 +193,7 @@ AI agents can directly read these canonical context URIs via MCP:
182
193
  | URI | MIME Type | Description |
183
194
  | :--- | :--- | :--- |
184
195
  | `markdy://spec/agent-reference` | `text/markdown` | Canonical MarkdyScript specification, node kinds, and cycle-prevention rules. |
196
+ | `markdy://spec/grammar-rules` | `text/markdown` | Comprehensive grammar rules, typo resolution guide, and cycle-safe routing. |
185
197
  | `markdy://templates/catalog` | `application/json` | Curated JSON catalog of all 8 golden architecture templates. |
186
198
  | `markdy://governance/rules` | `application/json` | Well-Architected governance rules and lint presets. |
187
199
 
@@ -192,6 +204,7 @@ AI agents can directly read these canonical context URIs via MCP:
192
204
  | Prompt | Arguments | Purpose |
193
205
  | :--- | :--- | :--- |
194
206
  | `create_architecture_diagram` | `userGoal` (req), `theme` (opt), `layout` (opt) | Guided workflow to design an animated Markdy architecture diagram from scratch. |
207
+ | `debug_markdy_syntax` | `code` (req) | Diagnoses and heals broken MarkdyScript syntax errors, typos, and cycle overlaps. |
195
208
  | `audit_architecture` | `code` (req) | Audits a MarkdyScript diagram against Well-Architected governance and cycle-safety rules. |
196
209
  | `transpile_architecture` | `source` (req), `format` (req) | Guides migration of legacy diagrams or infra into animated MarkdyScript. |
197
210
 
package/dist/index.d.ts CHANGED
@@ -21,10 +21,13 @@ interface ResourceResult {
21
21
  }>;
22
22
  }
23
23
  declare function handleValidateMarkdy(code: string, checkArchitecture?: boolean): ToolResult;
24
+ declare function handleDiagnoseMarkdy(code: string, checkArchitecture?: boolean): ToolResult;
25
+ declare function handleFixMarkdy(code: string): ToolResult;
24
26
  declare function handleTranspileToMarkdy(source: string, format: "mermaid" | "docker-compose" | "k8s" | "terraform" | "drawio", title?: string): Promise<ToolResult>;
25
27
  declare function handleExplainArchitecture(code: string): ToolResult;
26
28
  declare function handleGenerateMarkdyPrompt(userGoal: string): ToolResult;
27
29
  declare function handleGetArchitectureCatalog(filterCategory?: string): ToolResult;
30
+ declare function handleIntelliCode(code: string, line?: number, column?: number): ToolResult;
28
31
  declare function handleReadResource(uri: string): ResourceResult;
29
32
 
30
33
  /**
@@ -37,4 +40,4 @@ declare const MCP_SERVER_VERSION = "1.0.25";
37
40
  declare function createMarkdyMcpServer(): Server;
38
41
  declare function startMcpServer(): Promise<void>;
39
42
 
40
- export { MCP_SERVER_VERSION, createMarkdyMcpServer, handleExplainArchitecture, handleGenerateMarkdyPrompt, handleGetArchitectureCatalog, handleReadResource, handleTranspileToMarkdy, handleValidateMarkdy, startMcpServer };
43
+ export { MCP_SERVER_VERSION, createMarkdyMcpServer, handleDiagnoseMarkdy, handleExplainArchitecture, handleFixMarkdy, handleGenerateMarkdyPrompt, handleGetArchitectureCatalog, handleIntelliCode, handleReadResource, handleTranspileToMarkdy, handleValidateMarkdy, startMcpServer };