Skip to main content
Glama

enable_doc

Activate crawling for a specific document to make its content searchable and accessible within the document management system.

Instructions

Enable crawling for a specific doc

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the doc to enable

Implementation Reference

  • The handler for the 'enable_doc' tool. It extracts the doc name from arguments, sets it as enabled in the global docConfig, saves the config 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. Includes the tool name, description, and input schema definition requiring a 'name' string.
    {
      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"]
      }
    },
  • Input schema for the 'enable_doc' tool, defining an object with a required 'name' string property.
    inputSchema: {
      type: "object",
      properties: {
        name: {
          type: "string",
          description: "Name of the doc to enable"
        }
      },
      required: ["name"]
  • Helper function called by the enable_doc handler to persist the updated docConfig to the JSON config file, preserving existing crawledDocs data.
    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);
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action is to 'enable crawling' which implies a mutation/write operation, but doesn't describe what enabling entails (e.g., permissions needed, immediate vs scheduled effect, error conditions, or what 'crawling' means in this context).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's appropriately sized for a simple tool and front-loads the essential information immediately.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is inadequate. It doesn't explain what 'enabling crawling' means operationally, what the expected outcome is, or how this interacts with sibling tools like 'crawl_docs' or 'disable_doc'. The context signals indicate this is a simple tool, but more behavioral context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100% with the single parameter 'name' documented as 'Name of the doc to enable'. The description adds no additional parameter information beyond what the schema provides, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('enable crawling') and the resource ('for a specific doc'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'disable_doc' or 'crawl_docs', but the verb 'enable' provides some inherent distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'disable_doc' or 'crawl_docs'. The description implies it's for enabling crawling on a specific document, but doesn't mention prerequisites, when it's appropriate, or what happens after enabling.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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