Skip to main content
Glama
thehive-mcp

thehive-mcp

by lidless-labs

thehive_query

Read-onlyIdempotent

Execute raw TheHive Query API requests for complex searches including date ranges, AND/OR logic, nested queries, and counting.

Instructions

Execute a raw TheHive Query API request. Use this for complex searches that other tools can't handle (date ranges, AND/OR logic, nested queries, counting, etc.).

Common query filters:

  • List entities: {"_name": "listCase"}, {"_name": "listAlert"}, {"_name": "listObservable"}

  • Filter by field: {"_name": "filter", "_field": "severity", "_value": 3}

  • Filter by date range: {"_name": "filter", "_gte": {"_field": "_createdAt", "_value": <timestamp_ms>}}

  • Like search: {"_name": "filter", "_like": {"_field": "title", "_value": "phishing"}}

  • Get children: {"_name": "getCase", "idOrName": ""}, {"_name": "tasks"}

  • Count: {"_name": "count"}

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "thehive_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoQuery name for caching/debugging
sortNoSort fields, prefix with '-' for descending (e.g. ['-_createdAt'])
queryYesJSON array of query filter objects (TheHive Query DSL)
rangeNoResult range, e.g. '0-50' (default: '0-100', max 500 results)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive behavior, so the description does not need to restate the safety profile. It adds real value by showing concrete query shapes and their intent (list, filter, date range, like, children, count), which communicates how the API behaves. It stays silent on result volume behavior, though the 500-result cap lives in the schema rather than here.

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

Conciseness4/5

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

Front-loaded with purpose and the guiding constraint in two sentences, then a compact bulleted example table. Each example earns its place as a distinct DSL construct; no filler.

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 free-form DSL tool with no output schema, the examples are necessary and present, but the description never indicates what a response looks like or how results are shaped, forcing the agent to rely on the schema's range note alone. Adequate, with a clear gap around return expectations.

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

Parameters4/5

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

Schema coverage is 100%, so baseline would be 3, but the description goes further by demonstrating the actual TheHive Query DSL grammar the opaque "query" string must contain. Minor friction: the schema describes query as an array of filter objects while the examples show single objects, which could confuse format expectations.

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?

States a specific verb and resource ("Execute a raw TheHive Query API request") and immediately scopes it to searches other tools cannot handle, which lets an agent tell it apart from the typed list/get siblings.

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

Usage Guidelines4/5

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

Gives explicit when-to-use criteria (date ranges, AND/OR logic, nested queries, counting) that distinguish this from the dedicated listing/get tools. It does not name which specific sibling to prefer for simple lookups, leaving that mapping to inference.

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