Skip to main content
Glama

misp_add_sighting

Report a sighting of an IOC to confirm it was observed in the wild, mark it as false positive, or set its expiration.

Instructions

Report a sighting of an IOC (confirms it was observed in the wild, marks as false positive, or sets expiration)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
attributeIdNoAttribute ID to sight (use this or value)
valueNoAttribute value to sight (use this or attributeId)
typeYes0=Sighting (seen in the wild), 1=False positive, 2=Expiration
sourceNoSource of the sighting (e.g., organization name, sensor ID)
timestampNoTimestamp of the sighting (Unix timestamp)

Implementation Reference

  • The tool handler function for 'misp_add_sighting'. Takes params (attributeId, value, type, source, timestamp), calls client.addSighting(), and returns a formatted response with sighting details or an error.
      async (params) => {
        try {
          if (!params.attributeId && !params.value) {
            return {
              content: [
                { type: "text", text: "Either attributeId or value must be provided." },
              ],
              isError: true,
            };
          }
    
          const sighting = await client.addSighting({
            attributeId: params.attributeId,
            value: params.value,
            type: params.type,
            source: params.source,
            timestamp: params.timestamp,
          });
    
          const typeLabels = ["Sighting", "False positive", "Expiration"];
    
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(
                  {
                    id: sighting.id,
                    type: typeLabels[params.type],
                    attribute_id: sighting.attribute_id,
                    event_id: sighting.event_id,
                    source: sighting.source,
                    date_sighting: sighting.date_sighting,
                  },
                  null,
                  2
                ),
              },
            ],
          };
        } catch (err) {
          return {
            content: [
              { type: "text", text: `Error adding sighting: ${err instanceof Error ? err.message : String(err)}` },
            ],
            isError: true,
          };
        }
      }
    );
  • Input schema for misp_add_sighting: attributeId (optional), value (optional), type (0|1|2 for Sighting/False positive/Expiration), source (optional), timestamp (optional).
    {
      attributeId: z.string().optional().describe("Attribute ID to sight (use this or value)"),
      value: z.string().optional().describe("Attribute value to sight (use this or attributeId)"),
      type: z.union([z.literal(0), z.literal(1), z.literal(2)])
        .describe("0=Sighting (seen in the wild), 1=False positive, 2=Expiration"),
      source: z.string().optional().describe("Source of the sighting (e.g., organization name, sensor ID)"),
      timestamp: z.string().optional().describe("Timestamp of the sighting (Unix timestamp)"),
    },
  • Registration function 'registerSightingTools' which calls server.tool() to register 'misp_add_sighting' on the MCP server.
    export function registerSightingTools(server: McpServer, client: MispClient): void {
      server.tool(
        "misp_add_sighting",
        "Report a sighting of an IOC (confirms it was observed in the wild, marks as false positive, or sets expiration)",
        {
          attributeId: z.string().optional().describe("Attribute ID to sight (use this or value)"),
          value: z.string().optional().describe("Attribute value to sight (use this or attributeId)"),
          type: z.union([z.literal(0), z.literal(1), z.literal(2)])
            .describe("0=Sighting (seen in the wild), 1=False positive, 2=Expiration"),
          source: z.string().optional().describe("Source of the sighting (e.g., organization name, sensor ID)"),
          timestamp: z.string().optional().describe("Timestamp of the sighting (Unix timestamp)"),
        },
        async (params) => {
          try {
            if (!params.attributeId && !params.value) {
              return {
                content: [
                  { type: "text", text: "Either attributeId or value must be provided." },
                ],
                isError: true,
              };
            }
    
            const sighting = await client.addSighting({
              attributeId: params.attributeId,
              value: params.value,
              type: params.type,
              source: params.source,
              timestamp: params.timestamp,
            });
    
            const typeLabels = ["Sighting", "False positive", "Expiration"];
    
            return {
              content: [
                {
                  type: "text",
                  text: JSON.stringify(
                    {
                      id: sighting.id,
                      type: typeLabels[params.type],
                      attribute_id: sighting.attribute_id,
                      event_id: sighting.event_id,
                      source: sighting.source,
                      date_sighting: sighting.date_sighting,
                    },
                    null,
                    2
                  ),
                },
              ],
            };
          } catch (err) {
            return {
              content: [
                { type: "text", text: `Error adding sighting: ${err instanceof Error ? err.message : String(err)}` },
              ],
              isError: true,
            };
          }
        }
      );
    }
  • Client helper method 'addSighting' that sends a POST request to /sightings/add (optionally with attribute ID in the path) with the sighting payload, and returns the MispSighting response.
    async addSighting(params: {
      attributeId?: string;
      value?: string;
      type: number;
      source?: string;
      timestamp?: string;
    }): Promise<MispSighting> {
      const body: Record<string, unknown> = {
        type: params.type,
      };
    
      if (params.value) body.value = params.value;
      if (params.source) body.source = params.source;
      if (params.timestamp) body.timestamp = params.timestamp;
    
      const path = params.attributeId
        ? `/sightings/add/${encodeId(params.attributeId, "attributeId")}`
        : "/sightings/add";
    
      const data = await this.request<{ Sighting: MispSighting }>("POST", path, body);
      return data.Sighting;
    }
  • MispSighting interface defining the shape of the sighting response (id, attribute_id, event_id, org_id, date_sighting, source, type).
    export interface MispSighting {
      id: string;
      attribute_id: string;
      event_id: string;
      org_id: string;
      date_sighting: string;
      source: string;
      type: string;
    }
Behavior2/5

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

No annotations are provided, so the description bears the full burden. It covers the three possible sighting types but omits side effects, authorization requirements, or data mutation behaviors. For a write operation, more disclosure is expected.

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?

The description is one sentence, efficiently stating the primary purpose and the three types of sightings. It is front-loaded and free of redundancy, though it could benefit from slight expansion without losing conciseness.

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?

With 5 parameters, 1 required, and no output schema, the description provides the core purpose but lacks return value details, error conditions, or prerequisites. It is minimally adequate but not fully complete given the tool's complexity.

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%, so baseline is 3. The description adds minimal parameter information beyond mentioning the 'type' field's options. It does not explain the mutual exclusivity of 'attributeId' and 'value' or the role of 'source' and 'timestamp', which are already documented in the schema.

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 tool reports a sighting of an IOC with three distinct subtypes (wild, false positive, expiration). It uses a specific verb ('Report') and resource ('sighting of IOC'), effectively distinguishing it from sibling tools that add attributes or objects.

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?

No explicit guidance on when to use this tool versus alternatives. While the description implies it is for sightings, it does not contrast with similar tools like misp_add_attribute. The usage context is implied but not articulated.

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