Add a custom function to the file
patchwork_add_custom_functionCreate a FileMaker custom function from a formula and parameter names. Adds it as a new, reversible version and errors out if FileMaker rejects the formula or changes the parameters.
Instructions
Create a custom function from a formula and its parameter names. The version is dropped with an error if FileMaker rejected the formula or stored other parameters. To change an existing function, read it with patchwork_show and send it back with patchwork_replace. Makes a new version; patchwork_undo reverses it.
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": {
"name": "<name>",
"calc": "<calc>"
},
"name": "patchwork_add_custom_function"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| calc | Yes | FileMaker formula of the function. It can use the names given in params. | |
| name | Yes | Name of the new function, as calculations will call it. | |
| params | No | Parameter names, in call order: ["amount", "rate"]. Default: no parameter. | |
| dry_run | No | Only write the patch file to .patchwork/ and return its path. Nothing is applied, no version is made. | |
| message | No | What this change does, kept in the version log. Default: a short description of the change. |