FoundationModels.CloseSession
-----------------------------

Closes the current model session.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [FoundationModels](component_FoundationModels.md) | [15.5](newinversion155.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "FoundationModels.CloseSession"; FoundationModel ) 

**MBS**( **"FoundationModels.CloseSession";** /\* Closes the current model session. \*/  
**$FoundationModel**) /\* The identifier for the model.e.g. $model \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| FoundationModel | The identifier for the model. | $model |

### Result

Returns OK or error.

### Description

Closes the current model session.  
### Examples

Close session:

 Set Variable \[ $r ; Value: MBS ("FoundationModels.CloseSession") \]  
### See also

- [FoundationModels.BeginSession](FoundationModelsBeginSession.md)

### Blog Entries

- [New in MBS FileMaker Plugin 15.5](https://www.mbsplugins.de/archive/2025-11-25/New_in_MBS_FileMaker_Plugin_15/monkeybreadsoftware_blog_filemaker)

Created 26th September 2025 , last changed 27th September 2025

  
[FoundationModels.BeginSession](FoundationModelsBeginSession.md) - [FoundationModels.ContextSize](FoundationModelsContextSize.md)

[HTML Version](FoundationModelsCloseSession.shtml)