Problem
The ?search= parameter on /v0/servers only matches against server_name (via ILIKE substring match). It does not search the description field.
This was explicitly requested in #135 (now closed) but only the name-search portion was implemented.
Impact
AI agents and users searching for servers by what they do (e.g., "weather", "database", "GitHub integration") cannot find relevant servers unless they already know the exact server name. The description field — which contains the most useful discovery information — is completely ignored by search.
Current behavior
GET /v0/servers?search=weather
Returns only servers where server_name contains "weather". A server named io.github.example/data-tools with description "Weather data and forecasts" is not returned.
Expected behavior
Search should match against both server_name AND description fields, with name matches ranked first for relevance.
Proposed implementation
- Add
SubstringDescription filter field to ServerFilter
- Add ILIKE condition on the
description column in buildFilterConditions
- Update the API handler to pass the search term to both filters
- Name matches should appear before description matches (relevance ranking)
Files affected
internal/database/database.go — add SubstringDescription to ServerFilter
internal/database/postgres.go — add ILIKE condition for description in buildFilterConditions
internal/api/handlers/v0/servers.go — pass search term to both name and description filters
internal/api/handlers/v0/servers_test.go — add tests for description search
internal/database/postgres_test.go — add tests for description filter
Context
This is particularly important for AI-agent workflows where the agent searches by capability keywords rather than knowing server names in advance.
Problem
The
?search=parameter on/v0/serversonly matches againstserver_name(via ILIKE substring match). It does not search thedescriptionfield.This was explicitly requested in #135 (now closed) but only the name-search portion was implemented.
Impact
AI agents and users searching for servers by what they do (e.g., "weather", "database", "GitHub integration") cannot find relevant servers unless they already know the exact server name. The description field — which contains the most useful discovery information — is completely ignored by search.
Current behavior
Returns only servers where
server_namecontains "weather". A server namedio.github.example/data-toolswith description "Weather data and forecasts" is not returned.Expected behavior
Search should match against both
server_nameANDdescriptionfields, with name matches ranked first for relevance.Proposed implementation
SubstringDescriptionfilter field toServerFilterdescriptioncolumn inbuildFilterConditionsFiles affected
internal/database/database.go— addSubstringDescriptiontoServerFilterinternal/database/postgres.go— add ILIKE condition for description inbuildFilterConditionsinternal/api/handlers/v0/servers.go— pass search term to both name and description filtersinternal/api/handlers/v0/servers_test.go— add tests for description searchinternal/database/postgres_test.go— add tests for description filterContext
This is particularly important for AI-agent workflows where the agent searches by capability keywords rather than knowing server names in advance.