Skip to main content
Glama

cortex_delete_job

Delete a specific analysis job by providing its job ID. Remove unwanted or completed jobs to manage resources.

Instructions

Delete a specific analysis job by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jobIdYesThe job ID to delete

Implementation Reference

  • The tool handler for 'cortex_delete_job'. Calls client.deleteJob(jobId) and returns a success/error response.
    server.tool(
      "cortex_delete_job",
      "Delete a specific analysis job by ID",
      {
        jobId: z.string().describe("The job ID to delete"),
      },
      async ({ jobId }) => {
        try {
          await client.deleteJob(jobId);
          return {
            content: [
              {
                type: "text" as const,
                text: `Job "${jobId}" deleted successfully.`,
              },
            ],
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text" as const,
                text: `Error deleting job: ${error instanceof Error ? error.message : String(error)}`,
              },
            ],
            isError: true,
          };
        }
      },
  • Input schema for cortex_delete_job: expects a single 'jobId' string parameter.
    {
      jobId: z.string().describe("The job ID to delete"),
    },
  • src/index.ts:8-35 (registration)
    Registration point where registerJobTools is called to register all job tools including cortex_delete_job.
    import { registerResponderTools } from "./tools/responders.js";
    import { registerResponderDefinitionTools } from "./tools/responder-definitions.js";
    import { registerBulkTools } from "./tools/bulk.js";
    import { registerStatusTools } from "./tools/status.js";
    import { registerOrganizationTools } from "./tools/organizations.js";
    import { registerUserTools } from "./tools/users.js";
    import { registerResources } from "./resources.js";
    import { registerPrompts } from "./prompts.js";
    
    async function main(): Promise<void> {
      const config = getConfig();
    
      if (!config.verifySsl) {
        process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
      }
    
      const server = new McpServer({
        name: "cortex-mcp",
        version: "1.2.0",
        description:
          "MCP server for Cortex - observable analysis and active response engine by StrangeBee/TheHive Project",
      });
    
      const client = new CortexClient(config);
    
      // Core analysis tools
      registerAnalyzerTools(server, client);
      registerJobTools(server, client);
  • src/tools/jobs.ts:5-8 (registration)
    The registerJobTools function that registers all job-related tools on the server.
    export function registerJobTools(
      server: McpServer,
      client: CortexClient,
    ): void {
  • The client-side deleteJob method that sends a DELETE request to /job/{jobId}.
    async deleteJob(jobId: string): Promise<void> {
      await this.request<void>(
        `/job/${encodeURIComponent(jobId)}`,
        { method: "DELETE" },
      );
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It only states 'delete' without mentioning side effects (e.g., permanence, associated artifacts). The description is too minimal for a destructive operation.

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?

A single, front-loaded sentence with no extraneous words. Efficiently conveys the tool's purpose.

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?

For a simple tool with one required parameter and no output schema, the description covers the basics. However, it could mention return values or confirmation behavior, which are absent.

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 coverage is 100% with a clear description for jobId. The description adds no extra information beyond the schema; it simply restates the need for an ID.

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 action (delete) and the resource (analysis job by ID). It is specific and distinguishes the tool from siblings like cortex_get_job or cortex_list_jobs.

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

Usage Guidelines3/5

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

The description provides no explicit guidance on when to use or not use this tool. It implies usage when a job needs deletion, but lacks context such as prerequisites or conditions (e.g., only delete failed jobs).

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