diff --git a/src/Cli.Tests/ConfigGeneratorTests.cs b/src/Cli.Tests/ConfigGeneratorTests.cs index 58e006b75d..9f56d5964f 100644 --- a/src/Cli.Tests/ConfigGeneratorTests.cs +++ b/src/Cli.Tests/ConfigGeneratorTests.cs @@ -165,8 +165,16 @@ public void TestSpecialCharactersInConnectionString() }, ""mcp"": { ""enabled"": true, - ""path"": ""/mcp"" - }, + ""path"": ""/mcp"", + ""dml-tools"":{ + ""describe-entities"": true, + ""create-record"": true, + ""read-records"": true, + ""update-record"": true, + ""delete-record"": true, + ""execute-entity"":true + } + }, ""host"": { ""cors"": { ""origins"": [], diff --git a/src/Cli.Tests/Snapshots/EndToEndTests.TestAddingStoredProcedureWithRestMethodsAndGraphQLOperations.verified.txt b/src/Cli.Tests/Snapshots/EndToEndTests.TestAddingStoredProcedureWithRestMethodsAndGraphQLOperations.verified.txt index 4411b47348..12316672ab 100644 --- a/src/Cli.Tests/Snapshots/EndToEndTests.TestAddingStoredProcedureWithRestMethodsAndGraphQLOperations.verified.txt +++ b/src/Cli.Tests/Snapshots/EndToEndTests.TestAddingStoredProcedureWithRestMethodsAndGraphQLOperations.verified.txt @@ -18,7 +18,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: false, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithSourceAsStoredProcedure.verified.txt b/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithSourceAsStoredProcedure.verified.txt index 636d44805e..218d4b46e8 100644 --- a/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithSourceAsStoredProcedure.verified.txt +++ b/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithSourceAsStoredProcedure.verified.txt @@ -18,7 +18,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: false, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithSourceWithDefaultType.verified.txt b/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithSourceWithDefaultType.verified.txt index a77ecc134b..9ea6e5e143 100644 --- a/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithSourceWithDefaultType.verified.txt +++ b/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithSourceWithDefaultType.verified.txt @@ -18,7 +18,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: false, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithoutIEnumerables.verified.txt b/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithoutIEnumerables.verified.txt index a19694b688..2685db11db 100644 --- a/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithoutIEnumerables.verified.txt +++ b/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithoutIEnumerables.verified.txt @@ -18,7 +18,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: false, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/EndToEndTests.TestInitForCosmosDBNoSql.verified.txt b/src/Cli.Tests/Snapshots/EndToEndTests.TestInitForCosmosDBNoSql.verified.txt index 081c5f8e55..d13807441c 100644 --- a/src/Cli.Tests/Snapshots/EndToEndTests.TestInitForCosmosDBNoSql.verified.txt +++ b/src/Cli.Tests/Snapshots/EndToEndTests.TestInitForCosmosDBNoSql.verified.txt @@ -19,7 +19,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: false, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/EndToEndTests.TestUpdatingStoredProcedureWithRestMethods.verified.txt b/src/Cli.Tests/Snapshots/EndToEndTests.TestUpdatingStoredProcedureWithRestMethods.verified.txt index fef1d83bf2..c1f5280277 100644 --- a/src/Cli.Tests/Snapshots/EndToEndTests.TestUpdatingStoredProcedureWithRestMethods.verified.txt +++ b/src/Cli.Tests/Snapshots/EndToEndTests.TestUpdatingStoredProcedureWithRestMethods.verified.txt @@ -18,7 +18,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: false, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/EndToEndTests.TestUpdatingStoredProcedureWithRestMethodsAndGraphQLOperations.verified.txt b/src/Cli.Tests/Snapshots/EndToEndTests.TestUpdatingStoredProcedureWithRestMethodsAndGraphQLOperations.verified.txt index 09007e27f8..92d6369214 100644 --- a/src/Cli.Tests/Snapshots/EndToEndTests.TestUpdatingStoredProcedureWithRestMethodsAndGraphQLOperations.verified.txt +++ b/src/Cli.Tests/Snapshots/EndToEndTests.TestUpdatingStoredProcedureWithRestMethodsAndGraphQLOperations.verified.txt @@ -18,7 +18,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: false, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.CosmosDbNoSqlDatabase.verified.txt b/src/Cli.Tests/Snapshots/InitTests.CosmosDbNoSqlDatabase.verified.txt index b3f63dd336..50e3aa35b8 100644 --- a/src/Cli.Tests/Snapshots/InitTests.CosmosDbNoSqlDatabase.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.CosmosDbNoSqlDatabase.verified.txt @@ -19,7 +19,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.CosmosDbPostgreSqlDatabase.verified.txt b/src/Cli.Tests/Snapshots/InitTests.CosmosDbPostgreSqlDatabase.verified.txt index 42e0ff5e2f..496bf5f97c 100644 --- a/src/Cli.Tests/Snapshots/InitTests.CosmosDbPostgreSqlDatabase.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.CosmosDbPostgreSqlDatabase.verified.txt @@ -15,7 +15,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_171ea8114ff71814.verified.txt b/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_171ea8114ff71814.verified.txt index 0af93023dc..db26433ea0 100644 --- a/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_171ea8114ff71814.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_171ea8114ff71814.verified.txt @@ -18,7 +18,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_2df7a1794712f154.verified.txt b/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_2df7a1794712f154.verified.txt index 9e77b24d74..1471284e3a 100644 --- a/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_2df7a1794712f154.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_2df7a1794712f154.verified.txt @@ -18,7 +18,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_59fe1a10aa78899d.verified.txt b/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_59fe1a10aa78899d.verified.txt index 32f72a7a54..6c6b6fa055 100644 --- a/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_59fe1a10aa78899d.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_59fe1a10aa78899d.verified.txt @@ -18,7 +18,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_b95b637ea87f16a7.verified.txt b/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_b95b637ea87f16a7.verified.txt index 24416a0d02..11f92aa0bb 100644 --- a/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_b95b637ea87f16a7.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_b95b637ea87f16a7.verified.txt @@ -18,7 +18,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_daacbd948b7ef72f.verified.txt b/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_daacbd948b7ef72f.verified.txt index 6c674a4772..5d24ae9d2f 100644 --- a/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_daacbd948b7ef72f.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_daacbd948b7ef72f.verified.txt @@ -18,7 +18,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.GraphQLPathWithoutStartingSlashWillHaveItAdded.verified.txt b/src/Cli.Tests/Snapshots/InitTests.GraphQLPathWithoutStartingSlashWillHaveItAdded.verified.txt index b6aac13236..cd721f65d2 100644 --- a/src/Cli.Tests/Snapshots/InitTests.GraphQLPathWithoutStartingSlashWillHaveItAdded.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.GraphQLPathWithoutStartingSlashWillHaveItAdded.verified.txt @@ -18,7 +18,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.MsSQLDatabase.verified.txt b/src/Cli.Tests/Snapshots/InitTests.MsSQLDatabase.verified.txt index 8841c0f326..d304df7085 100644 --- a/src/Cli.Tests/Snapshots/InitTests.MsSQLDatabase.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.MsSQLDatabase.verified.txt @@ -18,7 +18,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.RestPathWithoutStartingSlashWillHaveItAdded.verified.txt b/src/Cli.Tests/Snapshots/InitTests.RestPathWithoutStartingSlashWillHaveItAdded.verified.txt index 68e4d231fd..ff7b282c32 100644 --- a/src/Cli.Tests/Snapshots/InitTests.RestPathWithoutStartingSlashWillHaveItAdded.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.RestPathWithoutStartingSlashWillHaveItAdded.verified.txt @@ -18,7 +18,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.TestInitializingConfigWithoutConnectionString.verified.txt b/src/Cli.Tests/Snapshots/InitTests.TestInitializingConfigWithoutConnectionString.verified.txt index 3c281ad6aa..6714b2a50d 100644 --- a/src/Cli.Tests/Snapshots/InitTests.TestInitializingConfigWithoutConnectionString.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.TestInitializingConfigWithoutConnectionString.verified.txt @@ -18,7 +18,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.TestSpecialCharactersInConnectionString.verified.txt b/src/Cli.Tests/Snapshots/InitTests.TestSpecialCharactersInConnectionString.verified.txt index 32f72a7a54..6c6b6fa055 100644 --- a/src/Cli.Tests/Snapshots/InitTests.TestSpecialCharactersInConnectionString.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.TestSpecialCharactersInConnectionString.verified.txt @@ -18,7 +18,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0546bef37027a950.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0546bef37027a950.verified.txt index 888466ab4a..397a36867b 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0546bef37027a950.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0546bef37027a950.verified.txt @@ -18,7 +18,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0ac567dd32a2e8f5.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0ac567dd32a2e8f5.verified.txt index 8841c0f326..d304df7085 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0ac567dd32a2e8f5.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0ac567dd32a2e8f5.verified.txt @@ -18,7 +18,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0c06949221514e77.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0c06949221514e77.verified.txt index d56e05c483..ff833e5198 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0c06949221514e77.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0c06949221514e77.verified.txt @@ -23,7 +23,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_18667ab7db033e9d.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_18667ab7db033e9d.verified.txt index bc31484242..faf59ef911 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_18667ab7db033e9d.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_18667ab7db033e9d.verified.txt @@ -15,7 +15,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_2f42f44c328eb020.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_2f42f44c328eb020.verified.txt index 888466ab4a..397a36867b 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_2f42f44c328eb020.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_2f42f44c328eb020.verified.txt @@ -18,7 +18,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_3243d3f3441fdcc1.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_3243d3f3441fdcc1.verified.txt index bc31484242..faf59ef911 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_3243d3f3441fdcc1.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_3243d3f3441fdcc1.verified.txt @@ -15,7 +15,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_53350b8b47df2112.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_53350b8b47df2112.verified.txt index 48f5e7a7c9..bc08f75e48 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_53350b8b47df2112.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_53350b8b47df2112.verified.txt @@ -15,7 +15,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_6584e0ec46b8a11d.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_6584e0ec46b8a11d.verified.txt index 8fa9677f1d..85e52e4e7f 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_6584e0ec46b8a11d.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_6584e0ec46b8a11d.verified.txt @@ -19,7 +19,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_81cc88db3d4eecfb.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_81cc88db3d4eecfb.verified.txt index e3108801f5..1bcf97c8d7 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_81cc88db3d4eecfb.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_81cc88db3d4eecfb.verified.txt @@ -23,7 +23,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_8ea187616dbb5577.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_8ea187616dbb5577.verified.txt index 59f6636fb2..9d14eb779f 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_8ea187616dbb5577.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_8ea187616dbb5577.verified.txt @@ -15,7 +15,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_905845c29560a3ef.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_905845c29560a3ef.verified.txt index 888466ab4a..397a36867b 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_905845c29560a3ef.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_905845c29560a3ef.verified.txt @@ -18,7 +18,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_b2fd24fab5b80917.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_b2fd24fab5b80917.verified.txt index 8fa9677f1d..85e52e4e7f 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_b2fd24fab5b80917.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_b2fd24fab5b80917.verified.txt @@ -19,7 +19,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_bd7cd088755287c9.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_bd7cd088755287c9.verified.txt index 8fa9677f1d..85e52e4e7f 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_bd7cd088755287c9.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_bd7cd088755287c9.verified.txt @@ -19,7 +19,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d2eccba2f836b380.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d2eccba2f836b380.verified.txt index 48f5e7a7c9..bc08f75e48 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d2eccba2f836b380.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d2eccba2f836b380.verified.txt @@ -15,7 +15,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d463eed7fe5e4bbe.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d463eed7fe5e4bbe.verified.txt index 59f6636fb2..9d14eb779f 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d463eed7fe5e4bbe.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d463eed7fe5e4bbe.verified.txt @@ -15,7 +15,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d5520dd5c33f7b8d.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d5520dd5c33f7b8d.verified.txt index 48f5e7a7c9..bc08f75e48 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d5520dd5c33f7b8d.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d5520dd5c33f7b8d.verified.txt @@ -15,7 +15,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_eab4a6010e602b59.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_eab4a6010e602b59.verified.txt index bc31484242..faf59ef911 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_eab4a6010e602b59.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_eab4a6010e602b59.verified.txt @@ -15,7 +15,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_ecaa688829b4030e.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_ecaa688829b4030e.verified.txt index 59f6636fb2..9d14eb779f 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_ecaa688829b4030e.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_ecaa688829b4030e.verified.txt @@ -15,7 +15,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: true, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Config/Converters/DmlToolsConfigConverter.cs b/src/Config/Converters/DmlToolsConfigConverter.cs index 9acef0f9b2..098bc64bc3 100644 --- a/src/Config/Converters/DmlToolsConfigConverter.cs +++ b/src/Config/Converters/DmlToolsConfigConverter.cs @@ -37,7 +37,7 @@ internal class DmlToolsConfigConverter : JsonConverter // Handle object format if (reader.TokenType is JsonTokenType.StartObject) { - // When using object format, unspecified tools default to true + // Start with null values - only set when explicitly provided in JSON bool? describeEntities = null; bool? createRecord = null; bool? readRecords = null; @@ -102,8 +102,7 @@ internal class DmlToolsConfigConverter : JsonConverter } } - // Create the config with specified values - // Unspecified values (null) will default to true in the DmlToolsConfig constructor + // Pass null for unspecified values - the constructor will handle defaults return new DmlToolsConfig( allToolsEnabled: null, describeEntities: describeEntities, diff --git a/src/Config/ObjectModel/DmlToolsConfig.cs b/src/Config/ObjectModel/DmlToolsConfig.cs index c14f8e49ed..a08fd8d176 100644 --- a/src/Config/ObjectModel/DmlToolsConfig.cs +++ b/src/Config/ObjectModel/DmlToolsConfig.cs @@ -71,41 +71,24 @@ public DmlToolsConfig( AllToolsEnabled = DEFAULT_ENABLED; } - if (describeEntities is not null) - { - DescribeEntities = describeEntities; - UserProvidedDescribeEntities = true; - } + // Set values with defaults and track user-provided status + DescribeEntities = describeEntities ?? DEFAULT_ENABLED; + UserProvidedDescribeEntities = describeEntities is not null; - if (createRecord is not null) - { - CreateRecord = createRecord; - UserProvidedCreateRecord = true; - } + CreateRecord = createRecord ?? DEFAULT_ENABLED; + UserProvidedCreateRecord = createRecord is not null; - if (readRecords is not null) - { - ReadRecords = readRecords; - UserProvidedReadRecords = true; - } + ReadRecords = readRecords ?? DEFAULT_ENABLED; + UserProvidedReadRecords = readRecords is not null; - if (updateRecord is not null) - { - UpdateRecord = updateRecord; - UserProvidedUpdateRecord = true; - } + UpdateRecord = updateRecord ?? DEFAULT_ENABLED; + UserProvidedUpdateRecord = updateRecord is not null; - if (deleteRecord is not null) - { - DeleteRecord = deleteRecord; - UserProvidedDeleteRecord = true; - } + DeleteRecord = deleteRecord ?? DEFAULT_ENABLED; + UserProvidedDeleteRecord = deleteRecord is not null; - if (executeEntity is not null) - { - ExecuteEntity = executeEntity; - UserProvidedExecuteEntity = true; - } + ExecuteEntity = executeEntity ?? DEFAULT_ENABLED; + UserProvidedExecuteEntity = executeEntity is not null; } /// @@ -113,16 +96,15 @@ public DmlToolsConfig( /// public static DmlToolsConfig FromBoolean(bool enabled) { - return new DmlToolsConfig - { - AllToolsEnabled = enabled, - DescribeEntities = null, - CreateRecord = null, - ReadRecords = null, - UpdateRecord = null, - DeleteRecord = null, - ExecuteEntity = null - }; + return new DmlToolsConfig( + allToolsEnabled: enabled, + describeEntities: enabled, + createRecord: enabled, + readRecords: enabled, + updateRecord: enabled, + deleteRecord: enabled, + executeEntity: enabled + ); } /// diff --git a/src/Config/ObjectModel/McpRuntimeOptions.cs b/src/Config/ObjectModel/McpRuntimeOptions.cs index 73d695ee4a..3934c091bb 100644 --- a/src/Config/ObjectModel/McpRuntimeOptions.cs +++ b/src/Config/ObjectModel/McpRuntimeOptions.cs @@ -48,7 +48,15 @@ public McpRuntimeOptions( this.Path = DEFAULT_PATH; } - this.DmlTools = DmlTools; + // if DmlTools is null, set All tools enabled by default + if (DmlTools is null) + { + this.DmlTools = DmlToolsConfig.FromBoolean(DmlToolsConfig.DEFAULT_ENABLED); + } + else + { + this.DmlTools = DmlTools; + } } /// diff --git a/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForCosmos.verified.txt b/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForCosmos.verified.txt index 420977ed26..c135dffdb6 100644 --- a/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForCosmos.verified.txt +++ b/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForCosmos.verified.txt @@ -19,7 +19,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: false, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForMsSql.verified.txt b/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForMsSql.verified.txt index b622552ef5..5b2a607817 100644 --- a/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForMsSql.verified.txt +++ b/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForMsSql.verified.txt @@ -23,7 +23,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: false, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForMySql.verified.txt b/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForMySql.verified.txt index 6c81c138ce..0f30634609 100644 --- a/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForMySql.verified.txt +++ b/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForMySql.verified.txt @@ -15,7 +15,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: false, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: { diff --git a/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForPostgreSql.verified.txt b/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForPostgreSql.verified.txt index 5e8631d46f..6a4f569a2a 100644 --- a/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForPostgreSql.verified.txt +++ b/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForPostgreSql.verified.txt @@ -15,7 +15,23 @@ }, Mcp: { Enabled: true, - Path: /mcp + Path: /mcp, + DmlTools: { + AllToolsEnabled: true, + DescribeEntities: true, + CreateRecord: true, + ReadRecords: true, + UpdateRecord: true, + DeleteRecord: true, + ExecuteEntity: true, + UserProvidedAllToolsEnabled: false, + UserProvidedDescribeEntities: true, + UserProvidedCreateRecord: true, + UserProvidedReadRecords: true, + UserProvidedUpdateRecord: true, + UserProvidedDeleteRecord: true, + UserProvidedExecuteEntity: true + } }, Host: { Cors: {