fm_save_context
Save discovered knowledge about FileMaker field values, syntax rules, query patterns, and value maps. Automatically loads in future sessions to improve query accuracy.
Instructions
Save an operational learning about a FileMaker field or table.
Call this when you discover useful information during queries:
Field value mappings (e.g., Commercial field uses "1" not "Yes")
OData syntax rules (e.g., "ne" operator not supported)
Query patterns (e.g., how to join two tables)
Relationships (e.g., FK between Invoices and Customers)
Value normalization maps (e.g., "Jake" and "Jacob Owens" are the same person)
The learning is saved to FM and loaded automatically at next startup, so future sessions benefit immediately.
Args: table_name: Table this applies to (e.g., "Invoices"). context: What you learned. For most types, free text (e.g., "Boolean: 1=yes, empty/0=no"). For "value_map" type, MUST be a JSON object mapping variant values to their canonical form, e.g. '{"Jake": "Jacob Owens", "Bob": "Robert Smith"}'. field_name: Specific field name, or empty for table-level context. context_type: Category — "field_values", "syntax_rule", "query_pattern", "relationship", or "value_map". Use "value_map" when the user identifies that two field values represent the same entity (e.g., nicknames, abbreviations, data entry variants). Value maps are applied automatically during fm_analyze groupby. source: How this was discovered — "auto", "auto:filter_discovery", "manual".
Returns: Confirmation message or error description.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | No | auto | |
| context | Yes | ||
| field_name | No | ||
| table_name | Yes | ||
| context_type | No | field_values |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |