Skip to main content
Glama

cortex_enable_analyzer

Enable an analyzer definition in your organization by providing its ID and optional configuration values for API keys, rate limits, and job caching.

Instructions

Enable an analyzer definition in the current organization. Provide configuration values for any required fields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
definitionIdYesThe analyzer definition ID (e.g., 'Abuse_Finder_3_0', 'VirusTotal_GetReport_3_1')
configurationNoConfiguration key-value pairs (API keys, URLs, etc.). Check cortex_list_analyzer_definitions for required fields.
rateNoRate limit: max jobs per rate unit (default: 100)
rateUnitNoRate limit unit (default: Day)Day
jobCacheNoCache duration in minutes for identical jobs (default: 10)

Implementation Reference

  • The main tool definition and handler for 'cortex_enable_analyzer'. Registers it on the MCP server with Zod schema for definitionId, configuration, rate, rateUnit, jobCache. The handler calls client.enableAnalyzer() and returns a JSON response with the enabled analyzer details.
    server.tool(
      "cortex_enable_analyzer",
      "Enable an analyzer definition in the current organization. Provide configuration values for any required fields.",
      {
        definitionId: z
          .string()
          .describe("The analyzer definition ID (e.g., 'Abuse_Finder_3_0', 'VirusTotal_GetReport_3_1')"),
        configuration: z
          .record(z.string(), z.unknown())
          .default({})
          .describe("Configuration key-value pairs (API keys, URLs, etc.). Check cortex_list_analyzer_definitions for required fields."),
        rate: z
          .number()
          .int()
          .min(0)
          .default(100)
          .describe("Rate limit: max jobs per rate unit (default: 100)"),
        rateUnit: z
          .enum(["Day", "Hour", "Minute"])
          .default("Day")
          .describe("Rate limit unit (default: Day)"),
        jobCache: z
          .number()
          .int()
          .min(0)
          .default(10)
          .describe("Cache duration in minutes for identical jobs (default: 10)"),
      },
      async ({ definitionId, configuration, rate, rateUnit, jobCache }) => {
        try {
          const analyzer = await client.enableAnalyzer({
            name: definitionId,
            configuration,
            rate,
            rateUnit,
            jobCache,
          });
    
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(
                  {
                    id: analyzer.id,
                    name: analyzer.name,
                    version: analyzer.version,
                    dataTypes: analyzer.dataTypeList,
                    message: `Analyzer "${analyzer.name}" enabled successfully. It can now analyze: ${analyzer.dataTypeList.join(", ")}`,
                  },
                  null,
                  2,
                ),
              },
            ],
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text" as const,
                text: `Error enabling analyzer: ${error instanceof Error ? error.message : String(error)}`,
              },
            ],
            isError: true,
          };
        }
      },
    );
  • Zod input validation schema for cortex_enable_analyzer: definitionId (string), configuration (record of string->unknown, default {}), rate (int min 0, default 100), rateUnit (enum Day/Hour/Minute, default Day), jobCache (int min 0, default 10).
    {
      definitionId: z
        .string()
        .describe("The analyzer definition ID (e.g., 'Abuse_Finder_3_0', 'VirusTotal_GetReport_3_1')"),
      configuration: z
        .record(z.string(), z.unknown())
        .default({})
        .describe("Configuration key-value pairs (API keys, URLs, etc.). Check cortex_list_analyzer_definitions for required fields."),
      rate: z
        .number()
        .int()
        .min(0)
        .default(100)
        .describe("Rate limit: max jobs per rate unit (default: 100)"),
      rateUnit: z
        .enum(["Day", "Hour", "Minute"])
        .default("Day")
        .describe("Rate limit unit (default: Day)"),
      jobCache: z
        .number()
        .int()
        .min(0)
        .default(10)
        .describe("Cache duration in minutes for identical jobs (default: 10)"),
    },
  • src/index.ts:40-44 (registration)
    Registration call: registerAnalyzerDefinitionTools(server, client) is invoked in the main index.ts to plug the tool into the MCP server.
    registerAnalyzerDefinitionTools(server, client);
    registerResponderDefinitionTools(server, client);
    registerStatusTools(server, client);
    registerOrganizationTools(server, client);
    registerUserTools(server, client);
  • EnableWorkerRequest interface type used by the helper method. Defines the shape: name, configuration, optional rate/rateUnit/jobCache.
    export interface EnableWorkerRequest {
      name: string;
      configuration: Record<string, unknown>;
      rate?: number;
      rateUnit?: string;
      jobCache?: number;
    }
  • The client.enableAnalyzer() method that performs the actual HTTP POST request to /organization/analyzer/{name} with the configuration body.
    async enableAnalyzer(data: EnableWorkerRequest): Promise<Analyzer> {
      return this.request<Analyzer>(
        `/organization/analyzer/${encodeURIComponent(data.name)}`,
        {
          method: "POST",
          body: JSON.stringify({
            name: data.name,
            configuration: data.configuration,
            rate: data.rate ?? 100,
            rateUnit: data.rateUnit ?? "Day",
            jobCache: data.jobCache ?? 10,
          }),
        },
      );
    }
Behavior2/5

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

No annotations are provided, and the description does not disclose behavioral traits like reversibility, permissions needed, or side effects of enabling an analyzer. The word 'Enable' implies a state change, but further context is missing.

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 sentence that conveys the core purpose without extraneous words. It is efficiently front-loaded and easy to parse.

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

Completeness3/5

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

The tool has 5 parameters with full schema coverage and no output schema. The description is brief but covers the basic action. However, it does not explain the result of enabling (e.g., return value, immediate effect) or how to verify success, which might be needed for a complete understanding.

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?

Schema description coverage is 100%, so the baseline is 3. The description adds minimal additional meaning beyond the schema, such as mentioning that configuration values are for required fields and referencing another tool for details. This is adequate but not enriching.

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

Purpose5/5

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

The description clearly states the tool's action ('Enable an analyzer definition') and context ('in the current organization'), and mentions providing configuration values. This distinguishes it from sibling tools like cortex_disable_analyzer and cortex_list_analyzer_definitions.

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 explicit guidance on when to use this tool versus alternatives. The description only references another tool (cortex_list_analyzer_definitions) for finding required fields, but does not explain when enabling is appropriate or when to choose a different tool.

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/solomonneas/cortex-mcp'

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