Skip to main content
Glama

misp_correlate

Find all MISP events containing a given observable value (IP, domain, hash, etc.) to identify correlations and related threat intelligence.

Instructions

Find correlations for a specific observable value across all MISP events

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYesObservable value to correlate (IP, domain, hash, etc.)

Implementation Reference

  • The main handler for the 'misp_correlate' tool. It accepts a 'value' parameter (observable value like IP, domain, hash, etc.), searches MISP attributes using searchAttributes with includeCorrelations=true, aggregates results by event, collects related attribute correlations, and returns a JSON response with found events and cross-event correlations.
    server.tool(
      "misp_correlate",
      "Find correlations for a specific observable value across all MISP events",
      {
        value: z.string().describe("Observable value to correlate (IP, domain, hash, etc.)"),
      },
      async ({ value }) => {
        try {
          const attributes = await client.searchAttributes({
            value,
            includeCorrelations: true,
          });
    
          if (attributes.length === 0) {
            return {
              content: [{ type: "text", text: `No results found for "${value}" in MISP.` }],
            };
          }
    
          // Aggregate by event
          const eventMap = new Map<
            string,
            { event_id: string; event_info: string; attributes: Array<{ id: string; type: string; category: string; value: string }> }
          >();
    
          for (const attr of attributes) {
            const eid = attr.event_id;
            if (!eventMap.has(eid)) {
              eventMap.set(eid, {
                event_id: eid,
                event_info: attr.Event?.info || "Unknown",
                attributes: [],
              });
            }
            eventMap.get(eid)!.attributes.push({
              id: attr.id,
              type: attr.type,
              category: attr.category,
              value: attr.value,
            });
          }
    
          // Collect related attributes (correlations)
          const correlations: Array<{ value: string; type: string; event_id: string }> = [];
          for (const attr of attributes) {
            if (attr.RelatedAttribute) {
              for (const rel of attr.RelatedAttribute) {
                correlations.push({
                  value: rel.value,
                  type: rel.type,
                  event_id: rel.event_id,
                });
              }
            }
          }
    
          const result = {
            searched_value: value,
            found_in_events: Array.from(eventMap.values()),
            total_events: eventMap.size,
            total_attributes: attributes.length,
            correlations: correlations.length > 0 ? correlations : undefined,
          };
    
          return {
            content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
          };
        } catch (err) {
          return {
            content: [
              { type: "text", text: `Error correlating value: ${err instanceof Error ? err.message : String(err)}` },
            ],
            isError: true,
          };
        }
      }
    );
  • Input schema for 'misp_correlate'. Defines a single required parameter 'value' of type string, described as 'Observable value to correlate (IP, domain, hash, etc.)'.
    {
      value: z.string().describe("Observable value to correlate (IP, domain, hash, etc.)"),
    },
  • The 'misp_correlate' tool is registered via server.tool() inside the registerCorrelationTools() function in src/tools/correlation.ts. This function is called from src/index.ts line 33.
    export function registerCorrelationTools(server: McpServer, client: MispClient): void {
      // Correlate an observable value
      server.tool(
        "misp_correlate",
        "Find correlations for a specific observable value across all MISP events",
        {
          value: z.string().describe("Observable value to correlate (IP, domain, hash, etc.)"),
        },
        async ({ value }) => {
          try {
            const attributes = await client.searchAttributes({
              value,
              includeCorrelations: true,
            });
    
            if (attributes.length === 0) {
              return {
                content: [{ type: "text", text: `No results found for "${value}" in MISP.` }],
              };
            }
    
            // Aggregate by event
            const eventMap = new Map<
              string,
              { event_id: string; event_info: string; attributes: Array<{ id: string; type: string; category: string; value: string }> }
            >();
    
            for (const attr of attributes) {
              const eid = attr.event_id;
              if (!eventMap.has(eid)) {
                eventMap.set(eid, {
                  event_id: eid,
                  event_info: attr.Event?.info || "Unknown",
                  attributes: [],
                });
              }
              eventMap.get(eid)!.attributes.push({
                id: attr.id,
                type: attr.type,
                category: attr.category,
                value: attr.value,
              });
            }
    
            // Collect related attributes (correlations)
            const correlations: Array<{ value: string; type: string; event_id: string }> = [];
            for (const attr of attributes) {
              if (attr.RelatedAttribute) {
                for (const rel of attr.RelatedAttribute) {
                  correlations.push({
                    value: rel.value,
                    type: rel.type,
                    event_id: rel.event_id,
                  });
                }
              }
            }
    
            const result = {
              searched_value: value,
              found_in_events: Array.from(eventMap.values()),
              total_events: eventMap.size,
              total_attributes: attributes.length,
              correlations: correlations.length > 0 ? correlations : undefined,
            };
    
            return {
              content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
            };
          } catch (err) {
            return {
              content: [
                { type: "text", text: `Error correlating value: ${err instanceof Error ? err.message : String(err)}` },
              ],
              isError: true,
            };
          }
        }
      );
  • The searchAttributes method on MispClient that the misp_correlate handler calls. It POSTs to /attributes/restSearch with optional filters like value, type, category, tags, to_ids, includeCorrelations, last, and limit.
    async searchAttributes(params: {
      value?: string;
      type?: string;
      category?: string;
      tags?: string[];
      to_ids?: boolean;
      includeCorrelations?: boolean;
      last?: string;
      limit?: number;
    }): Promise<MispAttribute[]> {
      const body: Record<string, unknown> = {
        returnFormat: "json",
        limit: params.limit ?? 50,
      };
    
      if (params.value) body.value = params.value;
      if (params.type) body.type = params.type;
      if (params.category) body.category = params.category;
      if (params.tags) body.tags = params.tags;
      if (params.to_ids !== undefined) body.to_ids = params.to_ids ? 1 : 0;
      if (params.includeCorrelations)
        body.includeCorrelations = 1;
      if (params.last) body.last = params.last;
    
      const data = await this.request<AttributeSearchResponse>(
        "POST",
        "/attributes/restSearch",
        body
      );
      return data.response?.Attribute || [];
    }
  • src/index.ts:33-33 (registration)
    The top-level registration call: registerCorrelationTools(server, client) which wires the misp_correlate tool into the MCP server.
    registerCorrelationTools(server, client);
Behavior2/5

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

No annotations provided, and the description does not disclose behavioral traits such as permissions required, performance implications, or whether it is read-only. The description only states the purpose.

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, well-formed sentence that conveys the tool's entire purpose without waste. It is appropriately concise and front-loaded.

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 one-parameter tool with no output schema, the description is adequate but lacks details on return format or potential limitations. More context would improve agent 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 coverage is 100%, and the description adds context that correlation is across all events, but it does not elaborate on parameter formatting or edge cases. Baseline 3 is appropriate.

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 verb 'find' and the resource 'correlations for a specific observable value across all MISP events', distinguishing it from sibling tools like misp_search_events or misp_search_attributes.

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 on when to use this tool versus alternatives. The description does not mention prerequisites or exclusions, leaving the agent without context for tool selection.

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/misp-mcp'

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