PrintTools

object PrintTools

Provider for the print module: ListPrintersTool and PrintContentTool.

Requires no permissions; printing is mediated entirely by the system print UI.

PrintContentTool needs a live, resumed Activity: PrintManager.print() throws when called from an application context. Pass an activityProvider that returns the host's current foreground Activity (or null when none is showing). If the provider returns null and the supplied Context is not itself an Activity, print_content returns a clear error instead of pretending to succeed.

Functions

Link copied to clipboard
fun all(context: Context, activityProvider: () -> Activity? = { null }): List<McpTool>

All print tools bound to context.

Link copied to clipboard

Always true; no permissions are required.

Link copied to clipboard

Empty — printing needs no runtime permissions.