Skip to main content
Glama

misp_create_event

Create a new MISP event to document incidents or threat intelligence. Does not publish; use publish event separately.

Instructions

Create a new MISP event for documenting incidents or threat intelligence. Does not publish - use misp_publish_event separately.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
infoYesEvent description/title
distributionYes0=Organization only, 1=Community, 2=Connected communities, 3=All communities, 4=Sharing group
threatLevelYes1=High, 2=Medium, 3=Low, 4=Undefined
analysisYes0=Initial, 1=Ongoing, 2=Complete
dateNoEvent date (YYYY-MM-DD)
tagsNoTags to apply

Implementation Reference

  • Registration of the 'misp_create_event' tool with the MCP server, including its schema (info, distribution, threatLevel, analysis, date, tags) and the handler callback.
    // Create event
    server.tool(
      "misp_create_event",
      "Create a new MISP event for documenting incidents or threat intelligence. Does not publish - use misp_publish_event separately.",
      {
        info: z.string().describe("Event description/title"),
        distribution: z.union([z.literal(0), z.literal(1), z.literal(2), z.literal(3), z.literal(4)])
          .describe("0=Organization only, 1=Community, 2=Connected communities, 3=All communities, 4=Sharing group"),
        threatLevel: z.union([z.literal(1), z.literal(2), z.literal(3), z.literal(4)])
          .describe("1=High, 2=Medium, 3=Low, 4=Undefined"),
        analysis: z.union([z.literal(0), z.literal(1), z.literal(2)])
          .describe("0=Initial, 1=Ongoing, 2=Complete"),
        date: z.string().optional().describe("Event date (YYYY-MM-DD)"),
        tags: z.array(z.string()).optional().describe("Tags to apply"),
      },
      async (params) => {
        try {
          const event = await client.createEvent({
            info: params.info,
            distribution: params.distribution,
            threat_level_id: params.threatLevel,
            analysis: params.analysis,
            date: params.date,
            tags: params.tags,
          });
    
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(
                  {
                    id: event.id,
                    uuid: event.uuid,
                    info: event.info,
                    date: event.date,
                    published: event.published,
                    tags: (event.Tag || []).map((t) => t.name),
                  },
                  null,
                  2
                ),
              },
            ],
          };
        } catch (err) {
          return {
            content: [
              { type: "text", text: `Error creating event: ${err instanceof Error ? err.message : String(err)}` },
            ],
            isError: true,
          };
        }
      }
    );
  • Handler function that calls client.createEvent() with the validated parameters and returns formatted response including event id, uuid, info, date, published status, and tags.
    async (params) => {
      try {
        const event = await client.createEvent({
          info: params.info,
          distribution: params.distribution,
          threat_level_id: params.threatLevel,
          analysis: params.analysis,
          date: params.date,
          tags: params.tags,
        });
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(
                {
                  id: event.id,
                  uuid: event.uuid,
                  info: event.info,
                  date: event.date,
                  published: event.published,
                  tags: (event.Tag || []).map((t) => t.name),
                },
                null,
                2
              ),
            },
          ],
        };
      } catch (err) {
        return {
          content: [
            { type: "text", text: `Error creating event: ${err instanceof Error ? err.message : String(err)}` },
          ],
          isError: true,
        };
      }
    }
  • Zod schema defining input parameters: info (required string), distribution (0-4), threatLevel (1-4), analysis (0-2), date (optional string YYYY-MM-DD), tags (optional array of strings).
    {
      info: z.string().describe("Event description/title"),
      distribution: z.union([z.literal(0), z.literal(1), z.literal(2), z.literal(3), z.literal(4)])
        .describe("0=Organization only, 1=Community, 2=Connected communities, 3=All communities, 4=Sharing group"),
      threatLevel: z.union([z.literal(1), z.literal(2), z.literal(3), z.literal(4)])
        .describe("1=High, 2=Medium, 3=Low, 4=Undefined"),
      analysis: z.union([z.literal(0), z.literal(1), z.literal(2)])
        .describe("0=Initial, 1=Ongoing, 2=Complete"),
      date: z.string().optional().describe("Event date (YYYY-MM-DD)"),
      tags: z.array(z.string()).optional().describe("Tags to apply"),
    },
  • The createEvent method on MispClient that POSTs to /events/add endpoint, then optionally tags the event and re-fetches it to return a complete MispEvent.
    async createEvent(params: {
      info: string;
      distribution: number;
      threat_level_id: number;
      analysis: number;
      date?: string;
      tags?: string[];
    }): Promise<MispEvent> {
      const eventData: Record<string, unknown> = {
        info: params.info,
        distribution: params.distribution,
        threat_level_id: params.threat_level_id,
        analysis: params.analysis,
      };
    
      if (params.date) eventData.date = params.date;
    
      const data = await this.request<EventResponse>("POST", "/events/add", {
        Event: eventData,
      });
    
      // Add tags after creation if specified
      if (params.tags && params.tags.length > 0 && data.Event.id) {
        for (const tag of params.tags) {
          await this.tagEvent(data.Event.id, tag);
        }
        // Re-fetch to include tags
        return this.getEvent(data.Event.id);
      }
    
      return data.Event;
    }
  • MispEvent interface defining the shape of a MISP event returned from the API, including id, uuid, info, date, published, and Tag[].
    export interface MispEvent {
      id: string;
      orgc_id: string;
      org_id: string;
      info: string;
      date: string;
      threat_level_id: string;
      analysis: string;
      distribution: string;
      published: boolean;
      uuid: string;
      timestamp: string;
      publish_timestamp: string;
      attribute_count: string;
      Orgc?: { id: string; name: string; uuid: string };
      Org?: { id: string; name: string; uuid: string };
      Tag?: MispTag[];
      Attribute?: MispAttribute[];
      Object?: MispObject[];
      Galaxy?: MispGalaxy[];
      RelatedEvent?: Array<{ Event: MispEvent }>;
    }
Behavior3/5

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

With no annotations, the description must disclose behavioral traits. It mentions that the tool does not publish, which is a key behavioral detail. However, it omits other traits like authentication requirements or rate limits, making it minimally adequate.

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 concise with only two sentences, no wasted words. The first sentence states the purpose, and the second provides a usage guideline, making it well-structured and front-loaded.

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

Completeness4/5

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

Given the tool's simplicity (6 parameters, no output schema), the description is complete enough to understand the tool's function and key behavior. It could mention return values or error conditions, but it's sufficient for a create operation.

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?

The schema has 100% description coverage, with each parameter having clear descriptions (e.g., info, distribution). The tool description adds no extra parameter information, so the 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 'Create a new MISP event' with a specific verb and resource, and explains its purpose for documenting incidents or threat intelligence. It also distinguishes itself from misp_publish_event, which is a sibling tool.

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?

The description provides explicit guidance by stating 'Does not publish - use misp_publish_event separately,' telling the agent when not to use this tool and suggesting an alternative. However, it does not cover when to use it versus other siblings like misp_add_attribute.

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