Skip to main content
Glama

misp_delete_object

Delete a MISP object from an event by its object ID, with an option to permanently remove it via hard delete.

Instructions

Delete a MISP object from an event

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
objectIdYesObject ID to delete
hardNoHard delete (permanent) instead of soft delete

Implementation Reference

  • The async handler function that executes the 'misp_delete_object' tool logic. It calls client.deleteObject(objectId, hard) and returns the result or an error.
      async ({ objectId, hard }) => {
        try {
          const result = await client.deleteObject(objectId, hard);
          return {
            content: [
              {
                type: "text",
                text:
                  result.message ||
                  `Object ${objectId} deleted successfully.`,
              },
            ],
          };
        } catch (err) {
          return {
            content: [
              {
                type: "text",
                text: `Error deleting object: ${err instanceof Error ? err.message : String(err)}`,
              },
            ],
            isError: true,
          };
        }
      }
    );
  • Input schema defining parameters for the tool: objectId (required string) and hard (optional boolean for permanent deletion).
    {
      objectId: z.string().describe("Object ID to delete"),
      hard: z
        .boolean()
        .optional()
        .describe("Hard delete (permanent) instead of soft delete"),
    },
  • The tool registration using server.tool() with the name 'misp_delete_object' and description 'Delete a MISP object from an event'.
    server.tool(
      "misp_delete_object",
      "Delete a MISP object from an event",
      {
        objectId: z.string().describe("Object ID to delete"),
        hard: z
          .boolean()
          .optional()
          .describe("Hard delete (permanent) instead of soft delete"),
      },
      async ({ objectId, hard }) => {
        try {
          const result = await client.deleteObject(objectId, hard);
          return {
            content: [
              {
                type: "text",
                text:
                  result.message ||
                  `Object ${objectId} deleted successfully.`,
              },
            ],
          };
        } catch (err) {
          return {
            content: [
              {
                type: "text",
                text: `Error deleting object: ${err instanceof Error ? err.message : String(err)}`,
              },
            ],
            isError: true,
          };
        }
      }
    );
  • The MispClient.deleteObject method that makes the actual HTTP POST request to /objects/delete/{objectId}. Sends hard=1 in body if hard delete is requested.
    async deleteObject(
      objectId: string,
      hard = false
    ): Promise<{ message: string }> {
      const body = hard ? { hard: 1 } : {};
      return this.request<{ message: string }>(
        "POST",
        `/objects/delete/${encodeId(objectId, "objectId")}`,
        body
      );
    }
Behavior2/5

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

No annotations provided. Description does not disclose behavioral traits such as default soft delete, permission requirements, or side effects. The 'hard' parameter hint is from schema, not description.

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, no unnecessary words. Efficient and to the point.

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?

Given the tool is a deletion action, the description omits important context like default soft delete behavior, success response, and required permissions. Incomplete for effective use.

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 does not add meaning beyond the schema; parameter details are already in the input 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 'Delete a MISP object from an event' uses a specific verb and resource, clearly distinguishing it from sibling tools like misp_delete_attribute and misp_delete_event.

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, nor any mention of prerequisites or exclusions. Siblings exist but are not differentiated.

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