Limit search_projects to actual Projects

This means we are excluding Portfolios and Programs from it.
Those will need their own tools.
This commit is contained in:
Jan Sandbrink
2026-02-06 15:51:52 +01:00
parent 8ca3c9eb66
commit 40b4dc407e
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ module McpTools
)
def call(page: nil, **filters)
filtered = apply_filters(Project.visible, filters)
filtered = apply_filters(Project.project.visible, filters)
projects = apply_pagination(filtered, page)
{
@@ -56,6 +56,7 @@ RSpec.describe McpTools::SearchProjects, with_flag: { mcp_server: true } do
let!(:project_a) { create(:project, identifier: "abc", name: "The ABC Project", status_code: :on_track) }
let!(:project_b) { create(:project, identifier: "def", name: "The DEF Project", status_code: :off_track) }
let!(:portfolio) { create(:portfolio, identifier: "ghi", name: "The unrelated Portfolio", status_code: :on_track) }
let(:server_config) { create(:mcp_configuration, identifier: "mcp_server") }
let(:tool_config) { create(:mcp_configuration, identifier: described_class.qualified_name) }