Class GrouperMcpFolderDelete
java.lang.Object
edu.internet2.middleware.grouper.ws.mcp.GrouperMcpFolderDelete
MCP tool handler for deleting a Grouper stem (folder).
Looks up the stem by name and deletes it. The calling user must have
STEM_ADMIN privilege on the stem. Protected system stems and stems under the
built-in objects stem (default etc) cannot be deleted via MCP.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.fasterxml.jackson.databind.node.ObjectNodeexecute(com.fasterxml.jackson.databind.JsonNode arguments, GrouperMcpAuthUser authUser) Execute the folder_delete tool.static com.fasterxml.jackson.databind.node.ObjectNodeReturn the MCP tool definition for folder_delete.
-
Constructor Details
-
GrouperMcpFolderDelete
public GrouperMcpFolderDelete()
-
-
Method Details
-
toolDefinition
public static com.fasterxml.jackson.databind.node.ObjectNode toolDefinition()Return the MCP tool definition for folder_delete.- Returns:
- the tool definition as a Jackson ObjectNode conforming to the MCP tool schema
-
execute
public static com.fasterxml.jackson.databind.node.ObjectNode execute(com.fasterxml.jackson.databind.JsonNode arguments, GrouperMcpAuthUser authUser) Execute the folder_delete tool.Flow: 1. Parse and validate the stemName (required) 2. Check that the stem is not a protected system stem 3. Check OAuth scope restrictions 4. Look up the stem by name 5. Delete the stem 6. Return the result
- Parameters:
arguments- the tool arguments from the MCP request (JSON object)authUser- the authenticated user- Returns:
- the MCP tool result containing the operation result or an error message
-