Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat: expose meta() and annotations() methods in AbstractMcpTool
    This is needed to port OrcasToolManifest which forcefully reads these protected methods.

PiperOrigin-RevId: 821766474
  • Loading branch information
google-genai-bot authored and copybara-github committed Oct 20, 2025
commit 04cd6eaf5d52e89c14933098afa94b1712af7eb3
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import io.modelcontextprotocol.spec.McpSchema.JsonSchema;
import io.modelcontextprotocol.spec.McpSchema.TextContent;
import io.modelcontextprotocol.spec.McpSchema.Tool;
import io.modelcontextprotocol.spec.McpSchema.ToolAnnotations;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -71,6 +72,14 @@ protected AbstractMcpTool(
this.objectMapper = objectMapper;
}

public ToolAnnotations annotations() {
return mcpTool.annotations();
}

public Map<String, Object> meta() {
return mcpTool.meta();
}

public T getMcpSession() {
return this.mcpSession;
}
Expand Down