Skip to main content
Glama

adv_unmark_false_positive

Remove false positive markings from security findings to maintain accurate vulnerability tracking in the Adversary MCP Server.

Instructions

Remove false positive marking from a finding

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
finding_uuidYesUUID of the finding to unmark
adversary_file_pathNoPath to .adversary.json file.adversary.json

Implementation Reference

  • Primary MCP tool handler for 'adv_unmark_false_positive'. Validates input parameters (finding_uuid, adversary_file_path), instantiates FalsePositiveJsonRepository and FalsePositiveService, calls service.unmark_false_positive(), formats JSON response with success status.
    async def _handle_unmark_false_positive(
        self, name: str, arguments: dict
    ) -> list[types.TextContent]:
        """Handle unmark false positive requests."""
        try:
            # Comprehensive input validation
            validated_args = self._input_validator.validate_mcp_arguments(
                arguments, tool_name="adv_unmark_false_positive"
            )
    
            finding_uuid = validated_args.get("finding_uuid", "")
            adversary_file_path = validated_args.get(
                "adversary_file_path", ".adversary.json"
            )
    
            if not finding_uuid:
                raise CleanAdversaryToolError("finding_uuid parameter is required")
    
            # Initialize false positive repository and service
            fp_repository = FalsePositiveJsonRepository(adversary_file_path)
            fp_service = FalsePositiveService(fp_repository)
    
            # Unmark false positive
            success = await fp_service.unmark_false_positive(finding_uuid)
    
            result = {
                "success": success,
                "finding_uuid": finding_uuid,
                "message": (
                    f"Finding {finding_uuid} unmarked as false positive"
                    if success
                    else f"Failed to unmark finding {finding_uuid} as false positive"
                ),
            }
    
            return [types.TextContent(type="text", text=json.dumps(result, indent=2))]
    
        except Exception as e:
            logger.error(f"Unmark false positive failed: {e}")
            raise CleanAdversaryToolError(f"Unmark false positive failed: {str(e)}")
  • MCP tool registration in get_tools() method, defining the tool name, description, and input schema for adv_unmark_false_positive.
        name="adv_unmark_false_positive",
        description="Remove false positive marking from a finding",
        inputSchema={
            "type": "object",
            "properties": {
                "finding_uuid": {
                    "type": "string",
                    "description": "UUID of the finding to unmark",
                },
                "adversary_file_path": {
                    "type": "string",
                    "description": "Path to .adversary.json file",
                    "default": ".adversary.json",
                },
            },
            "required": ["finding_uuid"],
        },
    ),
  • Application service layer method implementing business logic for unmarking false positives: input validation, existence check, delegates to repository.remove_false_positive_info.
    async def unmark_false_positive(self, uuid: str) -> bool:
        """
        Remove false positive marking from a finding.
    
        Args:
            uuid: UUID of the finding to unmark
    
        Returns:
            True if unmarked successfully, False otherwise
        """
        try:
            # Validate input
            if not uuid.strip():
                raise ValueError("UUID cannot be empty")
    
            # Check if it exists and is marked as false positive
            existing_info = await self.repository.get_false_positive_info(uuid)
            if not existing_info or not existing_info.is_false_positive:
                self.logger.warning(f"Finding {uuid} is not marked as false positive")
                return False
    
            # Remove false positive marking
            success = await self.repository.remove_false_positive_info(uuid)
    
            if success:
                self.logger.info(f"Unmarked finding {uuid} as false positive")
            else:
                self.logger.error(f"Failed to unmark finding {uuid} as false positive")
    
            return success
    
        except Exception as e:
            self.logger.error(f"Error unmarking finding {uuid} as false positive: {e}")
            return False
  • Infrastructure repository method that removes false positive marking by overwriting the threat entry in .adversary.json with legitimate finding data using create_legitimate and save_false_positive_info.
    async def remove_false_positive_info(self, uuid: str) -> bool:
        """Remove false positive information for a finding."""
        try:
            # Create legitimate finding info to overwrite false positive data
            legitimate_info = FalsePositiveInfo.create_legitimate(uuid)
            return await self.save_false_positive_info(legitimate_info)
    
        except Exception as e:
            self.logger.error(f"Error removing false positive info for {uuid}: {e}")
            return False
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Remove') but doesn't explain what happens after unmarking (e.g., does the finding reappear in reports, is it reversible, are permissions required?). This leaves critical behavioral traits like mutation effects and security implications unclear, making it inadequate for a tool that modifies data.

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 a single, direct sentence with zero wasted words, front-loading the core action. It efficiently communicates the essential purpose without redundancy or unnecessary elaboration, making it highly concise and well-structured for quick comprehension.

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's complexity as a mutation operation with no annotations and no output schema, the description is insufficient. It lacks details on behavioral outcomes, error handling, or return values, leaving gaps in understanding how the tool functions in practice. For a tool that alters data, more context is needed to ensure safe and correct usage.

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 description coverage is 100%, so the input schema fully documents both parameters ('finding_uuid' and 'adversary_file_path'). The description adds no additional parameter semantics beyond what's in the schema, such as format details or examples. This meets the baseline for high schema coverage but doesn't enhance understanding.

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 action ('Remove') and target ('false positive marking from a finding'), making the purpose immediately understandable. It distinguishes itself from siblings like 'adv_mark_false_positive' by specifying the opposite operation. However, it doesn't explicitly mention the resource type (e.g., security finding) or context, which prevents a perfect score.

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 implies usage when a finding was previously marked as a false positive and needs to be reverted, but doesn't explicitly state when to use it versus alternatives. No guidance is provided on prerequisites, side effects, or when not to use it, leaving usage context partially inferred rather than clearly defined.

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/brettbergin/adversary-mcp-server'

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