Skip to content

EPMRPP-104379 || MCP. Tools. Get logs by parent with filter#15

Merged
avarabyeu merged 1 commit into
mainfrom
add-tool-get-logs-by-parent-with-filter
Jul 16, 2025
Merged

EPMRPP-104379 || MCP. Tools. Get logs by parent with filter#15
avarabyeu merged 1 commit into
mainfrom
add-tool-get-logs-by-parent-with-filter

Conversation

@AleksandrParamonoff

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 a new MCP tool for fetching logs of test items by parent-item ID, complete with optional filters and default settings.

  • Register a new get_test_item_logs_by_filter tool in server.go
  • Introduce a defaultItemLogLevel constant in launches.go
  • Implement the tool handler with parameters, filters, and API invocation in items.go

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
internal/reportportal/server.go Registered the new toolGetTestItemLogsByFilter with the server
internal/reportportal/launches.go Added defaultItemLogLevel constant for log level default
internal/reportportal/items.go Defined toolGetTestItemLogsByFilter handler and its parameters
Comments suppressed due to low confidence (2)

internal/reportportal/items.go:357

  • The comment references toolGetTestItemsLogsByFilter but the actual function is named toolGetTestItemLogsByFilter. Update the comment to match the function name.
// toolGetTestItemsLogsByFilter creates a tool to get test items logs for a specific launch.

internal/reportportal/items.go:358

  • This new tool handler includes parameter parsing and API calls but has no accompanying tests. Adding unit tests for parameter handling and API request construction will help prevent regressions.
func (lr *TestItemResources) toolGetTestItemLogsByFilter() (tool mcp.Tool, handler server.ToolHandlerFunc) {

Comment thread internal/reportportal/items.go Outdated
filterEqHasStats = "true"
filterEqHasChildren = "false"
filterInType = "STEP"
defaultItemLogLevel = "TRACE" // Default log level for test item logs

Copilot AI Jul 11, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] The defaultItemLogLevel constant lives in launches.go but is only used in items.go. Consider relocating it closer to its usage or adding a clarifying comment about its cross-file role.

Copilot uses AI. Check for mistakes.
@AleksandrParamonoff AleksandrParamonoff force-pushed the add-tool-get-logs-by-parent-with-filter branch from ef75f23 to acbe5a9 Compare July 11, 2025 10:06
@AleksandrParamonoff AleksandrParamonoff force-pushed the add-tool-get-logs-by-parent-with-filter branch from acbe5a9 to 139d2b4 Compare July 11, 2025 10:52
@AleksandrParamonoff AleksandrParamonoff force-pushed the add-tool-get-logs-by-parent-with-filter branch from 139d2b4 to ede10c0 Compare July 11, 2025 13:40
@avarabyeu avarabyeu merged commit e0b6ce8 into main Jul 16, 2025
1 check passed
@avarabyeu avarabyeu deleted the add-tool-get-logs-by-parent-with-filter branch July 16, 2025 13:37
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.

3 participants