Skip to main content
Glama

misp_tag_event

Add or remove tags like TLP or MITRE ATT&CK patterns from a MISP event to classify and enrich threat intelligence data.

Instructions

Add or remove a tag from a MISP event (TLP, MITRE ATT&CK, custom tags)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
eventIdYesEvent ID to tag
tagYesTag name (e.g., tlp:white, misp-galaxy:mitre-attack-pattern)
removeNoSet to true to remove the tag instead of adding

Implementation Reference

  • The main handler function for the misp_tag_event tool. Takes eventId, tag, and optional remove parameters. Calls client.tagEvent() or client.untagEvent() depending on the remove flag.
    // Tag event
    server.tool(
      "misp_tag_event",
      "Add or remove a tag from a MISP event (TLP, MITRE ATT&CK, custom tags)",
      {
        eventId: z.string().describe("Event ID to tag"),
        tag: z.string().describe("Tag name (e.g., tlp:white, misp-galaxy:mitre-attack-pattern)"),
        remove: z.boolean().optional().describe("Set to true to remove the tag instead of adding"),
      },
      async ({ eventId, tag, remove }) => {
        try {
          if (remove) {
            await client.untagEvent(eventId, tag);
            return {
              content: [
                { type: "text", text: `Tag "${tag}" removed from event ${eventId}.` },
              ],
            };
          } else {
            await client.tagEvent(eventId, tag);
            return {
              content: [
                { type: "text", text: `Tag "${tag}" added to event ${eventId}.` },
              ],
            };
          }
        } catch (err) {
          return {
            content: [
              { type: "text", text: `Error tagging event: ${err instanceof Error ? err.message : String(err)}` },
            ],
            isError: true,
          };
        }
      }
    );
  • Zod schema for the misp_tag_event tool parameters: eventId (string), tag (string), and optional remove (boolean).
    {
      eventId: z.string().describe("Event ID to tag"),
      tag: z.string().describe("Tag name (e.g., tlp:white, misp-galaxy:mitre-attack-pattern)"),
      remove: z.boolean().optional().describe("Set to true to remove the tag instead of adding"),
    },
  • Registration of the tool via server.tool() inside registerEventTools().
      // Tag event
      server.tool(
        "misp_tag_event",
        "Add or remove a tag from a MISP event (TLP, MITRE ATT&CK, custom tags)",
        {
          eventId: z.string().describe("Event ID to tag"),
          tag: z.string().describe("Tag name (e.g., tlp:white, misp-galaxy:mitre-attack-pattern)"),
          remove: z.boolean().optional().describe("Set to true to remove the tag instead of adding"),
        },
        async ({ eventId, tag, remove }) => {
          try {
            if (remove) {
              await client.untagEvent(eventId, tag);
              return {
                content: [
                  { type: "text", text: `Tag "${tag}" removed from event ${eventId}.` },
                ],
              };
            } else {
              await client.tagEvent(eventId, tag);
              return {
                content: [
                  { type: "text", text: `Tag "${tag}" added to event ${eventId}.` },
                ],
              };
            }
          } catch (err) {
            return {
              content: [
                { type: "text", text: `Error tagging event: ${err instanceof Error ? err.message : String(err)}` },
              ],
              isError: true,
            };
          }
        }
      );
    }
  • The MispClient.tagEvent() helper that sends POST /events/addTag with event ID and tag.
    async tagEvent(eventId: string, tag: string): Promise<unknown> {
      return this.request("POST", "/events/addTag", {
        event: eventId,
        tag,
      });
    }
  • The MispClient.untagEvent() helper that sends POST /events/removeTag with event ID and tag.
    async untagEvent(eventId: string, tag: string): Promise<unknown> {
      return this.request("POST", "/events/removeTag", {
        event: eventId,
        tag,
      });
    }
Behavior2/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 add/remove but does not specify side effects, reversibility, or authorization requirements.

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?

One concise sentence with the verb and resource front-loaded. No wasted words.

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?

Adequate for the basic action, but lacks details on return values, error handling, and how to confirm results. Without output schema, more context would be beneficial.

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%, but the description adds concrete tag format examples (tlp:white, misp-galaxy:mitre-attack-pattern) that go beyond schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool adds or removes tags from MISP events with examples like TLP and MITRE ATT&CK. However, it does not differentiate from sibling tools such as misp_search_by_tag or misp_attach_galaxy_cluster.

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. No prerequisites or context provided, leaving the agent to infer usage from the name alone.

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