Skip to content

Conversation

universalxtv
Copy link

Update Zabbix MCP Server Output Parameter and Trigger Get Method

Changes

Output Parameter Enhancement

  • Modified the output parameter type in all get methods from str to Union[str, List[str]]
  • This change allows passing either a string (e.g. "extend") or a list of specific fields to return
  • Previously, only a single string value was accepted
  • Updated all docstrings to reflect this change with the standardized description: "extend" or list of fields to return
  • Type hints and param initializations have been updated accordingly

Trigger Get Method Expansion

  • Enhanced the trigger_get method with additional parameters:
    • monitored: Filter only monitored items
    • expandDescription: Option to expand macros in descriptions
    • selectHosts: Added ability to select specific host fields
    • selectLastEvent: Added ability to select specific last event fields
    • sortfield: Added sorting capability by specified fields
    • sortorder: Added sort direction control ("ASC" or "DESC")
  • These additions align the method with the full capabilities of Zabbix API's trigger.get
  • Updated docstring to document all new parameters

Migration Impact

  • All existing code using string output parameters will continue to work
  • New functionality allows more granular control over returned fields
  • No breaking changes - only extending functionality

Testing Considerations

  • Existing uses of get methods remain compatible
  • New output list format needs testing with various field combinations
  • Enhanced trigger_get parameters should be tested with various filter combinations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant