Skip to main content
Glama

misp_search_galaxy_clusters

Find threat intelligence entities like MITRE ATT&CK techniques, threat actors, and malware by searching galaxy clusters with keywords.

Instructions

Search galaxy clusters by keyword (find specific MITRE ATT&CK techniques, threat actors, malware, etc.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
searchYesSearch term (e.g., 'phishing', 'APT28', 'ransomware', 'T1566')
galaxyTypeNoLimit to a specific galaxy type (e.g., mitre-attack-pattern, mitre-intrusion-set)

Implementation Reference

  • The tool handler for 'misp_search_galaxy_clusters' implementing the search logic. Defines the handler function that receives search and optional galaxyType, calls client.searchGalaxyClusters(), formats results, and returns them.
    // Search galaxy clusters
    server.tool(
      "misp_search_galaxy_clusters",
      "Search galaxy clusters by keyword (find specific MITRE ATT&CK techniques, threat actors, malware, etc.)",
      {
        search: z
          .string()
          .describe(
            "Search term (e.g., 'phishing', 'APT28', 'ransomware', 'T1566')"
          ),
        galaxyType: z
          .string()
          .optional()
          .describe(
            "Limit to a specific galaxy type (e.g., mitre-attack-pattern, mitre-intrusion-set)"
          ),
      },
      async ({ search, galaxyType }) => {
        try {
          const results = await client.searchGalaxyClusters(search, galaxyType);
    
          if (results.length === 0) {
            return {
              content: [
                {
                  type: "text",
                  text: `No galaxy clusters found matching "${search}".`,
                },
              ],
            };
          }
    
          const summary = results.map((c) => ({
            id: c.id,
            galaxy_id: c.galaxy_id,
            value: c.value,
            description:
              c.description && c.description.length > 200
                ? c.description.slice(0, 200) + "..."
                : c.description,
            tag_name: c.tag_name,
            type: c.type,
          }));
    
          return {
            content: [{ type: "text", text: JSON.stringify(summary, null, 2) }],
          };
        } catch (err) {
          return {
            content: [
              {
                type: "text",
                text: `Error searching galaxy clusters: ${err instanceof Error ? err.message : String(err)}`,
              },
            ],
            isError: true,
          };
        }
      }
    );
  • Input schema for the tool: 'search' (required string) and 'galaxyType' (optional string) parameters with descriptions.
    {
      search: z
        .string()
        .describe(
          "Search term (e.g., 'phishing', 'APT28', 'ransomware', 'T1566')"
        ),
      galaxyType: z
        .string()
        .optional()
        .describe(
          "Limit to a specific galaxy type (e.g., mitre-attack-pattern, mitre-intrusion-set)"
        ),
    },
  • Tool registration via server.tool() with name 'misp_search_galaxy_clusters', description, input schema, and handler. The registration is part of the registerGalaxyTools() function called from index.ts.
    server.tool(
      "misp_search_galaxy_clusters",
      "Search galaxy clusters by keyword (find specific MITRE ATT&CK techniques, threat actors, malware, etc.)",
      {
        search: z
          .string()
          .describe(
            "Search term (e.g., 'phishing', 'APT28', 'ransomware', 'T1566')"
          ),
        galaxyType: z
          .string()
          .optional()
          .describe(
            "Limit to a specific galaxy type (e.g., mitre-attack-pattern, mitre-intrusion-set)"
          ),
      },
      async ({ search, galaxyType }) => {
        try {
          const results = await client.searchGalaxyClusters(search, galaxyType);
    
          if (results.length === 0) {
            return {
              content: [
                {
                  type: "text",
                  text: `No galaxy clusters found matching "${search}".`,
                },
              ],
            };
          }
    
          const summary = results.map((c) => ({
            id: c.id,
            galaxy_id: c.galaxy_id,
            value: c.value,
            description:
              c.description && c.description.length > 200
                ? c.description.slice(0, 200) + "..."
                : c.description,
            tag_name: c.tag_name,
            type: c.type,
          }));
    
          return {
            content: [{ type: "text", text: JSON.stringify(summary, null, 2) }],
          };
        } catch (err) {
          return {
            content: [
              {
                type: "text",
                text: `Error searching galaxy clusters: ${err instanceof Error ? err.message : String(err)}`,
              },
            ],
            isError: true,
          };
        }
      }
    );
  • The MispClient.searchGalaxyClusters() helper method that makes the actual HTTP POST request to /galaxy_clusters/restSearch with searchall and optional context parameters, returning parsed MispGalaxyCluster objects.
    async searchGalaxyClusters(
      search: string,
      galaxyType?: string
    ): Promise<MispGalaxyCluster[]> {
      const body: Record<string, unknown> = {
        searchall: search,
      };
      if (galaxyType) body.context = galaxyType;
    
      const data = await this.request<
        Array<{ GalaxyCluster: MispGalaxyCluster }>
      >("POST", "/galaxy_clusters/restSearch", body);
      return (data || []).map((c) => c.GalaxyCluster);
    }
  • The MispGalaxyCluster interface type definition used by the tool, containing fields: id, uuid, type, value, tag_name, description, galaxy_id.
    export interface MispGalaxyCluster {
      id: string;
      uuid: string;
      type: string;
      value: string;
      tag_name: string;
      description: string;
      galaxy_id: string;
    }
Behavior2/5

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

No annotations provided, so description carries full burden. It discloses search by keyword but omits behaviors like case sensitivity, wildcard support, pagination, or whether it searches all galaxy types by default. Basic purpose but lacks depth.

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?

Single sentence with parenthetical examples is highly concise and front-loaded. No wasted words.

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?

With no annotations and no output schema, the description is incomplete. It does not mention output format, limits, or other behavioral traits that would help an agent use the tool effectively.

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 has 100% description coverage for both parameters (search and galaxyType). The tool description adds context with examples, but does not provide additional semantics beyond the schema. Baseline score of 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 it searches galaxy clusters by keyword, with specific examples like MITRE ATT&CK techniques, threat actors, malware. This distinguishes it from sibling tools that search attributes or events.

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 implies use when searching galaxy clusters for specific content, but does not explicitly state when to use this tool versus alternatives like misp_search_attributes or misp_search_events.

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