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

Toolbar actions
Section titled “Toolbar actions”1. Copy XML
Section titled “1. Copy XML”- Reads the current selection and prepares a native FileMaker clipboard object.
- Use it for controlled native transfer, not to expose raw XML.
2. Paste XML
Section titled “2. Paste XML”- Pastes a compatible native FileMaker object into Script Workspace.
3. Edit XML
Section titled “3. Edit XML”- Opens the legacy expert carrier tool for compatible native objects.
4. AI button
Section titled “4. AI button”- 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.
5. Klai button
Section titled “5. Klai button”- 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.
Klai HookSets and Custom Functions
Section titled “Klai HookSets and Custom Functions”The Klai flow uses explicit FileMaker clipboard actions. Enabling the integration does not import or paste anything by itself.
- Open FileMaker > Manage > Custom Functions and click the Klai icon beside Import.
- 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.
- In Script Workspace, click the Klai icon and choose Set Up Klai App or Add HookSet.
- 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.


- 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
Section titled “Script Workspace Agent”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.

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.

Native apply and progress
Section titled “Native apply and progress”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.
Best practices
Section titled “Best practices”- 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+Cin Script Workspace and retry.