feat: Add SOAR MCP Case Management Tools - #234
Conversation
Add five new case management tools to the SOAR MCP server: - close_case: Close a case with root cause, reason, and comment - assign_case: Assign a user to a case - change_case_stage: Update the workflow stage of a case - add_case_tag: Add a tag to a case - remove_case_tag: Remove a tag from a case
5fbf162 to
ed18a7a
Compare
dandye
left a comment
There was a problem hiding this comment.
Thank you for adding these case management tools to the SOAR MCP server. This is a very valuable addition to the repository.
Before we can merge this PR, please address the following feedback items:
-
Add explicit
= Nonedefaults to optional parameter signatures:
Increate_case(lines 30-61) andclose_case(lines 142-148), optional parameters declareField(default=None, ...)insideAnnotated, but omit= Noneon the parameter declaration itself.Please add
= Noneto the parameter signatures so standard Python inspection recognizes them as optional defaults:# In create_case: priority: Annotated[Optional[str], Field(default=None, description="...")] = None, description: Annotated[Optional[str], Field(default=None, description="...")] = None, environment: Annotated[Optional[str], Field(default=None, description="...")] = None, # In close_case: tags: Annotated[Optional[str], Field(default=None, description="...")] = None,
-
Add
json_schema_extraenum constraint forreasoninclose_case:
The docstring specifies thatreasonmust be one ofMalicious,NotMalicious,Maintenance,Inconclusive. To ensure LLM callers adhere to valid enum literals without hallucinating arbitrary strings, please add the enum schema constraint (similar topriorityincreate_case/change_case_priority):reason: Annotated[ str, Field( ..., description="The close reason category for the case.", json_schema_extra={ "enum": [ "Malicious", "NotMalicious", "Maintenance", "Inconclusive", ] }, ), ],
-
Add unit tests:
Please add unit tests covering the new tools intests/verifying that each tool function constructs the correct request payload and invokes the intended endpoint onhttp_client.
Once these updates are in place, we will be happy to merge this PR.
Summary
close_case,assign_case,change_case_stage,add_case_tag,remove_case_tag