Class GrouperMcpDocSearch
java.lang.Object
edu.internet2.middleware.grouper.ws.mcp.GrouperMcpDocSearch
MCP tool handler for searching institutional documentation.
Uses a Lucene in-memory index built from configured database content sources
to provide full-text search with relevance ranking.
Supports four actions:
- query (default): full-text search returning ranked chunks
- retrieveChunk: retrieve specific chunks by sourceConfigId, name, and chunkIndexes
- listSourceConfigIds: list available source config ids with descriptions
- listNames: list document names for a given sourceConfigId
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.fasterxml.jackson.databind.node.ObjectNodeexecute(com.fasterxml.jackson.databind.JsonNode arguments, GrouperMcpAuthUser authUser) execute the doc_search tool, dispatching by actionstatic com.fasterxml.jackson.databind.node.ObjectNodeReturn the MCP tool definition for doc_search.
-
Constructor Details
-
GrouperMcpDocSearch
public GrouperMcpDocSearch()
-
-
Method Details
-
toolDefinition
public static com.fasterxml.jackson.databind.node.ObjectNode toolDefinition()Return the MCP tool definition for doc_search. The description dynamically includes documentation about configured sources so the AI client knows what content is searchable.- Returns:
- the tool definition as a Jackson ObjectNode
-
execute
public static com.fasterxml.jackson.databind.node.ObjectNode execute(com.fasterxml.jackson.databind.JsonNode arguments, GrouperMcpAuthUser authUser) execute the doc_search tool, dispatching by action- Parameters:
arguments- the tool arguments from the MCP requestauthUser- the authenticated user- Returns:
- the MCP tool result
-