Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 28, 2025

  • Analyze the codebase to understand the issue and existing implementation
  • Review list_problems tool as reference (already has a timeframe parameter)
  • Add timeframe parameter to list_vulnerabilities tool (default: "30d")
  • Add timeframe parameter to get_kubernetes_events tool (default: "24h")
  • Update CHANGELOG.md with the new features
  • Build and test the changes
  • Run code review and address feedback
  • Run security scanning (no vulnerabilities found)
  • Resolve merge conflicts with main branch
Original prompt

This section details on the original issue you should resolve

<issue_title>When fetching events (problems, security events), allow changing the timeframe</issue_title>
<issue_description>When fetching problems or security events from Dynatrace, the hardcoded timeframe sometimes makes it impossible to find the actual problem (e.g., if the problem is more than 30 days old, we won't find it).

Being able to control this parameter would be helpful.</issue_description>

<agent_instructions>Please add timeframe filters to tools where you think it's adequate, especially those that use DQL.
Please also take a look at list_problems, which already has a timeframe added.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@christian-kreuzberger-dtx First part for `list_problems` tool: https://github.com//pull/233 @christian-kreuzberger-dtx Ticket is open for anyone to implement.

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits November 28, 2025 13:35
Copilot AI changed the title [WIP] Add timeframe filter for fetching events Add timeframe parameter to list_vulnerabilities and get_kubernetes_events tools Nov 28, 2025
@christian-kreuzberger-dtx christian-kreuzberger-dtx marked this pull request as ready for review November 28, 2025 13:41
@MrManny MrManny requested a review from Copilot December 9, 2025 11:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds configurable timeframe parameters to two DQL-based tools (list_vulnerabilities and get_kubernetes_events), allowing users to query events and vulnerabilities beyond hardcoded time windows. This follows the pattern already established by the list_problems tool which was enhanced in a previous PR.

Key Changes:

  • Added timeframe parameter to list_vulnerabilities with default "30d"
  • Added timeframe parameter to get_kubernetes_events with default "24h"
  • Fixed pre-existing spacing issue in get-events-for-cluster.ts (missing space before pipe character)

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/index.ts Added timeframe parameter to tool definitions, updated handler functions to pass timeframe, and updated response messages to reference the configurable timeframe
src/capabilities/list-vulnerabilities.ts Added timeframe parameter to function signature with default "30d", updated DQL query to use configurable timeframe, and added comprehensive JSDoc documentation
src/capabilities/get-events-for-cluster.ts Added timeframe parameter to function signature with default "24h", updated DQL query to use configurable timeframe, added comprehensive JSDoc documentation, and fixed spacing before pipe character
CHANGELOG.md Added entries documenting the new timeframe parameters for both tools with examples and default values

@MrManny
Copy link
Collaborator

MrManny commented Dec 9, 2025

@copilot please resolve any conflicts

Copy link
Contributor Author

Copilot AI commented Dec 9, 2025

@copilot please resolve any conflicts

I've successfully resolved the merge conflicts by rebasing on main. The branch now includes both the timeframe parameter additions and the dependency updates from main (MCP SDK upgrade to v1.24.3 and security fixes for jws and node-forge). All tests pass. The changes are ready in commit ac874b0.

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.

When fetching events (problems, security events), allow changing the timeframe

3 participants