MCP tool reference
This page is for people who build with an external agent, such as Codex, Cursor or Claude Desktop, connected to Genie through Local MCP. To connect a client first, see Local MCP Bridge.
Genie exposes up to nine tools.
| Tool | Plan | Use for |
|---|---|---|
fm_session | Free | Status, open files, the active file, project context, and metadata refresh. Activating another file requires a paid plan. |
fm_search | Free | Searching Genie’s guides, schemas, and script step and function catalogs. Requires query. |
fm_read | Free | Reading one exact script or metadata target from the live file. target:global_field_values lists a file’s global fields and the values the session holds. |
fm_query | Free | Read-only SELECT queries. |
fm_evaluate | Paid | Evaluating a FileMaker calculation. It never changes the file. |
fm_stage | Paid | Validating, previewing, staging or executing one change. See How staging works. |
fm_workbench | Paid | Listing and checking Workbench items, removing a queued item, and staging a group of changes together. Removing an item never changes your file. |
fm_run | Paid | action:start runs one existing script in the current file. action:status reads its optional result. Every start asks you to confirm, unless Auto apply is on with Run scripts automatically enabled. |
report_issue | Free | Optional. Sends a short diagnostic report when Genie or the agent hits a product problem. Unavailable when Send product issue reports is off in Settings > Security or MCP apps are at Selection only. |
Reads are free. Staging and execution require a paid plan. After a plan change, reconnect the client so it refreshes its tools.
How staging works
Section titled “How staging works”Each fm_stage call handles one change of one kind. action:validate and action:compile_preview check or preview the change. They never change your file.
- Without Auto apply:
action:stagesends the change to Workbench. You review it there before anything changes in your file. - With Auto apply on: an explicit
action:executerequest runs the change directly. It is listed in Workbench › Submitted with its real outcome.
Auto apply is off by default and is turned on in Settings > Security in Genie. Access, file and Security checks apply either way. fm_run asks you to confirm every script run, even with Auto apply on. See Review, Auto apply and Undo.
When Claude Code or Codex calls the tools
Section titled “When Claude Code or Codex calls the tools”Claude Code and Codex running inside Genie (Claude Code and Codex) use these same nine tools through Genie’s local tool server. Their calls behave like any other MCP client’s, with the same Auto apply rules:
- With Auto apply off,
action:stagequeues the change for your review. In Genie it appears as a card with Apply, Review and Copy in the program’s conversation, and in Workbench if the card cannot be delivered. - With Auto apply on,
action:stageand an explicitaction:executeapply the change directly, with Genie’s native checks and read-back. This includes script folders, renames and HookSet installs (kind:script_folders) and layout writes where your FileMaker build allows them. - The paid plan, the file checks, and the level set in Settings > Security still apply.
fm_runstill asks you to confirm every start. - Unlike Genie’s own Agent, nothing checks an engine’s change against what you asked.
Reads stay Free, and staging and execution need a paid plan.
What fm_stage accepts
Section titled “What fm_stage accepts”| Kind | Use for |
|---|---|
script | One new script (result_type: "new_script") or one edit to a named script (result_type: "delta_edit"). |
script_folders | Creating script folders, moving and renaming, and deleting scripts (delete_script), folders with everything in them (delete_folder) and script list separators (delete_separator). Deletes can share one change with each other only. |
layout | Creating a layout, adding objects to one, or editing and deleting objects on one, described in Layout Schema. |
data | One FileMaker SQL data or schema change. |
table | Creating a table with its fields, renaming a table, and writing its description. operation:duplicate_table copies a table with its fields and field ids, without records. |
global_field_value | Setting one repetition of a global field. Storing it saves all the global values of that table, so the review lists each one. Read them first with fm_read target:global_field_values. |
field | Creating, editing, duplicating or deleting fields. fields takes up to 100 in one save. Includes the AI annotation and the display names switch. |
custom_function | Creating, editing, renaming, duplicating or deleting a custom function; on FileMaker 22 and later, creating folders and moving functions or folders into them. |
value_list | Creating, editing, renaming, duplicating or deleting a value list. |
admin | Accounts, privilege sets, themes (including a custom theme’s stylesheet and named styles), custom menus, File Access authorizations between files, File Options including the first window’s state, and other file-level catalogs. |
table_occurrence | Adding, renaming or deleting a table occurrence. |
relationship_graph | Creating, editing or deleting relationships, deleting occurrences and tables, and arranging the graph. |
Read-only queries stay with fm_query, outside Workbench. Questions and planning stay in the agent or in Genie’s chat.
Staging scripts
Section titled “Staging scripts”- Stage one new script or one edit to one named script per call. For several scripts, make one
fm_stagecall per script. - Before an edit, read the script with
fm_read target:script. It returns the script as numbered lines. Anchor each edit to those one-based line numbers. - Find the Script Schema and the exact step and function records with
fm_searchbefore you write steps. - When metadata names matter, read them with
fm_read target:selectionand pass the returnedmetadata_selectionwith the staged item. - Stage scripts and data changes as separate items.
- Validate with
action:validatebefore you stage.
Staging data and schema
Section titled “Staging data and schema”Read the exact tables, fields and relationships with fm_read first, then stage one request with fm_stage kind:data. Before a data change runs, its card shows the exact SQL and values, and nothing runs until the user clicks Execute (or Auto apply runs it).
Deletes and whole features
Section titled “Deletes and whole features”A delete follows the three delete boxes in Settings > Security. When a delete must wait, fm_stage answers awaiting_delete_confirmation with the job, and the user answers on a card in Genie. Read the outcome later with fm_workbench. See Deletes.
fm_workbench action:validate_changeset checks a group of changes without writing anything. action:stage_changeset stages it. Members can be scripts, data, layouts, tables, fields, value lists, custom functions, admin items, table occurrences and relationships. Each member saves on its own. If one fails under Auto apply, the result lists each member’s outcome and says where it stopped.
A typed fm_stage plan can leave out file_name, file_id and session_id when the working file is unambiguous. Genie fills them in and reports it.
Searching a file for text
Section titled “Searching a file for text”fm_read target:references subject_kind:text name:"PO Number" searches the whole file. match is contains (default) or exact, and case_sensitive is optional. Add layout to reference_kinds to search layouts. The read is free and returns no record values. Check coverage before saying a text appears nowhere.
Optional script results
Section titled “Optional script results”Result capture is opt-in. No runner script is needed, and Genie does not replace or wrap the script parameter.
In the FileMaker script, wrap the result in the final Exit Script step:
Exit Script [ Text Result: Genie_ReturnScriptResult ( $result ) ]Genie_ReturnScriptResult ( result ) reports the value to a pending Genie run and returns that same value unchanged. A parent FileMaker script can still read Get ( ScriptResult ). If a script has several Exit Script paths that should report results, use the function on each one.
The flow:
- Call
fm_runwithaction:"start", the exact current file and script, andcapture_result:true. Genie asks you to confirm the run. - Keep the returned
run_request_id. If the start call timed out while the confirmation was open, ask for status with the samefile_nameandscript_nameinstead: Genie returns the newest run of that script, including one still waiting for your answer. - Poll
fm_runwithaction:"status"and that ID. Status checks are read-only and do not ask for another confirmation. - Treat the run as finished only when status is
"completed"andscript_completion_observedistrue. A queued start alone is not enough.
Genie keeps one result-aware run at a time for the same file and script. Unrequested, wrong-script, duplicate, and overlapping callbacks are ignored. Results stay in plug-in memory only, are limited to one million characters, and time out after 15 minutes. Scripts that don’t use the function still run; check their effect with the smallest relevant read-only tool.
Routing examples
Section titled “Routing examples”| User intent | Agent should do |
|---|---|
| ”Create a script that exports Customers as JSON.” | Find the guides and schema, read the exact metadata with fm_read, validate with fm_stage kind:script action:validate, then stage with fm_stage kind:script action:stage. |
| ”Update the selected script to add logging before the API call.” | Read the exact content with fm_read target:script, then stage a targeted delta_edit with fm_stage kind:script. |
| ”Create two scripts: Export Customers and Export Orders.” | Make two separate stage calls. |
| ”Create table Customers with Email and Status fields.” | Inspect the exact metadata, then stage one table with its fields with fm_stage kind:table. |
| ”Show me active customers.” | Use fm_read for the schema, then fm_query for read-only rows. |
| ”Run GenieShowDialog and return its JSON result.” | Resolve the exact file and script, call fm_run action:start with capture_result:true, wait for your confirmation, then poll the returned ID with action:status. The script must use Genie_ReturnScriptResult. |
Core resources
Section titled “Core resources”Essential anchors:
genie://schemas/script-schemagenie://schemas/script-cataloggenie://schemas/layout-schemagenie://context/projectgenie://context/scriptsgenie://metadata/relationshipsgenie://metadata/relationship-graphgenie://metadata/selectedgenie://metadata/all
genie://context/project includes the project name, description, enabled rules, naming conventions, reusable patterns, script template, and guidance_sources, which shows whether each value came from the Project or from Generic Personalization. This guidance shapes names, comments, patterns, and script structure. It never changes what the agent is allowed to do.
Important guide resources:
genie://guides/script-delta-editinggenie://guides/metadata-selectiongenie://guides/stage-contractgenie://guides/relationshipsgenie://guides/layout-designgenie://guides/filemaker-guide-manifestgenie://guides/filemaker-behavior-coregenie://guides/filemaker-script-reviewgenie://guides/filemaker-script-debuggenie://guides/filemaker-data-behaviorgenie://guides/what-not-to-stage
When Klai integration is on:
genie://guides/klai-filemaker-business-hooksgenie://guides/klai-hook-execution-contractgenie://guides/klai-helper-inbox-diagnosticsgenie://guides/klai-hook-async-data-cache-diagnosticsgenie://guides/klai-hook-request-templategenie://guides/klai-resource-map
Layout-focused agents may also read:
genie://layout/schemagenie://layout/objects-dictionarygenie://layout/style-astgenie://layout/stylesheet-contractgenie://layout/fm-attribute-modelgenie://layout/design-to-fm-transformgenie://layout/asset-registrygenie://layout/roundtrip-fidelitygenie://layout/paste-survivalgenie://layout/host-import-proofgenie://layout/visual-render-proofgenie://layout/completion-audit
Use fm_search with a non-empty query when a client exposes tools but not resources. Exact key or uri filters narrow a query to the same content.