Skip to content

readBarcodeFromScreen

Scans the current screen for a barcode or QR code and decodes it, storing the decoded text in memory under the given variable name so later steps can use it. Reads QR Code, Data Matrix, Aztec and PDF417. Set includeLinearFormats to also read the striped retail symbologies (UPC, EAN, Code 128/39/93, ITF, Codabar). Fails if there is no readable barcode on screen, so it doubles as an assertion that one is shown.

Source

  • Kind: class-backed
  • Class: xyz.block.trailblaze.toolcalls.commands.barcode.ReadBarcodeFromScreenTrailblazeTool

Contract

  • Visible to LLM: yes (surface_to_llm: true)
  • Recordable: yes (is_recordable: true)
  • Host-only: no (requires_host: false)

Input schema

Required parameters

  • variableString The memory variable name to store the decoded barcode text under, e.g. “barcodeValue”.

Optional parameters

  • includeLinearFormatsBoolean Also scan for striped retail barcodes (UPC, EAN, Code 128/39/93, ITF, Codabar). Off by default: those readers look for runs of light and dark bars, which ordinary UI and image compression produce by accident, so on a full screen they can return a confidently wrong number. Turn this on when you know a striped barcode is what is on screen.

Output

Returns: string (opaque text content)

Typed result schemas (kind: query | action, MCP structuredContent) are not yet carried by the resolved manifest — this section will gain detail when that lands.