WriteNfcTagTool

class WriteNfcTagTool(context: Context) : McpTool

Writes a single NDEF record (text or URI) to the most recently scanned tag.

Operates on the tag cached in NfcTagCache, so a tag must have been scanned first (see ReadNfcTagTool). Requires NFC available and enabled, and the tag to support NDEF and be writable with enough capacity. Destructive — overwrites tag contents.

Output keys: success, type, content, bytes_written.

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