mcp-docs-service 0.3.11 → 0.5.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.
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ import { zodToJsonSchema } from "zod-to-json-schema";
14
14
  // Import our utilities
15
15
  import { safeLog, normalizePath } from "./utils/index.js";
16
16
  // Import schemas
17
- import { ReadDocumentSchema, WriteDocumentSchema, EditDocumentSchema, ListDocumentsSchema, SearchDocumentsSchema, CheckDocumentationHealthSchema, } from "./schemas/index.js";
17
+ import { ReadDocumentSchema, WriteDocumentSchema, EditDocumentSchema, ListDocumentsSchema, SearchDocumentsSchema, CheckDocumentationHealthSchema, CreateFolderSchema, MoveDocumentSchema, RenameDocumentSchema, UpdateNavigationOrderSchema, CreateSectionSchema, ValidateLinksSchema, ValidateMetadataSchema, } from "./schemas/index.js";
18
18
  // Import handlers
19
19
  import { DocumentHandler, NavigationHandler, HealthCheckHandler, } from "./handlers/index.js";
20
20
  // Command line argument parsing
@@ -93,7 +93,7 @@ const healthCheckHandler = new HealthCheckHandler(docsDir);
93
93
  // Server setup
94
94
  const server = new Server({
95
95
  name: "mcp-docs-service",
96
- version: "0.3.10",
96
+ version: "0.4.0",
97
97
  }, {
98
98
  capabilities: {
99
99
  tools: {},
@@ -104,49 +104,89 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
104
104
  return {
105
105
  tools: [
106
106
  {
107
- name: "mcp_docs_manager_read_document",
107
+ name: "read_document",
108
108
  description: "Read a markdown document from the docs directory. Returns the document content " +
109
109
  "including frontmatter. Use this tool when you need to examine the contents of a " +
110
110
  "single document.",
111
111
  inputSchema: zodToJsonSchema(ReadDocumentSchema),
112
112
  },
113
113
  {
114
- name: "mcp_docs_manager_write_document",
114
+ name: "write_document",
115
115
  description: "Create a new markdown document or completely overwrite an existing document with new content. " +
116
116
  "Use with caution as it will overwrite existing documents without warning. " +
117
117
  "Can create parent directories if they don't exist.",
118
118
  inputSchema: zodToJsonSchema(WriteDocumentSchema),
119
119
  },
120
120
  {
121
- name: "mcp_docs_manager_edit_document",
121
+ name: "edit_document",
122
122
  description: "Make line-based edits to a markdown document. Each edit replaces exact line sequences " +
123
123
  "with new content. Returns a git-style diff showing the changes made.",
124
124
  inputSchema: zodToJsonSchema(EditDocumentSchema),
125
125
  },
126
126
  {
127
- name: "mcp_docs_manager_list_documents",
127
+ name: "list_documents",
128
128
  description: "List all markdown documents in the docs directory or a subdirectory. " +
129
129
  "Returns the relative paths to all documents.",
130
130
  inputSchema: zodToJsonSchema(ListDocumentsSchema),
131
131
  },
132
132
  {
133
- name: "mcp_docs_manager_search_documents",
133
+ name: "search_documents",
134
134
  description: "Search for markdown documents containing specific text in their content or frontmatter. " +
135
135
  "Returns the relative paths to matching documents.",
136
136
  inputSchema: zodToJsonSchema(SearchDocumentsSchema),
137
137
  },
138
138
  {
139
- name: "mcp_docs_manager_generate_navigation",
139
+ name: "generate_documentation_navigation",
140
140
  description: "Generate a navigation structure from the markdown documents in the docs directory. " +
141
141
  "Returns a JSON structure that can be used for navigation menus.",
142
142
  inputSchema: zodToJsonSchema(ListDocumentsSchema),
143
143
  },
144
144
  {
145
- name: "mcp_docs_manager_check_documentation_health",
145
+ name: "check_documentation_health",
146
146
  description: "Check the health of the documentation by analyzing frontmatter, links, and navigation. " +
147
147
  "Returns a report with issues and a health score.",
148
148
  inputSchema: zodToJsonSchema(CheckDocumentationHealthSchema),
149
149
  },
150
+ // New tools for Phase 2
151
+ {
152
+ name: "create_documentation_folder",
153
+ description: "Create a new folder in the docs directory. Optionally creates a README.md file " +
154
+ "in the new folder with basic frontmatter.",
155
+ inputSchema: zodToJsonSchema(CreateFolderSchema),
156
+ },
157
+ {
158
+ name: "move_document",
159
+ description: "Move a document from one location to another. Optionally updates references to the " +
160
+ "document in other files.",
161
+ inputSchema: zodToJsonSchema(MoveDocumentSchema),
162
+ },
163
+ {
164
+ name: "rename_document",
165
+ description: "Rename a document while preserving its location and content. Optionally updates " +
166
+ "references to the document in other files.",
167
+ inputSchema: zodToJsonSchema(RenameDocumentSchema),
168
+ },
169
+ {
170
+ name: "update_documentation_navigation_order",
171
+ description: "Update the navigation order of a document by modifying its frontmatter.",
172
+ inputSchema: zodToJsonSchema(UpdateNavigationOrderSchema),
173
+ },
174
+ {
175
+ name: "create_documentation_section",
176
+ description: "Create a new navigation section with an index.md file.",
177
+ inputSchema: zodToJsonSchema(CreateSectionSchema),
178
+ },
179
+ // New tools for Phase 3
180
+ {
181
+ name: "validate_documentation_links",
182
+ description: "Check for broken internal links in documentation files.",
183
+ inputSchema: zodToJsonSchema(ValidateLinksSchema),
184
+ },
185
+ {
186
+ name: "validate_documentation_metadata",
187
+ description: "Ensure all documents have required metadata fields.",
188
+ inputSchema: zodToJsonSchema(ValidateMetadataSchema),
189
+ },
150
190
  ],
151
191
  };
152
192
  });
@@ -154,55 +194,106 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
154
194
  try {
155
195
  const { name, arguments: args } = request.params;
156
196
  switch (name) {
157
- case "mcp_docs_manager_read_document": {
197
+ case "read_document": {
158
198
  const parsed = ReadDocumentSchema.safeParse(args);
159
199
  if (!parsed.success) {
160
200
  throw new Error(`Invalid arguments for read_document: ${parsed.error}`);
161
201
  }
162
202
  return await documentHandler.readDocument(parsed.data.path);
163
203
  }
164
- case "mcp_docs_manager_write_document": {
204
+ case "write_document": {
165
205
  const parsed = WriteDocumentSchema.safeParse(args);
166
206
  if (!parsed.success) {
167
207
  throw new Error(`Invalid arguments for write_document: ${parsed.error}`);
168
208
  }
169
209
  return await documentHandler.writeDocument(parsed.data.path, parsed.data.content, parsed.data.createDirectories);
170
210
  }
171
- case "mcp_docs_manager_edit_document": {
211
+ case "edit_document": {
172
212
  const parsed = EditDocumentSchema.safeParse(args);
173
213
  if (!parsed.success) {
174
214
  throw new Error(`Invalid arguments for edit_document: ${parsed.error}`);
175
215
  }
176
216
  return await documentHandler.editDocument(parsed.data.path, parsed.data.edits, parsed.data.dryRun);
177
217
  }
178
- case "mcp_docs_manager_list_documents": {
218
+ case "list_documents": {
179
219
  const parsed = ListDocumentsSchema.safeParse(args);
180
220
  if (!parsed.success) {
181
221
  throw new Error(`Invalid arguments for list_documents: ${parsed.error}`);
182
222
  }
183
223
  return await documentHandler.listDocuments(parsed.data.basePath, parsed.data.recursive);
184
224
  }
185
- case "mcp_docs_manager_search_documents": {
225
+ case "search_documents": {
186
226
  const parsed = SearchDocumentsSchema.safeParse(args);
187
227
  if (!parsed.success) {
188
228
  throw new Error(`Invalid arguments for search_documents: ${parsed.error}`);
189
229
  }
190
230
  return await documentHandler.searchDocuments(parsed.data.query, parsed.data.basePath);
191
231
  }
192
- case "mcp_docs_manager_generate_navigation": {
232
+ case "generate_documentation_navigation": {
193
233
  const parsed = ListDocumentsSchema.safeParse(args);
194
234
  if (!parsed.success) {
195
235
  throw new Error(`Invalid arguments for generate_navigation: ${parsed.error}`);
196
236
  }
197
237
  return await navigationHandler.generateNavigation(parsed.data.basePath);
198
238
  }
199
- case "mcp_docs_manager_check_documentation_health": {
239
+ case "check_documentation_health": {
200
240
  const parsed = CheckDocumentationHealthSchema.safeParse(args);
201
241
  if (!parsed.success) {
202
242
  throw new Error(`Invalid arguments for check_documentation_health: ${parsed.error}`);
203
243
  }
204
244
  return await healthCheckHandler.checkDocumentationHealth(parsed.data.basePath);
205
245
  }
246
+ // New tools for Phase 2
247
+ case "create_documentation_folder": {
248
+ const parsed = CreateFolderSchema.safeParse(args);
249
+ if (!parsed.success) {
250
+ throw new Error(`Invalid arguments for create_folder: ${parsed.error}`);
251
+ }
252
+ return await documentHandler.createFolder(parsed.data.path, parsed.data.createReadme);
253
+ }
254
+ case "move_documentation_document": {
255
+ const parsed = MoveDocumentSchema.safeParse(args);
256
+ if (!parsed.success) {
257
+ throw new Error(`Invalid arguments for move_document: ${parsed.error}`);
258
+ }
259
+ return await documentHandler.moveDocument(parsed.data.sourcePath, parsed.data.destinationPath, parsed.data.updateReferences);
260
+ }
261
+ case "rename_documentation_document": {
262
+ const parsed = RenameDocumentSchema.safeParse(args);
263
+ if (!parsed.success) {
264
+ throw new Error(`Invalid arguments for rename_document: ${parsed.error}`);
265
+ }
266
+ return await documentHandler.renameDocument(parsed.data.path, parsed.data.newName, parsed.data.updateReferences);
267
+ }
268
+ case "update_documentation_navigation_order": {
269
+ const parsed = UpdateNavigationOrderSchema.safeParse(args);
270
+ if (!parsed.success) {
271
+ throw new Error(`Invalid arguments for update_navigation_order: ${parsed.error}`);
272
+ }
273
+ return await documentHandler.updateNavigationOrder(parsed.data.path, parsed.data.order);
274
+ }
275
+ case "create_section": {
276
+ const parsed = CreateSectionSchema.safeParse(args);
277
+ if (!parsed.success) {
278
+ throw new Error(`Invalid arguments for create_section: ${parsed.error}`);
279
+ }
280
+ return await documentHandler.createSection(parsed.data.title, parsed.data.path, parsed.data.order);
281
+ }
282
+ // New tools for Phase 3
283
+ case "validate_documentation_links": {
284
+ const parsed = ValidateLinksSchema.safeParse(args);
285
+ if (!parsed.success) {
286
+ throw new Error(`Invalid arguments for validate_links: ${parsed.error}`);
287
+ }
288
+ return await documentHandler.validateLinks(parsed.data.basePath, parsed.data.recursive);
289
+ }
290
+ case "validate_documentation_metadata": {
291
+ const parsed = ValidateMetadataSchema.safeParse(args);
292
+ if (!parsed.success) {
293
+ throw new Error(`Invalid arguments for validate_metadata: ${parsed.error}`);
294
+ }
295
+ return await documentHandler.validateMetadata(parsed.data.basePath, parsed.data.requiredFields);
296
+ }
206
297
  default:
207
298
  throw new Error(`Unknown tool: ${name}`);
208
299
  }
@@ -45,3 +45,36 @@ export const SearchDocumentsSchema = ToolInputSchema.extend({
45
45
  export const CheckDocumentationHealthSchema = ToolInputSchema.extend({
46
46
  basePath: z.string().optional().default(""),
47
47
  });
48
+ // New schemas for Phase 2 features
49
+ export const CreateFolderSchema = ToolInputSchema.extend({
50
+ path: z.string(),
51
+ createReadme: z.boolean().default(true),
52
+ });
53
+ export const MoveDocumentSchema = ToolInputSchema.extend({
54
+ sourcePath: z.string(),
55
+ destinationPath: z.string(),
56
+ updateReferences: z.boolean().default(true),
57
+ });
58
+ export const RenameDocumentSchema = ToolInputSchema.extend({
59
+ path: z.string(),
60
+ newName: z.string(),
61
+ updateReferences: z.boolean().default(true),
62
+ });
63
+ export const UpdateNavigationOrderSchema = ToolInputSchema.extend({
64
+ path: z.string(),
65
+ order: z.number(),
66
+ });
67
+ export const CreateSectionSchema = ToolInputSchema.extend({
68
+ title: z.string(),
69
+ path: z.string(),
70
+ order: z.number().optional(),
71
+ });
72
+ // New schemas for Phase 3 features
73
+ export const ValidateLinksSchema = ToolInputSchema.extend({
74
+ basePath: z.string().optional().default(""),
75
+ recursive: z.boolean().default(true),
76
+ });
77
+ export const ValidateMetadataSchema = ToolInputSchema.extend({
78
+ basePath: z.string().optional().default(""),
79
+ requiredFields: z.array(z.string()).optional(),
80
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-docs-service",
3
- "version": "0.3.11",
3
+ "version": "0.5.0",
4
4
  "description": "MCP Documentation Service - A Model Context Protocol implementation for documentation management",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -19,6 +19,7 @@
19
19
  "lint": "eslint src --ext .ts",
20
20
  "test": "vitest run",
21
21
  "test:watch": "vitest",
22
+ "test:coverage": "vitest run --coverage",
22
23
  "prepublishOnly": "npm run build",
23
24
  "prepare-publish": "node scripts/prepare-publish.js"
24
25
  },
@@ -44,6 +45,7 @@
44
45
  "@types/node": "^20.10.5",
45
46
  "@typescript-eslint/eslint-plugin": "^6.15.0",
46
47
  "@typescript-eslint/parser": "^6.15.0",
48
+ "@vitest/coverage-v8": "^3.0.8",
47
49
  "eslint": "^8.56.0",
48
50
  "ts-node": "^10.9.2",
49
51
  "typescript": "^5.3.3",
package/dist/cli/bin.d.ts DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * MCP Docs Service CLI
4
- *
5
- * This is the entry point for the CLI version of the MCP Docs Service.
6
- * It simply imports and runs the main service.
7
- */
8
- import "../index.js";
package/dist/cli/bin.js DELETED
@@ -1,133 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * MCP Docs Service CLI
4
- *
5
- * This is the entry point for the CLI version of the MCP Docs Service.
6
- * It simply imports and runs the main service.
7
- */
8
- import path from "path";
9
- import fs from "fs";
10
- import { fileURLToPath } from "url";
11
- // Get the current directory
12
- const __filename = fileURLToPath(import.meta.url);
13
- const __dirname = path.dirname(__filename);
14
- // Check if we're running under MCP Inspector
15
- const isMCPInspector = process.env.MCP_INSPECTOR === "true" ||
16
- process.argv.some((arg) => arg.includes("modelcontextprotocol/inspector"));
17
- // Create a logging function that respects MCP Inspector mode
18
- const log = (...args) => {
19
- if (!isMCPInspector) {
20
- console.log(...args);
21
- }
22
- };
23
- const errorLog = (...args) => {
24
- console.error(...args);
25
- };
26
- // Parse command line arguments
27
- const args = process.argv.slice(2);
28
- log("CLI Arguments:", JSON.stringify(args));
29
- let docsDir = path.join(process.cwd(), "docs");
30
- let createDir = false;
31
- let healthCheck = false;
32
- let showHelp = false;
33
- // MCP Inspector specific handling
34
- // When run through MCP Inspector, it might pass arguments in a different format
35
- if (isMCPInspector) {
36
- log("Detected MCP Inspector environment");
37
- // Try to find a valid docs directory in all arguments
38
- // This is a more aggressive approach but should work with various argument formats
39
- for (const arg of process.argv) {
40
- if (arg.endsWith("/docs") || arg.includes("/docs ")) {
41
- const potentialPath = arg.split(" ")[0];
42
- log("Found potential docs path in MCP Inspector args:", potentialPath);
43
- if (fs.existsSync(potentialPath)) {
44
- docsDir = path.resolve(potentialPath);
45
- log("Using docs directory from MCP Inspector:", docsDir);
46
- break;
47
- }
48
- }
49
- }
50
- // If we couldn't find a valid docs directory, use the default
51
- log("Using docs directory:", docsDir);
52
- }
53
- else {
54
- // Standard argument parsing
55
- for (let i = 0; i < args.length; i++) {
56
- log(`Processing arg[${i}]:`, args[i]);
57
- if (args[i] === "--docs-dir" && i + 1 < args.length) {
58
- docsDir = path.resolve(args[i + 1]);
59
- log("Setting docs dir from --docs-dir flag:", docsDir);
60
- i++; // Skip the next argument
61
- }
62
- else if (args[i] === "--create-dir") {
63
- createDir = true;
64
- }
65
- else if (args[i] === "--health-check") {
66
- healthCheck = true;
67
- }
68
- else if (args[i] === "--help" || args[i] === "-h") {
69
- showHelp = true;
70
- }
71
- else if (!args[i].startsWith("--")) {
72
- // Handle positional argument as docs directory
73
- const potentialPath = path.resolve(args[i]);
74
- log("Potential positional path:", potentialPath);
75
- log("Path exists?", fs.existsSync(potentialPath));
76
- if (fs.existsSync(potentialPath)) {
77
- docsDir = potentialPath;
78
- log("Setting docs dir from positional argument:", docsDir);
79
- }
80
- else {
81
- log("Path doesn't exist, not using as docs dir:", potentialPath);
82
- }
83
- }
84
- }
85
- }
86
- log("Final docs dir:", docsDir);
87
- // Show help if requested
88
- if (showHelp) {
89
- console.log(`
90
- MCP Docs Service - Documentation Management Service
91
-
92
- Usage:
93
- mcp-docs-service [options]
94
- mcp-docs-service <docs-directory> [options]
95
-
96
- Options:
97
- --docs-dir <path> Specify the docs directory (default: ./docs)
98
- --create-dir Create the docs directory if it doesn't exist
99
- --health-check Run a health check on the documentation
100
- --help, -h Show this help message
101
- `);
102
- process.exit(0);
103
- }
104
- // Create docs directory if it doesn't exist and --create-dir is specified
105
- if (createDir) {
106
- try {
107
- if (!fs.existsSync(docsDir)) {
108
- fs.mkdirSync(docsDir, { recursive: true });
109
- log(`Created docs directory: ${docsDir}`);
110
- }
111
- }
112
- catch (error) {
113
- errorLog(`Error creating docs directory: ${error}`);
114
- process.exit(1);
115
- }
116
- }
117
- // Ensure the docs directory exists
118
- if (!fs.existsSync(docsDir)) {
119
- errorLog(`Error: Docs directory does not exist: ${docsDir}`);
120
- errorLog(`Use --create-dir to create it automatically`);
121
- process.exit(1);
122
- }
123
- // Add the docs directory to process.argv so it's available to the main service
124
- process.argv.push(docsDir);
125
- // Add health check flag to process.argv if specified
126
- if (healthCheck) {
127
- process.argv.push("--health-check");
128
- }
129
- // Import the main service
130
- import "../index.js";
131
- // The main service will handle the CLI arguments and execution
132
- // No additional code needed here as the main index.ts already has CLI functionality
133
- //# sourceMappingURL=bin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bin.js","sourceRoot":"","sources":["../../src/cli/bin.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,4BAA4B;AAC5B,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAE3C,6CAA6C;AAC7C,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,aAAa,KAAK,MAAM;IACpC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,gCAAgC,CAAC,CAAC,CAAC;AAE7E,6DAA6D;AAC7D,MAAM,GAAG,GAAG,CAAC,GAAG,IAAW,EAAE,EAAE;IAC7B,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;IACvB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,GAAG,IAAW,EAAE,EAAE;IAClC,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;AACzB,CAAC,CAAC;AAEF,+BAA+B;AAC/B,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnC,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;A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CAAC;IACb,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;GAYX,CAAC,CAAC;IACH,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,0EAA0E;AAC1E,IAAI,SAAS,EAAE,CAAC;IACd,IAAI,CAAC;QACH,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;YAC5B,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YAC3C,GAAG,CAAC,2BAA2B,OAAO,EAAE,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,QAAQ,CAAC,kCAAkC,KAAK,EAAE,CAAC,CAAC;QACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,mCAAmC;AACnC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;IAC5B,QAAQ,CAAC,yCAAyC,OAAO,EAAE,CAAC,CAAC;IAC7D,QAAQ,CAAC,6CAA6C,CAAC,CAAC;IACxD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,+EAA+E;AAC/E,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAE3B,qDAAqD;AACrD,IAAI,WAAW,EAAE,CAAC;IAChB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;AACtC,CAAC;AAED,0BAA0B;AAC1B,OAAO,aAAa,CAAC;AAErB,+DAA+D;AAC/D,oFAAoF"}
@@ -1,26 +0,0 @@
1
- import { ToolResponse } from "../types/tools.js";
2
- /**
3
- * Reads a markdown document and extracts its content and metadata
4
- */
5
- export declare function readDocument(docPath: string, allowedDirectories: string[]): Promise<ToolResponse>;
6
- /**
7
- * Lists all markdown documents in a directory
8
- */
9
- export declare function listDocuments(basePath: string, allowedDirectories: string[]): Promise<ToolResponse>;
10
- /**
11
- * Gets the structure of the documentation directory
12
- */
13
- export declare function getStructure(basePath: string, allowedDirectories: string[]): Promise<ToolResponse>;
14
- /**
15
- * Gets the navigation structure for the documentation
16
- */
17
- export declare function getNavigation(basePath: string, allowedDirectories: string[]): Promise<ToolResponse>;
18
- /**
19
- * Checks the health of documentation
20
- */
21
- export declare function checkDocumentationHealth(basePath: string, options: {
22
- checkLinks?: boolean;
23
- checkMetadata?: boolean;
24
- checkOrphans?: boolean;
25
- requiredMetadataFields?: string[];
26
- }, allowedDirectories: string[]): Promise<ToolResponse>;