Skip to content

Script Workspace Actions

Genie includes direct Script Workspace tools so you can capture, edit, and apply script content without leaving FileMaker.

Script Workspace toolbar with Copy XML, Paste XML, Edit XML, Genie, and Klai buttons

  • Reads the current selection and prepares a native FileMaker clipboard object.
  • Use it for controlled native transfer, not to expose raw XML.
  • Pastes a compatible native FileMaker object into Script Workspace.
  • Opens the legacy expert carrier tool for compatible native objects.
  • Opens the full Genie UI for generation and analysis.
  • May also expose the compact Script Workspace Agent surface when that runtime is enabled. Script Workspace Agent is AGENT-only and uses Genie MCP tools to gather evidence before answering or preparing a reviewed artifact.
  • Appears beside the Genie button when Settings > Advanced > Enable Klai Integration is on.
  • Offers Set Up Klai App for one-time setup or Add HookSet for an additional HookSet.
  • Copies the selected HookSet to the clipboard so you can paste it in Script Workspace.

Once Genie is open, use Add Selection to capture the current live Script Workspace selection or current script. Use Metadata Explorer > Scripts when you want broader known-script context.

Note: there is no dedicated View button in the Script Workspace toolbar. Read-only viewing is available from context badges and Preview Code in chat.

The Klai flow uses explicit FileMaker clipboard actions. Enabling the integration does not import or paste anything by itself.

  1. Open FileMaker > Manage > Custom Functions and click the Klai icon beside Import.
  2. Genie validates all 57 definitions from the authoritative Klai Functions export and their FileMaker clipboard encoding, then copies that complete bundle directly with no exclusions. It does not inspect or review the current function inventory and does not require a verification receipt. Paste the functions in FileMaker and choose OK.
  3. In Script Workspace, click the Klai icon and choose Set Up Klai App or Add HookSet.
  4. For Set Up Klai App, enter the Shared name and HookSet name. For Add HookSet, only the HookSet name is shown. Names must begin with a letter, use only letters, numbers, _, or -, and contain at most 48 characters. When both names are present, they cannot match case-insensitively.

Set Up Klai App dialog with Shared name and HookSet name fields

Add HookSet dialog with the HookSet name field

  1. Choose Copy. The dialog contains only Copy and Cancel. Genie flags a conflicting name when it is visible, but it does not select or copy your Script Workspace sidebar. Set Up Klai App always copies without checking installed functions and shows a reminder to install the Klai Functions before pasting. Paste the HookSet in Script Workspace. The copied scripts preserve the source XML’s authored blank editing rows and spacing.

There is no Custom Function inventory, review, or receipt gate on Set Up Klai App. Add HookSet is unchanged and uses Klai’s modern direct route (isLegacy = 0). This flow does not generate the legacy scoped variant, silently overwrite Custom Functions, or paste into FileMaker for you.

Script Workspace Agent is the compact AGENT surface for Script Workspace.

  • It uses the selected provider/model.
  • It prepares Genie runtime and Local MCP state before sending.
  • It may use the active script name as lightweight context.
  • It fetches exact script content only when the request needs it.
  • It promotes script drafts through normal CODE Preview/Copy/Apply controls and exposes Create Script for supported reviewed new-script artifacts.

It does not silently capture XML on open, send, focus, or window changes. Use explicit Add Selection, Metadata Explorer selections, or Refresh Selection / Capture when you need current Script Workspace XML evidence.

Compact Script Workspace Agent beside the active FileMaker script

When a supported new-script artifact is ready, the compact panel keeps Preview, Copy, Create Script, and Apply visible so you choose the next action deliberately.

Compact Script Workspace Agent showing the reviewed script actions

When applying code from Genie, the system uses native operations that target your Script Workspace directly:

  • Apply Progress: Shows an animated Applying… indicator while changes are being written to FileMaker.
  • Delta Apply (Line-targeted): Edits specific lines in your existing script based on a native delta plan.
  • Full Script Apply: Writes an entire script body for new scripts or complete refactors.
  • Automatic Routing: You don’t have to select the target lines before clicking Apply Code. Genie uses the original line-mapping context to apply edits precisely where they belong.
  • Safety: Apply stops and reports an error if the editor state changes or the wrong script is front-most.
  • Keep Script Workspace front-most before copy/paste/apply actions.
  • Use Add Selection for live Script Workspace context and Metadata Explorer for broader script or schema context.
  • If a command fails, run one manual Cmd+C in Script Workspace and retry.