Table of Contents

Codeunit "MCP Config"

ID 8350
Namespace: System.MCP

Provides public API for managing MCP configurations and tools, including creation, activation, deletion, and permissions.

Properties

Name Value
Access Public
InherentEntitlements X
InherentPermissions X

Methods

GetConfigurationIdByName

Retrieves the SystemId (GUID) of a configuration by its name.

procedure GetConfigurationIdByName(Name: Text[100]): Guid

Parameters

Name Type Description
Name Text[100]

The name of the configuration.

Returns

Type Description
Guid

The SystemId (GUID) of the configuration if found; otherwise, an empty GUID.

CreateConfiguration

Creates a new MCP configuration with the specified name and description.

procedure CreateConfiguration(Name: Text[100], Description: Text[250]): Guid

Parameters

Name Type Description
Name Text[100]

The name of the configuration.

Description Text[250]

The description of the configuration.

Returns

Type Description
Guid

The SystemId (GUID) of the created configuration.

ActivateConfiguration

Activates the specified MCP configuration.

procedure ActivateConfiguration(ConfigId: Guid, Active: Boolean)

Parameters

Name Type Description
ConfigId Guid

The SystemId (GUID) of the configuration to activate.

Active Boolean

True to activate, false to deactivate.

AllowCreateUpdateDeleteTools

Allows create, update and delete tools for the specified MCP configuration. Disallowing this will make the tools read-only.

procedure AllowCreateUpdateDeleteTools(ConfigId: Guid, Allow: Boolean)

Parameters

Name Type Description
ConfigId Guid

The SystemId (GUID) of the configuration.

Allow Boolean

True to allow create, update and delete tools, false to disallow.

DeleteConfiguration

Deletes the specified MCP configuration.

procedure DeleteConfiguration(ConfigId: Guid)

Parameters

Name Type Description
ConfigId Guid

The SystemId (GUID) of the configuration to delete.

CopyConfiguration

Copies an existing configuration to a new configuration, including its tools and permissions.

procedure CopyConfiguration(SourceConfigId: Guid, NewName: Text[100], NewDescription: Text[250]): Guid

Parameters

Name Type Description
SourceConfigId Guid

The SystemId (GUID) of the configuration to copy.

NewName Text[100]

The name of the new configuration.

NewDescription Text[250]

The SystemId (GUID) of the configuration to copy.

Returns

Type Description
Guid

The SystemId (GUID) of the newly created configuration.

EnableDynamicToolMode

Enables dynamic tool mode for the specified configuration.

procedure EnableDynamicToolMode(ConfigId: Guid, Enable: Boolean)

Parameters

Name Type Description
ConfigId Guid

The SystemId (GUID) of the configuration.

Enable Boolean

True to enable, false to disable.

EnableDiscoverReadOnlyObjects

Enables discovery of accessible read-only objects for the specified configuration.

procedure EnableDiscoverReadOnlyObjects(ConfigId: Guid, Enable: Boolean)

Parameters

Name Type Description
ConfigId Guid

The SystemId (GUID) of the configuration.

Enable Boolean

True to enable, false to disable.

CreateAPITool

Creates a new API tool for the specified configuration and API page.

procedure CreateAPITool(ConfigId: Guid, APIPageId: Integer): Guid

Parameters

Name Type Description
ConfigId Guid

The SystemId (GUID) of the configuration.

APIPageId Integer

The ID of the API page.

Returns

Type Description
Guid

The SystemId (GUID) of the created tool.

CreateAPITool

Creates a new API tool for the specified configuration and API page.

procedure CreateAPITool(ConfigId: Guid, APIPageId: Integer, ValidateAPIPublisher: Boolean): Guid

Parameters

Name Type Description
ConfigId Guid

The SystemId (GUID) of the configuration.

APIPageId Integer

The ID of the API page.

ValidateAPIPublisher Boolean

True to validate the API publisher, false to skip validation.

Returns

Type Description
Guid

The SystemId (GUID) of the created tool.

GetAPIToolId

Retrieves the SystemId (GUID) of a tool by its configuration ID and API page

procedure GetAPIToolId(ConfigId: Guid, APIPageId: Integer): Guid

Parameters

Name Type Description
ConfigId Guid

The SystemId (GUID) of the configuration.

APIPageId Integer

The ID of the API page.

Returns

Type Description
Guid

The SystemId (GUID) of the tool if found; otherwise, an empty GUID.

DeleteTool

Deletes the specified tool from the configuration.

procedure DeleteTool(ToolSystemId: Guid)

Parameters

Name Type Description
ToolSystemId Guid

The SystemId (GUID) of the tool to delete.

AllowRead

Sets the read permission for the specified tool.

procedure AllowRead(ToolSystemId: Guid, Allow: Boolean)

Parameters

Name Type Description
ToolSystemId Guid

The SystemId (GUID) of the tool.

Allow Boolean

True to allow read, false to disallow.

AllowCreate

Sets the create permission for the specified tool.

procedure AllowCreate(ToolSystemId: Guid, Allow: Boolean)

Parameters

Name Type Description
ToolSystemId Guid

The SystemId (GUID) of the tool.

Allow Boolean

True to allow create, false to disallow.

AllowModify

Sets the modify permission for the specified tool.

procedure AllowModify(ToolSystemId: Guid, Allow: Boolean)

Parameters

Name Type Description
ToolSystemId Guid

The SystemId (GUID) of the tool.

Allow Boolean

True to allow modify, false to disallow.

AllowDelete

Sets the delete permission for the specified tool.

procedure AllowDelete(ToolSystemId: Guid, Allow: Boolean)

Parameters

Name Type Description
ToolSystemId Guid

The SystemId (GUID) of the tool.

Allow Boolean

True to allow delete, false to disallow.

AllowBoundActions

Sets the bound actions permission for the specified tool.

procedure AllowBoundActions(ToolSystemId: Guid, Allow: Boolean)

Parameters

Name Type Description
ToolSystemId Guid

The SystemId (GUID) of the tool.

Allow Boolean

True to allow bound actions, false to disallow.

See also