Service Buttons

Service buttons allow you to create additional tabs in your application's interface by writing specially formatted messages to stderr. These tabs can either link to external URLs or embed content directly.

Basic Usage

To display a service button, print a message to stderr in the following format:

::show-service-button::{options}

Required Options

  • url (string): The URL the button should link to or embed

  • name (string): The display name for the button

Optional Options

  • embed (boolean): When set to true, embeds the URL content inline instead of showing a button. Default: false

  • style (string): Alternative way to set embed mode using style: "embed"

Examples

Basic Button Tab

Create a tab that links to an external URL:

import sys
print('::show-service-button::{"url":"http://example.com/","name":"Example"}', file=sys.stderr)

Embedded Content Tab

Create a tab with embedded content displayed directly:

Or using the style parameter:

Important Notes

  • Service button commands must be written to stderr, not stdout

  • Each service button creates a new tab in the interface

  • The JSON options should be valid JSON format (use double quotes for strings)

  • Tabs with embed: true will display the content inline, while regular tabs will link to external URLs

Last updated

Was this helpful?