enable_doc
Enable crawling for a specific document on open-docs-mcp by specifying its name, ensuring it is indexed and accessible for search and retrieval.
Instructions
Enable crawling for a specific doc
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the doc to enable |
Implementation Reference
- src/index.ts:539-549 (handler)The core handler logic for the 'enable_doc' tool. It extracts the document name from arguments, enables it in the docConfig by setting it to true, saves the configuration to file, and returns a success message.case "enable_doc": { const name = String(request.params.arguments?.name); docConfig[name] = true; await saveDocConfig(); return { content: [{ type: "text", text: `Enabled doc ${name}` }] }; }
- src/index.ts:407-420 (registration)Registration of the 'enable_doc' tool in the ListToolsRequestSchema handler, including the tool name, description, and input schema definition (object with required 'name' string property).{ name: "enable_doc", description: "Enable crawling for a specific doc", inputSchema: { type: "object", properties: { name: { type: "string", description: "Name of the doc to enable" } }, required: ["name"] } },
- src/index.ts:410-420 (schema)Input schema for the 'enable_doc' tool, defining validation for the arguments: an object with a required 'name' string.inputSchema: { type: "object", properties: { name: { type: "string", description: "Name of the doc to enable" } }, required: ["name"] } },