Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
P21_DEVICENoプリンタの接続先を指定します(`-d/--device` と同等)。Windows では `rfcomm:<MAC>` または `serial:COM5`、Linux では `rfcomm:<MAC>` または `serial:/dev/rfcomm0`、macOS では `serial:/dev/cu.P21` または `ble:<UUID>`、BLE 専用の個体では `ble:<アドレス>`、実機なしで試す場合は `mock:` を指定します。
P21_TEMPLATES_DIRNoテンプレートを保存するフォルダを指定します(クラウド同期フォルダなど)。未指定の場合は設定フォルダの `templates/` が使われます。

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
p21_label_formatA

Get the P21 label JSON format (JSON Schema) and design guidelines. Call this first.

p21_renderA

Render a label to a preview PNG exactly as it will print, without printing. Returns the image, warnings (fix them) and each element's box and chosen font size.

p21_printA

Print a label on the Nelko P21. This uses real labels: call it only when the user asked to print, with 1 copy unless told otherwise, after checking p21_render. rows prints one label per item. With device mock: the result contains mock_png, the image the simulated printer received.

p21_statusB

Printer readiness, loaded label size (from the roll's RFID tag), battery and firmware.

p21_scanB

Search for P21 printers (paired Bluetooth Classic devices, serial ports, BLE). Takes ~5 s.

p21_fontsA

List installed font families usable in the font field of text elements.

p21_list_templatesA

List the user's saved label templates (name, media, {{variables}}). Use one with template in p21_render / p21_print.

p21_save_templateA

Save a label design as a reusable template (also shown in the GUI). Put {{placeholders}} where values change. Refuses to replace an existing template unless overwrite=true.

p21_save_labelA

Save a label as a .p21.json file (relative paths are relative to the server's working directory) so the user can open it in the GUI or print it with the CLI. Returns the absolute path.

p21_load_labelA

Load a .p21.json label file. Returns the label as written in the file plus validation warnings.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.8/5.0

Scored across 10 tools

Disambiguation5/5

Each tool targets a clearly distinct operation: discovery (scan), readiness (status), schema guidance (label_format), assets (fonts), preview (render), output (print), and persistence (list/save template, save/load label). The only potentially confusable pair, save_template vs save_label, is clearly separated by their descriptions (reusable template with placeholders vs .p21.json file). Render vs print is also explicitly contrasted.

Naming Consistency4/5

All tools share a consistent p21_ prefix and snake_case, which makes the set easy to scan. Most are verb_noun (render, print, scan, save_template, load_label), but a few are noun-only or noun_noun (p21_fonts, p21_status, p21_label_format), a minor deviation from the dominant pattern.

Tool Count5/5

Ten tools is well-scoped for a label printer server: discovery, status, schema, fonts, preview, print, and template/file persistence. No tool appears redundant, and each covers a necessary stage of the label workflow.

Completeness4/5

The lifecycle is largely covered: find printer, check status, learn format, render, print, and save/load both templates and label files. The main gap is template management—there is no delete_template (or get-single-template) operation, so users cannot remove or inspect an individual saved template beyond listing names.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues