Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CHROME_PATHNoSpecify the Chrome/Chromium executable; if unset, common paths are auto-searched or the playwright bundled browser is used.
HAOMEME_APP_HTMLNoSpecify the path to the original App's index.html; defaults to the repo's HaoMeme-main/index.html.
HAOMEME_CHROME_PATHNoSpecify the Chrome/Chromium executable; if unset, common paths are auto-searched or the playwright bundled browser is used.
HAOMEME_OUTPUT_ROOTNoThe root directory allowed for writes; defaults to the repo directory where the server is located. Output defaults to ./output.
HAOMEME_PROJECT_ROOTNoLets haomeme_catalog report a custom project root directory (informational only).

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": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
haomeme_catalogA

HaoMeme meme generator — START HERE (call once before generating). Returns everything needed to write a correct haomeme_generate / haomeme_batch_generate call in one shot: the LIVE built-in portrait list (key / label / side, 11 portraits), the enum values for template / backdrop / colour / side, the per-template preset text, the output directory, the image size, plus the full field reference and workflow guide (field limits, layout notes, timing, error shape, copyright note). Cheapest discovery call: no image is rendered until you call haomeme_generate or haomeme_batch_generate.

haomeme_generateA

Generate ONE HaoMeme-style meme PNG (1280x720) into this project folder. Renders by driving the original HaoMeme web app in a local headless browser, so fonts, built-in portraits, paint stroke and layout match the web UI exactly. spec = one object of optional fields (full reference: FIELD_HELP below, or call haomeme_catalog). RULES THAT MATTER: (1) line breaks are written as the two characters backslash-n inside the JSON argument, e.g. "第一行\n第二行" — a literal newline can be dropped and your two captions will end up on one line; (2) lineColors is ONE colour per line (white|yellow|red), default white then yellow; (3) template teaches/crash put the portrait on the LEFT, nope puts it on the RIGHT. Example: {"template":"teach","portrait":"A","backdrop":"red","text":"老黃說退就退\n#OpenToWork","lineColors":["white","yellow"]}. outputDir must stay inside the project folder (default ./output; override with HAOMEME_OUTPUT_ROOT). Returns {ok, path, bytes, width, height, template, text}; a failure is returned as {ok:false, error}. For 2+ images prefer haomeme_batch_generate — one browser page is reused and it is much faster.

FIELD REFERENCE (all optional, omitted = template default): HaoMeme spec fields — EVERY field is optional; an omitted field keeps that template's own default: text string, max 300 chars. The headline. To break a line write the two characters backslash-n ("\n") INSIDE the JSON argument, e.g. "第一行\n第二行". Do NOT rely on a literal line-break character in the JSON string: some clients drop it and the two captions collapse onto one line (and the filename loses the break too). Omit text to use the template preset listed below. template teach | crash | nope | sue (default: teach) lineColors array, max 8, ONE colour per line: white | yellow | red. Line 1 defaults to white, line 2 to yellow, any extra line to white. The colour is per LINE, not per character. portrait built-in portrait key (single letter, from haomeme_catalog's live list). Overrides portraitIndex. portraitIndex zero-based index into that portrait list (alternative to portrait). backdrop red | classroom | oldClassroom | room | grey | dark | smoke red = flat red with the paint stroke; the others are photo sets. side left | right — which side the portrait sits on. textSize 30..220 (100 = default, bigger = larger type) rotation -180..180 degrees of text rotation brushSize 30..250 (100 = default) — red paint-stroke thickness portraitSize 30..260 (100 = default) backgroundSize 10..300 (100 = default) backgroundBlur 0..30 px — blur on photo backdrops redBrush boolean — show the red paint stroke under the text brushInFront boolean — paint stroke in front of the portrait (still below the text) italic boolean — lean the text to the right flip boolean — mirror the portrait

LAYOUT (verified by actually rendering): teach and crash = portrait on the LEFT with the big headline on the right; nope = portrait on the RIGHT with the text on the left; sue = the lawyer-letter style. Use nope when you want the portrait and the text on opposite sides from teach/crash.

Preset text used when "text" is omitted: teach 輪到你\n教育我了? crash AI教育\n翻車了? nope 想玩GTA6?\n免談 sue 你準備收\n律師傳票

haomeme_batch_generateA

Generate 1..50 HaoMeme-style meme PNGs in ONE call, reusing a single headless-browser page — much faster than one haomeme_generate call per image (the browser and fonts load once). items = an array of spec objects, EACH accepting the same optional fields as haomeme_generate (full reference: FIELD_HELP below, or call haomeme_catalog once first for the live portrait keys). RULES THAT MATTER: (1) line breaks are written as the two characters backslash-n inside the JSON argument, e.g. "第一行\n第二行" — a literal newline can be dropped and your two captions will end up on one line; (2) lineColors is ONE colour per line (white|yellow|red), default white then yellow; (3) template teaches/crash put the portrait on the LEFT, nope puts it on the RIGHT. Example: [{"text":"第一行\n第二行","lineColors":["white","yellow"],"template":"teach","portrait":"A","backdrop":"red"},{"text":"A\nB","template":"nope","portrait":"I","backdrop":"dark"}]. A single bad item does NOT fail the batch: it returns {ok:false, index, error} and the rest still render. Returns {ok, count, succeeded, outputDir, results[]} where each result is {ok, path, bytes, width, height, template, text}. The first call may take ~20-60s while the browser starts; afterwards each item is fast. outputDir must stay inside the project folder (default ./output; override with HAOMEME_OUTPUT_ROOT).

FIELD REFERENCE (all optional, omitted = template default): HaoMeme spec fields — EVERY field is optional; an omitted field keeps that template's own default: text string, max 300 chars. The headline. To break a line write the two characters backslash-n ("\n") INSIDE the JSON argument, e.g. "第一行\n第二行". Do NOT rely on a literal line-break character in the JSON string: some clients drop it and the two captions collapse onto one line (and the filename loses the break too). Omit text to use the template preset listed below. template teach | crash | nope | sue (default: teach) lineColors array, max 8, ONE colour per line: white | yellow | red. Line 1 defaults to white, line 2 to yellow, any extra line to white. The colour is per LINE, not per character. portrait built-in portrait key (single letter, from haomeme_catalog's live list). Overrides portraitIndex. portraitIndex zero-based index into that portrait list (alternative to portrait). backdrop red | classroom | oldClassroom | room | grey | dark | smoke red = flat red with the paint stroke; the others are photo sets. side left | right — which side the portrait sits on. textSize 30..220 (100 = default, bigger = larger type) rotation -180..180 degrees of text rotation brushSize 30..250 (100 = default) — red paint-stroke thickness portraitSize 30..260 (100 = default) backgroundSize 10..300 (100 = default) backgroundBlur 0..30 px — blur on photo backdrops redBrush boolean — show the red paint stroke under the text brushInFront boolean — paint stroke in front of the portrait (still below the text) italic boolean — lean the text to the right flip boolean — mirror the portrait

LAYOUT (verified by actually rendering): teach and crash = portrait on the LEFT with the big headline on the right; nope = portrait on the RIGHT with the text on the left; sue = the lawyer-letter style. Use nope when you want the portrait and the text on opposite sides from teach/crash.

Preset text used when "text" is omitted: teach 輪到你\n教育我了? crash AI教育\n翻車了? nope 想玩GTA6?\n免談 sue 你準備收\n律師傳票

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.2/5.0

Scored across 3 tools

Disambiguation4/5

The three tools have clearly demarcated roles: catalog is pure discovery (no rendering), generate does one image, batch_generate does 1-50 with a shared browser page. The only overlap is that batch_generate with a single item duplicates generate, but descriptions explicitly route 2+ images to batch, so misselection risk is low.

Naming Consistency5/5

All three names share the haomeme_ prefix and a predictable verb/noun pattern (catalog, generate, batch_generate). The batch qualifier is a natural modifier rather than a convention break.

Tool Count4/5

Three tools map cleanly onto discover -> render one -> render many, with no filler. It is on the lean side, since catalog's enum/portrait data could arguably live in the generate descriptions, but nothing is redundant.

Completeness4/5

For a render-only domain the create path is fully covered plus discovery and batching, which is better than most generation servers. Minor gaps remain: no tool to list or clean up previously rendered files, and results return a file path rather than image bytes, though agents can work around both.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues