Skip to main content
Glama
kaminari-ad

@kaminari-ad/mcp

Official
by kaminari-ad

Delete Custom Rule

delete_custom_rule
DestructiveIdempotent

Permanently delete a custom rule to stop it from running on future scans, while preserving tags already applied to past scans.

Instructions

Permanently delete a custom rule. Already-applied tags on past scans are preserved; the rule simply stops running on future scans.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rule_idYesRule UUID to delete.

Implementation Reference

  • The tool definition and handler for 'delete_custom_rule'. The handler calls ctx.api.deleteCustomRule(input.rule_id) and returns { deleted: true } on success.
    export const deleteCustomRuleTool: Tool<DeleteCustomRuleInputShape, DeleteCustomRuleOutput> = {
      name: "delete_custom_rule",
      description:
        "Permanently delete a custom rule. Already-applied tags on past scans are preserved; the rule simply stops running on future scans.",
      annotations: {
        title: "Delete Custom Rule",
        readOnlyHint: false,
        destructiveHint: true,
        idempotentHint: true,
        openWorldHint: false,
      },
      inputSchema: z.object(DeleteCustomRuleInputShape),
      handler: async (input, ctx): Promise<Result<DeleteCustomRuleOutput, ToolError>> => {
        const result = await ctx.api.deleteCustomRule(input.rule_id);
        if (result.isErr()) return err(mapApiError(result.error));
        return ok({ deleted: true });
      },
    };
  • Input schema (rule_id: z.string().uuid()) and output type (DeleteCustomRuleOutput with { deleted: true }).
    const DeleteCustomRuleInputShape = {
      rule_id: z.string().uuid().describe("Rule UUID to delete."),
    } as const;
    type DeleteCustomRuleInputShape = typeof DeleteCustomRuleInputShape;
    
    export interface DeleteCustomRuleOutput {
      readonly deleted: true;
    }
  • Import and registration of deleteCustomRuleTool in the tool registry (import on line 60, register call on line 164).
    import { deleteCustomRuleTool } from "./tools/custom-rules/delete-custom-rule.tool.js";
    import { getCustomRuleTool } from "./tools/custom-rules/get-custom-rule.tool.js";
    import { listCustomRulesTool } from "./tools/custom-rules/list-custom-rules.tool.js";
    import { testCustomRuleTool } from "./tools/custom-rules/test-custom-rule.tool.js";
    import { updateCustomRuleTool } from "./tools/custom-rules/update-custom-rule.tool.js";
    import { listEmulatorsTool } from "./tools/emulators/list-emulators.tool.js";
    import { listGeosTool } from "./tools/geos/list-geos.tool.js";
    import { listInvoicesTool } from "./tools/invoicing/list-invoices.tool.js";
    import { createPolicySetTool } from "./tools/policy-sets/create-policy-set.tool.js";
    import { deletePolicySetTool } from "./tools/policy-sets/delete-policy-set.tool.js";
    import { getPolicySetTool } from "./tools/policy-sets/get-policy-set.tool.js";
    import { listPolicySetsTool } from "./tools/policy-sets/list-policy-sets.tool.js";
    import { requestPolicySetApprovalTool } from "./tools/policy-sets/request-policy-set-approval.tool.js";
    import { updatePolicySetTool } from "./tools/policy-sets/update-policy-set.tool.js";
    import { cancelRunTool } from "./tools/runs/cancel-run.tool.js";
    import { getRunTool } from "./tools/runs/get-run.tool.js";
    import { listRunScansTool } from "./tools/runs/list-run-scans.tool.js";
    import { cancelScanTool } from "./tools/scans/cancel-scan.tool.js";
    import { createBulkScansTool } from "./tools/scans/create-bulk-scans.tool.js";
    import { createScanTool } from "./tools/scans/create-scan.tool.js";
    import { getScanTool } from "./tools/scans/get-scan.tool.js";
    import { listScansTool } from "./tools/scans/list-scans.tool.js";
    import { recheckScansTool } from "./tools/scans/recheck-scans.tool.js";
    import { deleteTagDefinitionTool } from "./tools/tags/delete-tag-definition.tool.js";
    import { getTagDefinitionTool } from "./tools/tags/get-tag-definition.tool.js";
    import { listScanTagsTool } from "./tools/tags/list-scan-tags.tool.js";
    import { listTagsTool } from "./tools/tags/list-tags.tool.js";
    import { updateTagDefinitionTool } from "./tools/tags/update-tag-definition.tool.js";
    import { bulkReplayWebhookTool } from "./tools/webhooks/bulk-replay-webhook.tool.js";
    import { createWebhookTool } from "./tools/webhooks/create-webhook.tool.js";
    import { deleteWebhookTool } from "./tools/webhooks/delete-webhook.tool.js";
    import { getWebhookTool } from "./tools/webhooks/get-webhook.tool.js";
    import { listWebhookDeliveriesTool } from "./tools/webhooks/list-webhook-deliveries.tool.js";
    import { listWebhookEventTypesTool } from "./tools/webhooks/list-webhook-event-types.tool.js";
    import { listWebhooksTool } from "./tools/webhooks/list-webhooks.tool.js";
    import { replayWebhookDeliveryTool } from "./tools/webhooks/replay-webhook-delivery.tool.js";
    import { rotateWebhookSecretTool } from "./tools/webhooks/rotate-webhook-secret.tool.js";
    import { testWebhookTool } from "./tools/webhooks/test-webhook.tool.js";
    import { updateWebhookTool } from "./tools/webhooks/update-webhook.tool.js";
    
    /**
     * Register every tool with the supplied callback. Grouped by domain
     * for readability — no order significance.
     */
    export function registerAllTools(register: RegisterTool): void {
      // account
      register(getAccountTool);
      register(updateOrgTool);
      register(listOrgUsersTool);
      register(inviteUserTool);
      register(updateUserRoleTool);
      register(removeUserTool);
      register(transferOwnershipTool);
      register(listOrgRolesTool);
      register(listApiKeysTool);
      register(createApiKeyTool);
      register(revokeApiKeyTool);
      // reference data
      register(listGeosTool);
      register(listEmulatorsTool);
      // scans
      register(getScanTool);
      register(listScansTool);
      register(cancelScanTool);
      register(createBulkScansTool);
      register(createScanTool);
      register(recheckScansTool);
      // campaigns
      register(getCampaignTool);
      register(listCampaignsTool);
      register(archiveCampaignTool);
      register(unarchiveCampaignTool);
      register(cancelCampaignTool);
      register(runCampaignTool);
      register(createCampaignTool);
      register(updateCampaignTool);
      register(listCampaignRunsTool);
      register(listCampaignsPickerTool);
      // runs
      register(getRunTool);
      register(listRunScansTool);
      register(cancelRunTool);
      // campaign groups
      register(getCampaignGroupTool);
      register(listCampaignGroupsTool);
      register(createCampaignGroupTool);
      register(updateCampaignGroupTool);
      register(runCampaignGroupTool);
      register(cancelCampaignGroupTool);
      register(archiveCampaignGroupTool);
      register(unarchiveCampaignGroupTool);
      register(pauseCampaignGroupScheduleTool);
      register(resumeCampaignGroupScheduleTool);
      // tags
      register(listTagsTool);
      register(getTagDefinitionTool);
      register(updateTagDefinitionTool);
      register(deleteTagDefinitionTool);
      register(listScanTagsTool);
      // custom rules
      register(listCustomRulesTool);
      register(getCustomRuleTool);
      register(createCustomRuleTool);
      register(updateCustomRuleTool);
      register(deleteCustomRuleTool);
  • Infrastructure implementation: HTTP API gateway calls DELETE /api/v1/custom-rules/{rule_id} to delete a custom rule.
    async deleteCustomRule(id: string): Promise<Result<null, ApiError>> {
      return call(
        "DELETE",
        "/api/v1/custom-rules/{rule_id}",
        { params: { path: { rule_id: id } } },
        parseEmpty
      );
    },
  • Domain port interface: declares deleteCustomRule(id: string) method that tools depend on.
    deleteCustomRule(id: string): Promise<Result<null, ApiError>>;
Behavior4/5

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

Annotations declare destructiveHint=true, but the description adds useful context about preserved tags on past scans, going beyond the annotation without contradiction.

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?

Two concise sentences, front-loaded with the primary action, no wasted words.

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

Completeness5/5

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

For a simple delete tool with one required parameter, no output schema, and comprehensive annotations, the description covers the essential behavior completely.

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% with one parameter rule_id clearly described; the description does not add additional parameter information beyond 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 uses a specific verb 'permanently delete' and resource 'custom rule', clearly distinguishing it from siblings like update_custom_rule or test_custom_rule.

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 does not explicitly state when to use this tool vs alternatives or when not to use it, only implying the effect on future vs past scans.

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/kaminari-ad/mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server