You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docmd-main/v08/de/guides/ai-optimisation/mcp-and-agent-skills.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,9 +37,11 @@ Fügen Sie in den MCP-Einstellungen Ihres Editors einen neuen Server mit dem `st
37
37
Sobald die Verbindung steht, stehen dem Agenten die folgenden Tools zur Verfügung:
38
38
39
39
1.`search_docs(query)`: Führt eine Workspace-weite Volltextsuche durch.
40
-
2.`read_doc(route)`: Ruft den rohen Markdown-Inhalt einer bestimmten Route ab.
41
-
3.`validate_docs()`: Lintet die gesamte Dokumentation und gibt Validierungsfehler zurück (z. B. defekte Links).
42
-
4.`get_llms_context()`: Ruft die konsolidierte `llms-full.txt`-Kontextdatei ab.
40
+
2.`list_docs(subdir?)`: Listet alle Markdown-Dateien im Projekt auf, optional beschränkt auf ein Unterverzeichnis (eine Locale, eine Version, ein Guide-Abschnitt). Damit kann der Agent den Dokumentationsbaum navigieren, bevor er einzelne Dateien liest.
41
+
3.`read_doc(route)`: Ruft den rohen Markdown-Inhalt einer bestimmten Route ab. Die Route muss innerhalb des Projekt-Wurzelverzeichnisses aufgelöst werden.
42
+
4.`get_config()`: Liefert die aufgelöste `docmd.config` — Titel, Quell- und Ausgabeverzeichnisse, Locales, Versionen und aktivierte Plugins. Sensible Werte (API-Schlüssel, Analytics-IDs) werden aus der Antwort entfernt.
43
+
5.`validate_docs()`: Lintet die gesamte Dokumentation und gibt Validierungsfehler zurück (z. B. defekte Links).
44
+
6.`get_llms_context()`: Ruft die konsolidierte `llms-full.txt`-Kontextdatei ab.
Copy file name to clipboardExpand all lines: docmd-main/v08/de/reference/mcp-server.md
+31-3Lines changed: 31 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,12 +46,14 @@ Fügen Sie dies zu den MCP-Einstellungen Ihres Editors hinzu:
46
46
47
47
## Verfügbare Tools
48
48
49
-
Der MCP-Server stellt vier Tools bereit, die Agenten aufrufen können:
49
+
Der MCP-Server stellt sechs Tools bereit, die Agenten aufrufen können:
50
50
51
51
| Tool | Beschreibung |
52
52
| :--- | :--- |
53
53
|**`search_docs`**| Volltextsuche über alle Dokumentations-Dateien. Gibt passende Zeilen mit Dateipfaden und Zeilennummern zurück. |
54
-
|**`read_doc`**| Liest den rohen Markdown-Inhalt einer beliebigen Dokumentations-Datei über ihren relativen Pfad. |
54
+
|**`list_docs`**| Listet alle Markdown-Dateien im Projekt auf (optional beschränkt auf ein Unterverzeichnis wie eine Locale oder Version). Gibt relative Pfade zurück, damit der Agent den Dokumentationsbaum navigieren kann, bevor er einzelne Dateien liest. |
55
+
|**`read_doc`**| Liest den rohen Markdown-Inhalt einer beliebigen Dokumentations-Datei über ihren relativen Pfad. Der Pfad ist auf das Projekt-Wurzelverzeichnis beschränkt. |
56
+
|**`get_config`**| Ruft die aufgelöste `docmd.config` ab — Titel, Quell-/Ausgabeverzeichnisse, konfigurierte Locales, Versionen und aktivierte Plugins. Sensible Werte (API-Schlüssel, Analytics-IDs) werden aus der Antwort entfernt. |
55
57
|**`validate_docs`**| Führt eine Link-Validierung über alle Markdown-Dateien aus. Gibt eine Liste defekter Links mit Datei, Zeile und Ziel zurück. |
56
58
|**`get_llms_context`**| Ruft den vollständigen `llms-full.txt`-Kontext ab — die vereinte Inhaltsdarstellung der gesamten Dokumentations-Site, optimiert für die LLM-Ingestion. |
57
59
@@ -72,6 +74,20 @@ Der MCP-Server stellt vier Tools bereit, die Agenten aufrufen können:
72
74
}
73
75
```
74
76
77
+
#### `list_docs`
78
+
79
+
```json
80
+
{
81
+
"name": "list_docs",
82
+
"inputSchema": {
83
+
"type": "object",
84
+
"properties": {
85
+
"subdir": { "type": "string", "description": "Optionales Unterverzeichnis zur Einschränkung der Auflistung (z. B. 'en', 'v1', 'guides'). Der Pfad ist auf das konfigurierte Quellverzeichnis beschränkt." }
86
+
}
87
+
}
88
+
}
89
+
```
90
+
75
91
#### `read_doc`
76
92
77
93
```json
@@ -80,13 +96,25 @@ Der MCP-Server stellt vier Tools bereit, die Agenten aufrufen können:
80
96
"inputSchema": {
81
97
"type": "object",
82
98
"properties": {
83
-
"route": { "type": "string", "description": "Relativer Pfad zur Markdown-Datei (z. B. docs/getting-started.md)." }
99
+
"route": { "type": "string", "description": "Relativer Pfad zur Markdown-Datei (z. B. docs/getting-started.md). Muss innerhalb des Projekt-Wurzelverzeichnisses aufgelöst werden." }
Copy file name to clipboardExpand all lines: docmd-main/v08/de/release-notes/0-8-10.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -155,6 +155,7 @@ Die TUI-Zeile zeigt `Stopped ... PID gracefully` bei sauberem Exit oder `Killed
155
155
-**llms.txt / llms.json-Titel werden bereinigt.** Frontmatter-Titel, die Markdown-Injection-Zeichen (`` ` ``, `[`, `]`, Zeilenumbrüche) enthalten, brechen die Linkform nicht mehr und werden nicht mehr als rohes HTML gerendert; Titel, die mit `=`, `+`, `-` oder `@` beginnen, erhalten ein vorangestelltes einfaches Anführungszeichen, damit das Öffnen in einer Tabellenkalkulation keine Formel ausführt. CSV-Formel-Neutralisierung (T-Z11) und Markdown-Injection-Verhinderung (T-Z10) in einem Helfer.
156
156
-**`NO_COLOR` und `DOCMD_NO_BANNER` unterdrücken das Build-Banner.** Das Setzen von `NO_COLOR=1` (oder des docmd-spezifischen `DOCMD_NO_BANNER=1`) blendet jetzt das ASCII-Art und die Versionszeile am Anfang der Build-Ausgabe aus. `NO_COLOR` ist der De-facto-Standard für CLIs; `DOCMD_NO_BANNER` ist eine docmd-spezifische Hintertür für Anwender, die Farbe, aber kein Banner möchten (N-13 + N-16).
157
157
-**Migrations-Feinschliff.**`moveFilesToBackup` behält nun Lockfiles und `package.json` an Ort und Stelle, sodass eine Wiederherstellung nicht jede Abhängigkeit neu auflösen muss (N-10). Die Docusaurus- und MkDocs-Migratoren erhalten das ursprüngliche `staticDir` / `site_dir` (N-22), und MkDocs-`nav:`-Blöcke werden in docmds `navigation`-Format übersetzt, wobei mehrstufige Abschnitte über `children` erhalten bleiben (N-9).
158
+
-**MCP: `prompts/list` gibt eine leere Liste statt "Method not found" zurück.** Der Server deklariert die `prompts`-Capability in `initialize` zur Vorwärtskompatibilität, hatte aber keinen Handler. MCP-Clients, die die Capability-Bekanntmachung respektieren, erhalten nun `{ prompts: [] }` statt eines Unhandled-Method-Fehlers.
158
159
159
160
### Changelog
160
161
@@ -168,6 +169,7 @@ Die TUI-Zeile zeigt `Stopped ... PID gracefully` bei sauberem Exit oder `Killed
168
169
7.**Migrate**: der `--upgrade`-Pfad in `packages/core/src/commands/migrate.ts` behandelt jetzt acht zusätzliche Legacy-Schlüssel: `source`, `outDir`, `nav`, top-level `search`, top-level `sidebar`, `theme.defaultMode`, `theme.enableModeToggle` und `theme.positionMode` (N-4).
169
170
8.**Tests**: `tests/cli-contracts/validate-workspace.test.js` fügt 5 neue M-2-Assertions hinzu, die den Exit-Code und die vier Meldungsinhalt-Invarianten abdecken.
170
171
9.**Tests**: `tests/cli-contracts/plugin-add-remove.test.js` fügt 3 neue M-14-Assertions hinzu, die die Meldung "already installed", das Fehlen der falschen Erfolgsmeldung und den Regressionsschutz für Neuinstallationen abdecken.
172
+
10.**MCP-Server**: `runMcpServer` in `packages/core/src/commands/mcp.ts` ergänzt die Tools `list_docs` (Dateilisting, abgesicherter `subdir`) und `get_config` (sichere Konfigurations-Zusammenfassung) sowie einen `prompts/list`-Handler, der `{ prompts: [] }` zurückgibt. `tools/list` bewirbt nun sechs Tools.
171
173
10.**Tests**: neue `tests/cli-contracts/deploy.test.js` (5 Assertions, registriert in `tests/runner.js` als `deploy`) decken die Pfade N-2 Überspringen / Überschreiben / Neu ab.
172
174
11.**Tests**: neue `tests/cli-contracts/stop.test.js` (3 Assertions, registriert als `stop`) decken den M-11-Helfer `waitForExit` gegen laufende Kindprozesse ab.
173
175
12.**Tests**: neue `tests/cli-contracts/migrate.test.js` (33 Assertions, registriert als `migrate`) decken N-3 Dry-Run sowohl für Quell-Migrationen als auch für Upgrade ab, sowie N-4-Abdeckung aller 13 Legacy-Upgrade-Pfade.
Copy file name to clipboardExpand all lines: docmd-main/v08/en/guides/ai-optimisation/mcp-and-agent-skills.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,9 +37,11 @@ In your editor's MCP settings panel, add a new server using the `stdio` transpor
37
37
Once connected, the following tools become available to the agent:
38
38
39
39
1.`search_docs(query)`: Performs a workspace-wide full-text search.
40
-
2.`read_doc(route)`: Retrieves the raw Markdown contents of a specific route.
41
-
3.`validate_docs()`: Lints the entire documentation and returns validation errors (e.g., broken links).
42
-
4.`get_llms_context()`: Fetches the consolidated `llms-full.txt` context file.
40
+
2.`list_docs(subdir?)`: Lists every markdown file in the project, optionally scoped to a subdirectory (a locale, a version, a guide section). Use this to navigate the docs tree before reading individual files.
41
+
3.`read_doc(route)`: Retrieves the raw Markdown contents of a specific route. The route must resolve inside the project root.
42
+
4.`get_config()`: Returns the resolved `docmd.config` — title, source and output directories, locales, versions, and enabled plugins. Sensitive values (API keys, analytics IDs) are stripped from the response.
43
+
5.`validate_docs()`: Lints the entire documentation and returns validation errors (e.g., broken links).
44
+
6.`get_llms_context()`: Fetches the consolidated `llms-full.txt` context file.
Copy file name to clipboardExpand all lines: docmd-main/v08/en/reference/mcp-server.md
+31-3Lines changed: 31 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,12 +46,14 @@ Add to your editor's MCP settings:
46
46
47
47
## Available Tools
48
48
49
-
The MCP server exposes four tools that agents can call:
49
+
The MCP server exposes six tools that agents can call:
50
50
51
51
| Tool | Description |
52
52
| :--- | :--- |
53
53
|**`search_docs`**| Full-text search across all documentation files. Returns matching lines with file paths and line numbers. |
54
-
|**`read_doc`**| Read the raw markdown content of any documentation file by its relative path. |
54
+
|**`list_docs`**| List every markdown file in the project (optionally scoped to a subdirectory such as a locale or version). Returns relative paths so the agent can navigate the docs tree before reading individual files. |
55
+
|**`read_doc`**| Read the raw markdown content of any documentation file by its relative path. Path is sandboxed to the project root. |
56
+
|**`get_config`**| Retrieve the resolved `docmd.config` — title, source/output directories, configured locales, versions, and enabled plugins. Sensitive values (API keys, analytics IDs) are stripped from the response. |
55
57
|**`validate_docs`**| Run link validation across all markdown files. Returns a list of broken links with file, line, and target. |
56
58
|**`get_llms_context`**| Retrieve the complete `llms-full.txt` context — the unified content of the entire documentation site, optimised for LLM ingestion. |
57
59
@@ -72,6 +74,20 @@ The MCP server exposes four tools that agents can call:
72
74
}
73
75
```
74
76
77
+
#### `list_docs`
78
+
79
+
```json
80
+
{
81
+
"name": "list_docs",
82
+
"inputSchema": {
83
+
"type": "object",
84
+
"properties": {
85
+
"subdir": { "type": "string", "description": "Optional subdirectory to scope the listing (e.g. 'en', 'v1', 'guides'). Path is sandboxed to the configured source directory." }
86
+
}
87
+
}
88
+
}
89
+
```
90
+
75
91
#### `read_doc`
76
92
77
93
```json
@@ -80,13 +96,25 @@ The MCP server exposes four tools that agents can call:
80
96
"inputSchema": {
81
97
"type": "object",
82
98
"properties": {
83
-
"route": { "type": "string", "description": "Relative path to the markdown file (e.g. docs/getting-started.md)." }
99
+
"route": { "type": "string", "description": "Relative path to the markdown file (e.g. docs/getting-started.md). Must resolve inside the project root." }
Copy file name to clipboardExpand all lines: docmd-main/v08/en/release-notes/0-8-10.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,17 @@ This release is a developer-experience pass on the CLI after the 0.8.8 hardening
10
10
11
11
No public API changes. No breaking config changes. Purely a developer-experience release.
12
12
13
+
### 🔌 MCP server gets two new tools
14
+
15
+
The `docmd mcp` server now exposes six tools (was four) and ships a working `prompts/list` handler so MCP clients that respect the declared `prompts` capability get a clean empty list instead of a "method not found" error.
16
+
17
+
Two new tools:
18
+
19
+
-**`list_docs(subdir?)`** — Lists every markdown file in the project, optionally scoped to a subdirectory (a locale, a version, a guide section). Returns relative paths so the agent can navigate the docs tree before reading individual files. The `subdir` argument is sandboxed through the same `safePath` boundary that protects `read_doc`.
20
+
-**`get_config()`** — Returns the resolved `docmd.config` as a JSON object: title, source and output directories, configured locales, versions, and the list of enabled plugins. Sensitive values (API keys, analytics IDs) are reconstructed into a safe summary — raw secrets are never returned.
21
+
22
+
Together with the existing `search_docs`, `read_doc`, `validate_docs`, and `get_llms_context`, an agent can now explore the project structure (`get_config` → `list_docs` → `read_doc`) without first guessing paths or doing blind `search_docs` calls.
23
+
13
24
### 🧪 `migrate --dry-run` for every migration path
14
25
15
26
`docmd migrate --dry-run` is now a real flag for every supported source (Docusaurus, MkDocs, VitePress, Starlight) and for the in-place `--upgrade` path. Dry-run prints what would change and exits 0 without writing anything:
@@ -155,6 +166,7 @@ The TUI line shows `Stopped ... PID gracefully` for a clean exit, or `Killed ...
155
166
-**llms.txt / llms.json titles are sanitised.** Frontmatter titles containing markdown injection chars (`` ` ``, `[`, `]`, newlines) no longer break the link form or render as raw HTML, and titles starting with `=`, `+`, `-`, or `@` are prefixed with a single-quote so opening the file in a spreadsheet does not execute a formula. CSV formula neutralisation (T-Z11) and markdown injection prevention (T-Z10) in one helper.
156
167
-**`NO_COLOR` and `DOCMD_NO_BANNER` suppress the build banner.** Setting `NO_COLOR=1` (or the docmd-specific `DOCMD_NO_BANNER=1`) now hides the ASCII art and version line at the top of the build output. `NO_COLOR` is the de-facto standard for CLIs; `DOCMD_NO_BANNER` is a docmd-specific escape hatch for users who want colour but no banner (N-13 + N-16).
157
168
-**Migration polish.**`moveFilesToBackup` now keeps lockfiles and `package.json` in place so a recovery doesn't have to re-resolve every dependency (N-10). The Docusaurus and MkDocs migrators preserve the original `staticDir` / `site_dir` (N-22) and MkDocs `nav:` blocks are translated to docmd's `navigation` format with multi-level sections preserved via `children` (N-9).
169
+
-**MCP: `prompts/list` returns an empty list instead of "method not found".** The server declares `prompts` capability in `initialize` for forward compatibility, but had no handler. MCP clients honouring the capability advertisement now get `{ prompts: [] }` instead of an unhandled-method error.
158
170
159
171
### Changelog
160
172
@@ -167,6 +179,7 @@ The TUI line shows `Stopped ... PID gracefully` for a clean exit, or `Killed ...
167
179
6.**Migrate**: `migrateProject` in `packages/core/src/commands/migrate.ts` accepts a new `dryRun` option (N-3). For every source path (Docusaurus, MkDocs, VitePress, Starlight) the dry-run prints the file move list and the new `docmd.config.js` before any side effects; for `--upgrade` it prints the upgraded config. `packages/core/src/bin/docmd.ts` adds `--dry-run` to the migrate CLI.
168
180
7.**Migrate**: the `--upgrade` path in `packages/core/src/commands/migrate.ts` now handles eight additional legacy keys: `source`, `outDir`, `nav`, top-level `search`, top-level `sidebar`, `theme.defaultMode`, `theme.enableModeToggle`, and `theme.positionMode` (N-4).
169
181
8.**Tests**: `tests/cli-contracts/validate-workspace.test.js` adds 5 new M-2 assertions covering the exit code and the four message-content invariants.
182
+
10.**MCP server**: `runMcpServer` in `packages/core/src/commands/mcp.ts` adds `list_docs` (file listing, sandboxed `subdir`) and `get_config` (safe config summary) tools, and a `prompts/list` handler returning `{ prompts: [] }`. `tools/list` now advertises six tools.
170
183
9.**Tests**: `tests/cli-contracts/plugin-add-remove.test.js` adds 3 new M-14 assertions covering the already-installed message, the absence of the false success message, and the regression guard for fresh installs.
171
184
10.**Tests**: new `tests/cli-contracts/deploy.test.js` (5 assertions, registered in `tests/runner.js` as `deploy`) covers the N-2 skip / overwrite / fresh paths.
172
185
11.**Tests**: new `tests/cli-contracts/stop.test.js` (3 assertions, registered as `stop`) covers the M-11 `waitForExit` helper against live child processes.
0 commit comments