ListPrintersTool

class ListPrintersTool(context: Context) : McpTool

Lists installed print service plugins (resolved from the android.printservice.PrintService intent) and the host app's own active print jobs from PrintManager.getPrintJobs. Note: this does NOT enumerate individual physical printers — discovery happens inside the system print UI.

No permissions required. Returns an error if PrintManager is unavailable. Read-only.

Output keys: print_services (each with package, name), service_count, active_jobs (each with id, label, state), active_job_count.

Constructors

Link copied to clipboard
constructor(context: Context)

Properties

Link copied to clipboard
open override val annotations: ToolAnnotations
Link copied to clipboard
open override val description: String
Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val parameters: List<ToolParameter>

Functions

Link copied to clipboard
open suspend override fun execute(params: Map<String, Any>): ToolResult