fm_odata_aggregateAggregate records server-side using OData $apply (requires FileMaker Server v22.0.1 / FileMaker 2025 or later). Groups records by one or more fields and computes sum, average, min, max, or count. Returns only the summary rows — no need to fetch all records and compute client-side. Call fm_odata_get_server_version first to verify your server supports this feature; on older servers the tool falls back to client-side computation. Example: sum of invoice amounts grouped by customer, or count of open cases per user.Input schema{
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "Table/entity set name"
},
"method": {
"type": "string",
"enum": [
"sum",
"average",
"min",
"max",
"countdistinct",
"count"
],
"description": "Aggregation function. Use 'count' to count all matching records (no field needed). Use 'countdistinct' to count unique values of a field."
},
"alias": {
"type": "string",
"description": "Name for the result column (e.g. 'TotalSales', 'AvgAge', 'Total')"
},
"field": {
"type": "string",
"description": "Field to aggregate. Required for sum/average/min/max/countdistinct. Omit when method is 'count'."
},
"groupBy": {
"type": "array",
"items": {
"type": "string"
},
"description": "Fields to group by (e.g. ['Region', 'Status']). Omit to aggregate across the whole table."
},
"filter": {
"type": "string",
"description": "OData $filter expression applied before aggregation (e.g. \"Status eq 'Active'\"). Equivalent to a WHERE clause."
},
"connection": {
"type": "string",
"description": "Optional session alias to use for this call. When omitted the currently active session is used. Use fm_odata_list_active_sessions to see available aliases."
}
},
"required": [
"table",
"method",
"alias"
]
} | — | | — |
fm_odata_build_filterBuild a parameterized OData $filter expression (requires FileMaker Server v21.1 / FileMaker 2024 or later). Write a filter template with @alias placeholders and supply values separately. In 'resolved' mode (default) the aliases are substituted client-side and the result can be used directly as the 'filter' argument of fm_odata_query_records. In 'raw' mode the OData parameter alias query string is returned instead, useful for constructing URLs manually. String values are automatically single-quoted; numbers/booleans are passed through as-is. Call fm_odata_get_server_version first to verify your server supports this feature. Example: template 'Title eq @title and Status eq @status', params { '@title': 'Wizard of Oz', '@status': 'Active' }.Input schema{
"type": "object",
"properties": {
"template": {
"type": "string",
"description": "OData $filter template using @alias placeholders for values. Example: \"Title eq @title and Age gt @minAge\""
},
"params": {
"type": "object",
"description": "Map of alias names (starting with @) to their values. String values are auto-quoted; numbers and booleans are used as-is. Example: { \"@title\": \"Wizard of Oz\", \"@minAge\": 18 }",
"additionalProperties": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
]
}
},
"mode": {
"type": "string",
"enum": [
"resolved",
"raw"
],
"description": "'resolved' (default): substitutes alias values into the template and returns a plain filter string. 'raw': returns the OData parameterized query string form with aliases kept separate."
}
},
"required": [
"template",
"params"
]
} | — | | — |
fm_odata_castBuild OData type-cast property path expressions (requires FileMaker Server v21.1 / FileMaker 2024 or later). Returns the cast expression(s) ready to use in $select or $filter of fm_odata_query_records. Casting tells the server to return a field value in a specific EDM primitive type, avoiding the need for client-side conversion. Call fm_odata_get_server_version first to verify your server supports this feature. Example: cast 'StartDate' to Int64 for numeric date math, or 'Amount' to String for text comparison.Input schema{
"type": "object",
"properties": {
"fields": {
"type": "array",
"description": "One or more fields to cast, each with a field name and target EDM type.",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "Field name to cast (e.g. 'StartDate', 'Amount')"
},
"type": {
"type": "string",
"enum": [
"String",
"Int32",
"Int64",
"Decimal",
"Double",
"Boolean",
"Date",
"TimeOfDay",
"DateTimeOffset"
],
"description": "Target EDM primitive type (e.g. 'Int64', 'String', 'Date')"
}
},
"required": [
"field",
"type"
]
},
"minItems": 1
},
"context": {
"type": "string",
"enum": [
"select",
"filter"
],
"description": "Where the cast expression will be used. 'select' joins multiple casts with commas for use in $select. 'filter' returns individual cast paths to embed in a $filter expression. Defaults to 'select'."
}
},
"required": [
"fields"
]
} | — | | — |
fm_odata_config_add_connectionAdd a new connection configuration (saved permanently)Input schema{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Connection name (e.g., 'production', 'staging', 'local')"
},
"server": {
"type": "string",
"description": "FileMaker Server URL (e.g., 'http://192.168.0.24')"
},
"database": {
"type": "string",
"description": "Database name"
},
"user": {
"type": "string",
"description": "Username"
},
"password": {
"type": "string",
"description": "Password"
},
"verifySsl": {
"type": "boolean",
"description": "Verify SSL certificate (default: true)"
}
},
"required": [
"name",
"server",
"database",
"user",
"password"
]
} | — | | — |
fm_odata_config_get_connectionGet details of a specific saved connection (password masked)Input schema{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Connection name"
}
},
"required": [
"name"
]
} | — | | — |
fm_odata_config_list_connectionsList all saved connection configurations (passwords masked)Input schema{
"type": "object",
"properties": {},
"required": []
} | — | | — |
fm_odata_config_remove_connectionRemove a saved connection configurationInput schema{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Connection name to remove"
}
},
"required": [
"name"
]
} | — | | — |
fm_odata_config_set_default_connectionSet the default connection to useInput schema{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Connection name to set as default"
}
},
"required": [
"name"
]
} | — | | — |
fm_odata_connectConnect to FileMaker Server with inline credentials (temporary connection, not saved)Input schema{
"type": "object",
"properties": {
"server": {
"type": "string",
"description": "FileMaker Server URL (e.g., 'http://192.168.0.24' or 'https://fms.example.com')"
},
"database": {
"type": "string",
"description": "Database name (e.g., 'Contacts')"
},
"user": {
"type": "string",
"description": "Username"
},
"password": {
"type": "string",
"description": "Password"
},
"verifySsl": {
"type": "boolean",
"description": "Verify SSL certificate (default: true)"
}
},
"required": [
"server",
"database",
"user",
"password"
]
} | — | | — |
fm_odata_connect_multiConnect to multiple FileMaker databases in a single call. Designed for FileMaker separation-of-concerns solutions (LOGIC + DATA files) or any setup that requires simultaneous sessions to multiple databases on the same server. All sessions share a default server/user/password unless overridden per entry. Each session is registered under an alias and can be targeted individually by OData tools via their optional 'connection' parameter. The entry marked primary (or the first successful one) becomes the active session.Input schema{
"type": "object",
"properties": {
"server": {
"type": "string",
"description": "Shared FileMaker Server URL (e.g., 'https://fms.example.com')"
},
"user": {
"type": "string",
"description": "Shared default username (can be overridden per database entry)"
},
"password": {
"type": "string",
"description": "Shared default password (can be overridden per database entry)"
},
"databases": {
"type": "array",
"description": "List of databases to connect to",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"database": {
"type": "string",
"description": "Database (file) name on the server"
},
"alias": {
"type": "string",
"description": "Human-readable session name used to target this connection later (e.g. 'logic', 'data'). Defaults to the database name."
},
"user": {
"type": "string",
"description": "Override username for this database"
},
"password": {
"type": "string",
"description": "Override password for this database"
},
"primary": {
"type": "boolean",
"description": "Mark this session as the active connection after connecting. If no entry is marked, the first successful connection becomes active."
}
},
"required": [
"database"
]
}
},
"verifySsl": {
"type": "boolean",
"description": "Verify SSL certificate for all connections (default: true)"
}
},
"required": [
"server",
"user",
"password",
"databases"
]
} | — | | — |
fm_odata_count_recordsCount records in a table, optionally with a filterInput schema{
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "Table/entity set name"
},
"filter": {
"type": "string",
"description": "OData $filter expression"
},
"connection": {
"type": "string",
"description": "Optional session alias to use for this call. When omitted the currently active session is used. Use fm_odata_list_active_sessions to see available aliases."
}
},
"required": [
"table"
]
} | — | | — |
fm_odata_create_recordCreate a new record in a tableInput schema{
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "Table/entity set name"
},
"data": {
"type": "object",
"description": "Field values for the new record (JSON object with field names as keys)"
},
"connection": {
"type": "string",
"description": "Optional session alias to use for this call. When omitted the currently active session is used. Use fm_odata_list_active_sessions to see available aliases."
}
},
"required": [
"table",
"data"
]
} | — | | — |
fm_odata_delete_recordDelete a recordInput schema{
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "Table/entity set name"
},
"recordId": {
"type": "string",
"description": "Record ID to delete"
},
"connection": {
"type": "string",
"description": "Optional session alias to use for this call. When omitted the currently active session is used. Use fm_odata_list_active_sessions to see available aliases."
}
},
"required": [
"table",
"recordId"
]
} | — | | — |
fm_odata_describe_sessionsFetch and merge the OData schema ($metadata) from every active session. Returns a flat list of all EntitySets (tables) across all connected databases, each annotated with the session alias that owns it. On FileMaker Server v26+ table and field comments / AI annotations are included. Flags any table names that appear in more than one session (collision). Use this to understand the full schema of a multi-file FileMaker solution and to know which 'connection' alias to pass when querying a specific table. Call fm_odata_get_server_version first to know whether enriched metadata (comments) will be available.Input schema{
"type": "object",
"properties": {},
"required": []
} | — | | — |
fm_odata_describe_tableGet full field metadata for a single table, including types, nullability, internal field IDs (FMFID), whether a field is computed or indexed, permissions (Read vs Read/Write), and comments/AI annotations. Requires FileMaker Server 2026 (v26+) for enriched details; on older servers only name, type, and nullable are returned. Call fm_odata_get_server_version first to know what detail level to expect.Input schema{
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "Table/entity set name to describe"
},
"connection": {
"type": "string",
"description": "Optional session alias to use for this call. When omitted the currently active session is used. Use fm_odata_list_active_sessions to see available aliases."
}
},
"required": [
"table"
]
} | — | | — |
fm_odata_get_current_connectionGet details of the current active connectionInput schema{
"type": "object",
"properties": {},
"required": []
} | — | | — |
fm_odata_get_metadataGet the OData metadata document (EDMX/XML) describing the database schema, tables, and fieldsInput schema{
"type": "object",
"properties": {
"connection": {
"type": "string",
"description": "Optional session alias to use for this call. When omitted the currently active session is used. Use fm_odata_list_active_sessions to see available aliases."
}
},
"required": []
} | — | | — |
fm_odata_get_recordGet a single record by its IDInput schema{
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "Table/entity set name"
},
"recordId": {
"type": "string",
"description": "Record ID"
},
"select": {
"type": "string",
"description": "Comma-separated list of fields to return"
},
"expand": {
"type": "string",
"description": "Related records to expand"
},
"connection": {
"type": "string",
"description": "Optional session alias to use for this call. When omitted the currently active session is used. Use fm_odata_list_active_sessions to see available aliases."
}
},
"required": [
"table",
"recordId"
]
} | — | | — |
fm_odata_get_recordsGet records from a table (simple query without filters)Input schema{
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "Table/entity set name"
},
"top": {
"type": "number",
"description": "Maximum number of records to return"
},
"skip": {
"type": "number",
"description": "Number of records to skip"
},
"connection": {
"type": "string",
"description": "Optional session alias to use for this call. When omitted the currently active session is used. Use fm_odata_list_active_sessions to see available aliases."
}
},
"required": [
"table"
]
} | — | | — |
fm_odata_get_server_versionDetect the FileMaker Server version and feature capabilities for the active (or named) session. Reads the OData $metadata document and returns the version number plus a compatibility report showing which advanced features are supported: aggregate (v22.0.1+), cast (v21.1+), build_filter (v21.1+), and metadata_comments (v26+). The result is cached for the session lifetime — subsequent calls are instant. ALWAYS call this first after connecting to understand what the server can do before using version-gated tools such as fm_odata_aggregate, fm_odata_cast, fm_odata_build_filter, or fm_odata_list_tables with includeDetails.Input schema{
"type": "object",
"properties": {
"connection": {
"type": "string",
"description": "Optional session alias to check. When omitted the currently active session is used."
}
},
"required": []
} | — | | — |
fm_odata_get_service_documentGet the OData service document listing all available tables/entity sets in the databaseInput schema{
"type": "object",
"properties": {
"connection": {
"type": "string",
"description": "Optional session alias to use for this call. When omitted the currently active session is used. Use fm_odata_list_active_sessions to see available aliases."
}
},
"required": []
} | — | | — |
fm_odata_list_active_sessionsList all active in-memory sessions (connected via fm_odata_connect or fm_odata_connect_multi). Shows alias, server, database, user, and which session is currently active. Useful for multi-file FileMaker solutions to understand which connections are live and what alias to pass in the 'connection' parameter of OData tools.Input schema{
"type": "object",
"properties": {},
"required": []
} | — | | — |
fm_odata_list_connectionsList all connections: active in-memory sessions (from fm_odata_connect / fm_odata_connect_multi) and saved connections (from fm_odata_config_add_connection). Passwords are masked. For saved-only connections use fm_odata_config_list_connections; for active-only sessions use fm_odata_list_active_sessions.Input schema{
"type": "object",
"properties": {},
"required": []
} | — | | — |
fm_odata_list_scriptsList available FileMaker scripts from the OData metadata (FileMaker Server 2026 / v26+ only). Returns script names, internal FMSIDs, parameter types, and return types when present in metadata. On older servers this returns an empty list because scripts are not exposed in $metadata.Input schema{
"type": "object",
"properties": {
"connection": {
"type": "string",
"description": "Optional session alias to use for this call. When omitted the currently active session is used. Use fm_odata_list_active_sessions to see available aliases."
}
},
"required": []
} | — | | — |
fm_odata_list_tablesList all tables/entity sets available in the database (parsed from metadata). On FileMaker Server 2026 (v26+) set includeDetails to true to also receive table comments when they are present in the metadata. Call fm_odata_get_server_version first to know whether includeDetails will have any effect.Input schema{
"type": "object",
"properties": {
"includeDetails": {
"type": "boolean",
"description": "When true and the server is v26+, returns table names with their comments. Defaults to false for backwards compatibility."
},
"connection": {
"type": "string",
"description": "Optional session alias to use for this call. When omitted the currently active session is used. Use fm_odata_list_active_sessions to see available aliases."
}
},
"required": []
} | — | | — |
fm_odata_query_recordsQuery records from a table with OData filter expressions and query optionsInput schema{
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "Table/entity set name (e.g., 'contact', 'address')"
},
"filter": {
"type": "string",
"description": "OData $filter expression (e.g., \"FirstName eq 'John'\" or \"Age gt 25\")"
},
"select": {
"type": "string",
"description": "Comma-separated list of fields to return (e.g., 'FirstName,LastName,Email')"
},
"orderby": {
"type": "string",
"description": "OData $orderby expression (e.g., 'LastName asc' or 'Age desc')"
},
"top": {
"type": "number",
"description": "Maximum number of records to return (pagination)"
},
"skip": {
"type": "number",
"description": "Number of records to skip (pagination)"
},
"expand": {
"type": "string",
"description": "Related records to expand (navigation properties)"
},
"count": {
"type": "boolean",
"description": "Include total count of matching records"
},
"connection": {
"type": "string",
"description": "Optional session alias to use for this call. When omitted the currently active session is used. Use fm_odata_list_active_sessions to see available aliases."
}
},
"required": [
"table"
]
} | — | | — |
fm_odata_run_scriptRun a FileMaker script server-side via OData. Provide either scriptName (by name) or scriptId (by internal FMSID), but not both. scriptId is preferred on FileMaker Server 2026 (v26+) because it remains stable if the script is renamed. Optionally pass a scriptParam value (string, number, or JSON object). Only scripts with web-compatible script steps can run; scripts that modify data must include Commit Records/Requests.Input schema{
"type": "object",
"properties": {
"scriptName": {
"type": "string",
"description": "Name of the FileMaker script to run. Mutually exclusive with scriptId."
},
"scriptId": {
"type": "number",
"description": "Internal FileMaker script ID (FMSID). Available on v26+. Mutually exclusive with scriptName."
},
"scriptParam": {
"type": [
"string",
"number",
"object"
],
"description": "Optional parameter to pass to the script (string, number, or JSON object)."
},
"connection": {
"type": "string",
"description": "Optional session alias to use for this call. When omitted the currently active session is used. Use fm_odata_list_active_sessions to see available aliases."
}
},
"required": []
} | — | | — |
fm_odata_set_connectionSwitch the active connection by name. Accepts both saved connection names (from fm_odata_config_add_connection) and runtime session aliases (from fm_odata_connect or fm_odata_connect_multi).Input schema{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Connection name or session alias"
}
},
"required": [
"name"
]
} | — | | — |
fm_odata_update_recordUpdate an existing recordInput schema{
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "Table/entity set name"
},
"recordId": {
"type": "string",
"description": "Record ID to update"
},
"data": {
"type": "object",
"description": "Field values to update (JSON object with field names as keys)"
},
"connection": {
"type": "string",
"description": "Optional session alias to use for this call. When omitted the currently active session is used. Use fm_odata_list_active_sessions to see available aliases."
}
},
"required": [
"table",
"recordId",
"data"
]
} | — | | — |