Skip to content

EPMHLM-444 || MCP. Tools. Add new tool get all selectors - #7

Merged
AleksandrParamonoff merged 1 commit into
mainfrom
add-tool-get-selectors
Dec 12, 2025
Merged

AleksandrParamonoff merged 1 commit into
mainfrom
add-tool-get-selectors

Conversation

@AleksandrParamonoff

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

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 getAllSelectors that retrieves all selector records stored in the Healenium backend. The implementation follows existing patterns for simple GET endpoints without parameters.

  • Adds getAllSelectorsTool to fetch all selectors from /healenium/selector/all endpoint
  • Includes comprehensive test coverage with integration tests and timeout handling
  • Registers the new tool in the MCP server's tool registry

Reviewed changes

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

File Description
internal/mcp_handlers/tools.go Implements getAllSelectorsTool() function that makes a GET request to /healenium/selector/all and returns the JSON response as text content. Registers the new tool in the RegisterTools function.
internal/mcp_handlers/tools_test.go Adds createHealeniumMockServerForAllSelectors() helper function, TestGetAllSelectorsTool_Integration() with test cases for successful fetch, empty list, and error scenarios (404, 500), and TestGetAllSelectorsTool_Timeout() to verify timeout behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AleksandrParamonoff
AleksandrParamonoff merged commit 82c8562 into main Dec 12, 2025
7 checks passed
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.

2 participants