Skip to main content
Glama

disable_doc

Stop web crawlers from indexing a specific document by disabling its crawling functionality.

Instructions

Disable crawling for a specific doc

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the doc to disable

Implementation Reference

  • The handler logic for the 'disable_doc' tool. It takes the doc name from arguments, sets docConfig[name] = false to disable it, saves the config to file, and returns a success message.
    case "disable_doc": { const name = String(request.params.arguments?.name); docConfig[name] = false; await saveDocConfig(); return { content: [{ type: "text", text: `Disabled doc ${name}` }] }; }
  • src/index.ts:422-434 (registration)
    The tool registration and schema definition for 'disable_doc' in the listTools response, specifying name, description, and input schema requiring a 'name' string.
    name: "disable_doc", description: "Disable crawling for a specific doc", inputSchema: { type: "object", properties: { name: { type: "string", description: "Name of the doc to disable" } }, required: ["name"] } },
  • The saveDocConfig helper function called by disable_doc handler to persist the updated docConfig to docs-config.json file.
    async function saveDocConfig(): Promise<void> { try { const config = { enabledDocs: docConfig, crawledDocs: {} }; if (await fs.pathExists(configPath)) { const existingConfig = await fs.readJson(configPath); config.crawledDocs = existingConfig.crawledDocs || {}; } await fs.ensureDir(docDir); await fs.writeJson(configPath, config, { spaces: 2 }); } catch (error) { console.error('Failed to save doc config:', error); } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/askme765cs/open-docs-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server