fm_run_script_with_globals
Set global fields and execute a FileMaker script in a single Data API session, ensuring context-dependent scripts run correctly.
Instructions
Sets global fields and runs a script in the SAME Data API session. This makes scripts that depend on global fields for context work (e.g. SESSIONS::UUID_g). Flow: Login → Set Globals → Run Script → Logout.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"globals": "<globals>",
"layout": "<layout>",
"scriptName": "<scriptName>"
},
"name": "fm_run_script_with_globals"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| globals | Yes | Global fields as key/value. Keys: 'Table::FieldName_g' | |
| layout | Yes | Layout name for Data API script execution (must be based on the correct table) | |
| scriptName | Yes | Exact script name | |
| scriptParam | No | Script parameter (JSON string recommended) |