feat: search the management list and the MCP material tools

- GET /api/v1/bm/materials takes q: candidates over every material, in
  rank order, with the snippet of the student list; 503 when the engine
  cannot answer
- bm_materials and bm_manage_list_materials take q; under MCP the snippet
  is plain text with ellipses where text was cut
- MCPMaterialPrivacy no longer claims no file text is ever returned
- README documents q, the snippet, the 503, the Search section and
  bm:materials-reindex
This commit is contained in:
Jakub Zych
2026-11-08 19:53:26 +01:00
parent ffd19342b2
commit dd13795e6f
7 changed files with 126 additions and 17 deletions

View File

@@ -39,6 +39,10 @@ var (
{Field: "per_page", Rules: lagoon.ParseRules("nullable|integer|between:1,100")},
{Field: "q", Rules: lagoon.ParseRules("nullable|string|max:100")},
}
// manageMaterialsRules check the search of the management list.
manageMaterialsRules = []lagoon.RequestRule{
{Field: "q", Rules: lagoon.ParseRules("nullable|string|max:100")},
}
)
// query collects the named query parameters that are present into the input