Skip to content

Comments

Tool updates#2

Merged
openrec0n merged 2 commits intomainfrom
tools
Sep 4, 2025
Merged

Tool updates#2
openrec0n merged 2 commits intomainfrom
tools

Conversation

@openrec0n
Copy link
Collaborator

@openrec0n openrec0n commented Sep 4, 2025

Summary

This PR significantly improves the Vectra AI MCP Server's tool parameter handling, type safety, and API coverage. The changes modernize parameter validation across all MCP tools while adding new functionality for
assignment management.

Key Changes

  1. Enhanced Tool Parameter Handling
  • Modernized Type Annotations: Migrated from basic Optional types to Annotated types with comprehensive Field definitions
  • Improved Parameter Validation: Enhanced input validation across all tool categories (detection, entity, investigation, management, response)
  • Better IDE Support: Leveraged advanced type hints for improved developer experience and code maintainability
  1. New API Functionality
  • Assignment Deletion: Added delete_assignment() endpoint in VectraClient for complete assignment lifecycle management
  • User-Specific Assignment Queries: New list_assignments_for_user() tool for targeted assignment retrieval by analyst
  • Enhanced Date Filtering: Improved timestamp-based filtering for assignment queries

Technical Details

Parameter Validation Improvements

Before
detection_id: int = Field(ge=1, description="ID of the detection")

After
detection_id: Annotated[int, Field(ge=1, description="ID of the detection to retrieve details for")]

New Investigation Tools

  • list_assignments_for_user() - Filter assignments by specific analyst/user ID
  • delete_assignment() - Remove assignments from the platform
  • Enhanced date range validation with validate_date_range() utility

Files Modified

  • tool/detection_tools.py - Enhanced detection parameter handling
  • tool/entity_tools.py - Improved entity tool parameters
  • tool/investigation_tools.py - Added new tools and enhanced validation
  • tool/management_tools.py - Standardized parameter types
  • tool/response_tools.py - Minor parameter improvements
  • vectra_client.py - New delete assignment endpoint

Impact

Lines Changed: +348 additions / -248 deletions across 6 files
Compatibility: Fully backward compatible
Security: Improved input validation and type safety


This PR enhances the robustness and usability of the Vectra AI MCP Server while maintaining full backward compatibility.

update tool parameter handling

add new investigation tool
@openrec0n openrec0n added the enhancement New feature or request label Sep 4, 2025
@openrec0n openrec0n self-assigned this Sep 4, 2025
@openrec0n openrec0n merged commit df7e65b into main Sep 4, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant