Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

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
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
perch_startA

Start the Perchance editor session: launch the browser and load the given generator with its collab key, ready to edit — one call. Handles Cloudflare automatically (4-step escalation ladder). Re-calling with the same generator/collabKey is a fast no-op. Omit collabKey for a non-collab edit (must own the generator).

perch_statusA

Report live editor state: save state, syntax errors, collab sync, line counts, engine, CF status, buffered console/error counts.

perch_pullA

BROWSER-FREE code access. Fetch the authoritative modelText (main.pjs) and outputTemplate (index.html) from Perchance's public API in ~1.2s — no browser, no Cloudflare, no collab key needed — and write them to local files. Grep/read those files directly for full-speed, full-text search of a 40k-line generator. Works without perch_start.

perch_readA

Read a pane (model=main.pjs, output=index.html) from the LIVE editor as 1-indexed numbered lines.

perch_grepA

Regex search across one pane (or both if pane omitted). Returns matching lines with optional context.

perch_editB

Surgical find/replace in a pane. Yjs settle runs by default so the edit survives a reload.

perch_patchB

Apply multiple surgical changes in one call. Each change: {pane, oldString, newString, replaceAll?, nth?}.

perch_writeA

Replace an entire pane's document with new content.

perch_outlineA

Line map of function/class/const declarations — orient in a 40k-line file without reading it all.

perch_copy_linesB

Byte-exact copy of source lines into a destination pane (after a target line, or append).

perch_refreshA

Hard-reload the live preview and report syntax errors, runtime errors and new console lines.

perch_consoleC

Read the console: Perchance's #console-output panel plus the buffered console + runtime errors captured from every frame.

perch_errorsA

Error triage in one call: editor syntax errors (window.getEditorSyntaxErrors) + buffered runtime/page errors + console tail. Use clear:true to reset buffers after a fix.

perch_evalB

Run a JS expression and return its value. Default frame is the running generator ('preview'); use frame:'editor' for the editor page.

perch_snapshotA

Text-first UI testing: list the visible interactive elements (buttons/inputs/links) in the live preview with a ready-to-use CSS selector each. Use this instead of screenshots to find what to click.

perch_waitA

Wait for a selector or visible text to appear (or vanish with gone:true) in the preview. Use after a click/edit before asserting.

perch_clickC

Click an element in the live preview (or editor chrome). selector: CSS selector or 'text=Visible Text'.

perch_typeC

Type text into an element in the live preview (or editor chrome).

perch_pressB

Press a key (Enter, Tab, Escape, ...) on the focused element.

perch_shotB

Screenshot. what: 'editor' (default) = whole editor page; 'preview' = the running generator iframe.

perch_srcB

Read a src/ file (from the generator's srcManifest) via the CDN.

perch_list_srcA

List all src/ files in the generator's srcManifest with sizes.

perch_set_viewportB

Resize the live preview and report the iframe rect.

perch_fetch_generatorA

Fetch a public generator's source (modelText + outputTemplate) to local files. Alias of perch_pull.

perch_stopB

Close the browser session. Call perch_start again to resume.

perch_navigateA

Navigate the whole editor PAGE to any https:// URL (top-level). Recovery tool: a Cloudflare interstitial can never render inside iframes, so when an embed/subframe (e.g. text-generation.perchance.org under the ai-text-plugin) is CF-blocked, visit that URL top-level once, let the challenge clear, then perch_start with force:true to reload the editor. Also loads arbitrary pages for inspection. Waits for a CF challenge to clear.

perch_upload_srcA

Upload a file into the generator's src/ via the editor's file panel (DataTransfer injection — no OS dialog needed). The file lands in the editor src store ('saved'); it goes public when the generator's owner saves.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.4/5.0

Scored across 27 tools

Disambiguation4/5

Most tools target clearly distinct actions, but there are real overlaps: perch_pull and perch_fetch_generator are an explicit alias pair, perch_edit is essentially the single-change form of perch_patch, and perch_errors overlaps with perch_console (it includes a console tail). Descriptions do a good job disambiguating these, so misselection risk is modest.

Naming Consistency4/5

All tools share a consistent perch_ prefix with snake_case, which is predictable and readable. The only deviation is verb-vs-noun inconsistency (perch_edit/perch_grep vs. noun-only perch_status/perch_console/perch_shot), which is minor.

Tool Count3/5

At 27 tools the surface is heavy, exceeding the typical 3-15 sweet spot, and the count is inflated by a redundant alias (perch_fetch_generator). Most tools do appear to earn their place given the complexity of browser-based editing, testing, and file management.

Completeness4/5

Coverage is broad: session lifecycle, code reading/outline/grep, surgical and bulk editing, preview UI testing, console/error triage, and src file management are all present. Minor gaps remain, such as no explicit src-file deletion and limited navigation inside the preview iframe.

Maintenance

ActivityMaintained
ResponsivenessNo issues