Toolforge Docs
DocsIO Primitivesmessage

message

Displays a message to the user. Supports simple text, numbers, objects, arrays, or rich block content.

Usage

message

await io.message({
  title: 'Success',
  message: 'Your order has been processed successfully!',
})

Props

PropDescriptionTypeRequiredDefault
titleOptional title for the messagestringNoundefined
descriptionOptional description for the messagestringNoundefined
messageThe message content. Can be JavaScript primitives or complex objects, or BlockOutput for rich contentstring | number | object | array | BlockOutputYes

Returns

Returns Promise<void>.

Examples

Structured data message

Message with block

await io.message({
  title: 'Order Summary',
  description: 'Review your order details',
  message: {
    orderId: '12345',
    items: 3,
    total: 99.99,
    status: 'confirmed',
  },
})

Rich content with blocks

Message with block

await io.message({
  title: 'Analysis Complete',
  message: {
    type: 'table',
    data: result,
  },
})

On this page