Support batch label lookups in the GitLab MCP tool

What does this MR do and why?

Allows search_labels to look up multiple label names in one MCP tool call. Helps agents recover when save_work_item rejects labels that do not exist, without making a separate tool call for every name.

Underlying GraphQL resolver still accepts one term per query. This change reduces agent tool calls, not backend GraphQL queries.

References

How to set up and validate locally

  1. Run the focused specs: bin/rspec spec/services/mcp/tools/labels/search_tool_spec.rb spec/services/mcp/tools/labels/search_service_spec.rb
  2. Verify that 0.2.0 returns matching labels for multiple terms in one response, removes duplicate IDs, and rejects an empty array.
  3. Verify that an explicitly requested 0.1.0 call still accepts a string.

Merge request reports

Loading
Loading