Package org.saidone.unrest.mcp
Class SearchServiceTools
java.lang.Object
org.saidone.unrest.mcp.SearchServiceTools
MCP tools backed by SearchServiceClient.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SearchServiceTools
public SearchServiceTools()
-
-
Method Details
-
search
@Tool(name="alfresco_search", description="Searches the Alfresco repository with an AFTS (Alfresco Full Text Search) query and returns the matching documents and folders with their metadata. Examples: \'budget\' (name, title, description and content), \'cm:name:\"report*\"\' (name starting with report), \'TEXT:\"invoice 2024\"\' (content), \'TYPE:\"cm:folder\" AND cm:name:\"projects\"\', \'TYPE:\"cm:content\" AND cm:modified:[NOW-7DAYS TO NOW]\', \'PATH:\"/app:company_home/cm:Projects//*\"\' (everything below a folder), \'cm:creator:\"jdoe\"\'. Combine clauses with AND, OR, NOT and parentheses. Results come from the search index, which may lag a few seconds behind recent changes. \'totalItems\' is the number of matches; check \'hasMoreItems\' and increase skipCount for the next page. Results are sorted by relevance unless \'sort\' is given.") public String search(@ToolParam(description="AFTS query, e.g. cm:name:\"budget*\" AND TYPE:\"cm:content\"") String query, @ToolParam(description="Number of results to skip (paging offset), 0 for the first page",required=false) Integer skipCount, @ToolParam(description="Page size, 1..1000 (default 25)",required=false) Integer maxItems, @ToolParam(description="Sort order: comma-separated \'field [asc|desc]\', applied in order (ascending by default). field is a property (e.g. cm:name, cm:modified, cm:created) or score (relevance). Example: \'cm:modified desc, cm:name\'",required=false) String sort)
-