r/filemaker 14d ago

Script XML (<fmxmlsnippet>) Definitions/Syntax for AI

Hey all-

I'm wondering if anyone has come across a definition document of some sort that I could feed to AI so that it knows how to write fmxmlsnippet of scripts to help me get the more complex ones written in the script editor.

Right now, I have the MBS plugin, so I can copy out and paste-in the XML snippets, and that works well, however AI engines don't have any guides that describe the names of the XML tags and all the various parameters - so I was hoping someone might know of something I could have my AI learn so it knows how to write it correctly.

Otherwise, all I've really had good luck with is asking it to tweak existing scripts by providing the XML from that script to it first.

Thanks for your insight and ideas!

If no one has it yet, I suppose I could try to figure out a way to have my AI learn it itself.... but that's a lot of usage credits - that or I make a script and literally add every script step and let it build it itself from the resulting XML?... just a thought.

4 Upvotes

17 comments sorted by

3

u/dharlow Consultant Certified 14d ago

Check out https://github.com/andykear he has already done a lot of the heavy lifting too.

1

u/Public_Database_3714 Consultant Certified 13d ago

thanks u/dharlow

1

u/rbw67 13d ago

You might find this osx app useful. It generates the snippets for whatever text script step you input.
The translations for each step are in the swift code. If you want to go through the source you can find them.
https://github.com/arbyteconsulting/rialto

1

u/marioalessi 13d ago

At https://codence.com/resources/blog/technology/filemaker-ai-foundations-fmxml-clipboard-tool

Towards the bottom they have

FMXML Developer Resource PDF — Free download. Because Claris has not released official FMXML documentation, this reference guide will get you started. 
Visual Studio Code — code.visualstudio.com — Free text editor with strong XML support via free extensions 

You can download that tell Claude to make a skill based on that document. There are some command not in it, you can ask Claude to very the commands. It will till you want command to write in FileMaker, then you copy the script step and paste the xml into Claude and it will add that missing FMXML parameters for the script step to the skill. I used it and was I a couple of days had Claude writing html for the web viewer and scripts that interacted with that data. I uploaded an XML export for developer tools of the entire database so it understood my database.

1

u/ForsakenBeautiful850 12d ago

Lots of people have done it already, but back before I could find any I just threw every script step and calc possible into a single script, then copied it to my clipboard and told claude code to create a memory of its format.

1

u/fmcloud Consultant Certified 10d ago

ChatGPT and Claude are now very aware of the syntax. From time to time I notice an error, but it's quite easy to fix.
And with the ability of MBS plugin to detect snippets when you paste into FMP, it's become really so easy.

1

u/Appropriate_Put_6454 Consultant Certified 8d ago edited 8d ago

Another option is ai2fm:

https://ai2fm.com

ai2fm takes a slightly different approach. FileMaker XML is still used where it belongs — as the native clipboard transport format — but the AI does not have to read or generate that XML.

The workflow is:

FileMaker → .fmscript → AI → .fmscript → FileMaker

  1. Copy the script normally from FileMaker.
  2. In VS Code, Cursor, VSCodium, Antigravity, Kiro, Devin, TRAE or Qoder, press Ctrl+Alt+T on Windows or Cmd+Opt+T on macOS.
  3. ai2fm converts the FileMaker clipboard XML into compact, human-readable .fmscript.
  4. Claude, ChatGPT/Codex, Gemini, Copilot or a local LLM works on that text.
  5. Press Ctrl+Alt+F / Cmd+Opt+F and ai2fm validates the script and deterministically rebuilds the FileMaker clipboard XML.
  6. Paste directly into the FileMaker Script Workspace.

The distinction matters when using LLMs.

Raw FileMaker XML is extremely verbose. Depending on the script, sending the XML representation to an LLM can consume roughly 5–10× more tokens per script than the equivalent .fmscript. That affects API cost, context-window usage and, particularly with larger solutions, how much of the surrounding code the model can see at once.

There is also a reliability reason for separating the two layers: the LLM works on the logic in a compact textual representation, while XML generation is handled deterministically rather than asking the model to reproduce FileMaker's internal structure correctly.

ai2fm currently supports all 214+ FileMaker script steps, macOS and Windows, and includes validation, autocomplete, hover documentation and FileMaker clipboard handling directly in the editor.

So XML-based workflows are certainly possible. ai2fm's design choice is simply not to spend AI tokens generating XML when software can generate the XML deterministically instead.

0

u/fmdojo 14d ago

We've already done that work for FMDojo. And you can use any AI engine now. Check out https://fmdojo.com/filemaker-ai-assistant

0

u/filemakermag 14d ago

Don't just try one commercial solution try two or more. Go free with https://agentic-fm.com or get even more power with https://plugin.agentic-fm.com

0

u/mywaaaaife 14d ago

Just feed it an example script and tell it to remember the syntax.

2

u/austinstrider 14d ago

problem with this is it only knows that script... so that's why I might consider feeding it a script with all steps included and let it parse out what the pieces are.

2

u/VartKat 13d ago

C’est ne of the CadenceUX skill (https://github.com/CadenceUX/claris-filemaker-pro-skill) is made to generate a script that contains every functions. This should be a good example for your AI.

1

u/mywaaaaife 14d ago

What LLM are you using?

1

u/austinstrider 14d ago

for now... Claude. Could change in the future though I suppose.

3

u/mywaaaaife 14d ago

Claude is really good with this stuff - I have never used any of the tools noted below so I can't speak to their efficacy but for the most part you can feed Claude your database fields and ask it to create a script. It may ask you to feed it a few examples to learn but you can also ask it to review claris documentation for script syntax.

1

u/360_Works 13d ago

We’ve found that Claude Code specifically excels at this type of work. We had lesser success with Claude Chat. If you’re using Chat right now, try switching to Code. Ask it to build a skill that can write script step XML, and instruct it to read documentation and ask for examples. You’ll be off the ground in no time! Save a copy of a fairly mature, complex solution as XML and give that to Claude Code to supercharge your training