Revert MCP search tool case-insensitivity changes

Without parse_friendly_id normalizing case, MCP search lookups are
case-sensitive again. Reverts description changes and removes the
case-variant identifier test contexts.
This commit is contained in:
Kabiru Mwenja
2026-03-23 17:09:10 +03:00
parent bfeee22232
commit f2f5caf0fe
6 changed files with 18 additions and 30 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ module McpTools
type: :object,
properties: {
name: { type: "string", description: "Name of the portfolio. Accepts partial names, not case-sensitive." },
identifier: { type: "string", description: "Portfolio identifier. Case-insensitive, matching exactly." },
identifier: { type: "string", description: "Portfolio identifier. Case-sensitive, matching exactly." },
status_code: { type: "string", enum: Project.status_codes.keys, description: "The portfolio status." }
}
)
+1 -1
View File
@@ -48,7 +48,7 @@ module McpTools
type: :object,
properties: {
name: { type: "string", description: "Name of the program. Accepts partial names, not case-sensitive." },
identifier: { type: "string", description: "Program identifier. Case-insensitive, matching exactly." },
identifier: { type: "string", description: "Program identifier. Case-sensitive, matching exactly." },
status_code: { type: "string", enum: Project.status_codes.keys, description: "The program status." }
}
)
+1 -1
View File
@@ -48,7 +48,7 @@ module McpTools
type: :object,
properties: {
name: { type: "string", description: "Name of the project. Accepts partial project names, not case-sensitive." },
identifier: { type: "string", description: "Project identifier. Case-insensitive, matching exactly." },
identifier: { type: "string", description: "Project identifier. Case-sensitive, matching exactly." },
status_code: { type: "string", enum: Project.status_codes.keys, description: "The project status." }
}
)
@@ -84,22 +84,18 @@ RSpec.describe McpTools::SearchPortfolios, with_flag: { mcp_server: true } do
context "when passing an exact identifier" do
let(:call_args) { { identifier: "abc" } }
it "finds only the matching portfolio" do
it "finds the portfolio" do
subject
items = parsed_results.dig("structuredContent", "items")
expect(items.size).to eq(1)
expect(items.first).to include("identifier" => "abc")
expect(parsed_results.dig("structuredContent", "items")).to be_present
end
end
context "when passing a case-variant identifier" do
context "when passing a non-exact identifier" do
let(:call_args) { { identifier: "Abc" } }
it "finds only the matching portfolio (case-insensitive)" do
it "does not find the portfolio" do
subject
items = parsed_results.dig("structuredContent", "items")
expect(items.size).to eq(1)
expect(items.first).to include("identifier" => "abc")
expect(parsed_results.dig("structuredContent", "items")).to be_empty
end
end
@@ -84,22 +84,18 @@ RSpec.describe McpTools::SearchPrograms, with_flag: { mcp_server: true } do
context "when passing an exact identifier" do
let(:call_args) { { identifier: "abc" } }
it "finds only the matching program" do
it "finds the program" do
subject
items = parsed_results.dig("structuredContent", "items")
expect(items.size).to eq(1)
expect(items.first).to include("identifier" => "abc")
expect(parsed_results.dig("structuredContent", "items")).to be_present
end
end
context "when passing a case-variant identifier" do
context "when passing a non-exact identifier" do
let(:call_args) { { identifier: "Abc" } }
it "finds only the matching program (case-insensitive)" do
it "does not find the program" do
subject
items = parsed_results.dig("structuredContent", "items")
expect(items.size).to eq(1)
expect(items.first).to include("identifier" => "abc")
expect(parsed_results.dig("structuredContent", "items")).to be_empty
end
end
@@ -83,22 +83,18 @@ RSpec.describe McpTools::SearchProjects, with_flag: { mcp_server: true } do
context "when passing an exact identifier" do
let(:call_args) { { identifier: "abc" } }
it "finds only the matching project" do
it "finds the project" do
subject
items = parsed_results.dig("structuredContent", "items")
expect(items.size).to eq(1)
expect(items.first).to include("identifier" => "abc")
expect(parsed_results.dig("structuredContent", "items")).to be_present
end
end
context "when passing a case-variant identifier" do
context "when passing a non-exact identifier" do
let(:call_args) { { identifier: "Abc" } }
it "finds only the matching project (case-insensitive)" do
it "does not find the project" do
subject
items = parsed_results.dig("structuredContent", "items")
expect(items.size).to eq(1)
expect(items.first).to include("identifier" => "abc")
expect(parsed_results.dig("structuredContent", "items")).to be_empty
end
end