@@ -337,6 +337,32 @@ pub struct EssentialsDatabaseIdParam {
337337 pub database_id : i64 ,
338338}
339339
340+ // Cloud - VPC Peering parameter structs
341+
342+ #[ derive( Debug , Deserialize , schemars:: JsonSchema ) ]
343+ pub struct VpcPeeringIdParam {
344+ /// The subscription ID
345+ pub subscription_id : i64 ,
346+ /// The VPC peering ID
347+ pub peering_id : i64 ,
348+ }
349+
350+ // Cloud - Cloud Account parameter structs
351+
352+ #[ derive( Debug , Deserialize , schemars:: JsonSchema ) ]
353+ pub struct CloudAccountIdParam {
354+ /// The cloud account ID
355+ pub account_id : i64 ,
356+ }
357+
358+ // Enterprise - CRDB Task parameter structs
359+
360+ #[ derive( Debug , Deserialize , schemars:: JsonSchema ) ]
361+ pub struct CrdbTaskIdParam {
362+ /// The CRDB task ID
363+ pub task_id : String ,
364+ }
365+
340366impl RedisCtlMcp {
341367 /// Create a new MCP server instance
342368 pub fn new ( profile : Option < & str > , read_only : bool ) -> anyhow:: Result < Self > {
@@ -1809,6 +1835,143 @@ impl RedisCtlMcp {
18091835 . delete_essentials_database ( params. subscription_id , params. database_id )
18101836 . await
18111837 }
1838+
1839+ // =========================================================================
1840+ // Cloud Tools - VPC Peering Operations
1841+ // =========================================================================
1842+
1843+ #[ tool( description = "Get VPC peerings for a subscription" ) ]
1844+ async fn cloud_vpc_peerings_get (
1845+ & self ,
1846+ Parameters ( params) : Parameters < SubscriptionIdParam > ,
1847+ ) -> Result < CallToolResult , RmcpError > {
1848+ info ! (
1849+ subscription_id = params. subscription_id,
1850+ "Tool called: cloud_vpc_peerings_get"
1851+ ) ;
1852+ let tools = self . get_cloud_tools ( ) . await ?;
1853+ tools. get_vpc_peerings ( params. subscription_id ) . await
1854+ }
1855+
1856+ #[ tool( description = "Delete a VPC peering. This is a destructive operation." ) ]
1857+ async fn cloud_vpc_peering_delete (
1858+ & self ,
1859+ Parameters ( params) : Parameters < VpcPeeringIdParam > ,
1860+ ) -> Result < CallToolResult , RmcpError > {
1861+ info ! (
1862+ subscription_id = params. subscription_id,
1863+ peering_id = params. peering_id,
1864+ "Tool called: cloud_vpc_peering_delete"
1865+ ) ;
1866+
1867+ if self . config . read_only {
1868+ return Err ( RmcpError :: invalid_request (
1869+ "Server is in read-only mode. Use --allow-writes to enable write operations." ,
1870+ None ,
1871+ ) ) ;
1872+ }
1873+
1874+ let tools = self . get_cloud_tools ( ) . await ?;
1875+ tools
1876+ . delete_vpc_peering ( params. subscription_id , params. peering_id )
1877+ . await
1878+ }
1879+
1880+ // =========================================================================
1881+ // Cloud Tools - Cloud Account Operations
1882+ // =========================================================================
1883+
1884+ #[ tool(
1885+ description = "List all cloud provider accounts (AWS, GCP, Azure) configured in your Redis Cloud account"
1886+ ) ]
1887+ async fn cloud_accounts_list ( & self ) -> Result < CallToolResult , RmcpError > {
1888+ info ! ( "Tool called: cloud_accounts_list" ) ;
1889+ let tools = self . get_cloud_tools ( ) . await ?;
1890+ tools. list_cloud_accounts ( ) . await
1891+ }
1892+
1893+ #[ tool( description = "Get detailed information about a specific cloud provider account" ) ]
1894+ async fn cloud_account_get_by_id (
1895+ & self ,
1896+ Parameters ( params) : Parameters < CloudAccountIdParam > ,
1897+ ) -> Result < CallToolResult , RmcpError > {
1898+ info ! (
1899+ account_id = params. account_id,
1900+ "Tool called: cloud_account_get_by_id"
1901+ ) ;
1902+ let tools = self . get_cloud_tools ( ) . await ?;
1903+ tools. get_cloud_account ( params. account_id ) . await
1904+ }
1905+
1906+ #[ tool( description = "Delete a cloud provider account. This is a destructive operation." ) ]
1907+ async fn cloud_account_delete (
1908+ & self ,
1909+ Parameters ( params) : Parameters < CloudAccountIdParam > ,
1910+ ) -> Result < CallToolResult , RmcpError > {
1911+ info ! (
1912+ account_id = params. account_id,
1913+ "Tool called: cloud_account_delete"
1914+ ) ;
1915+
1916+ if self . config . read_only {
1917+ return Err ( RmcpError :: invalid_request (
1918+ "Server is in read-only mode. Use --allow-writes to enable write operations." ,
1919+ None ,
1920+ ) ) ;
1921+ }
1922+
1923+ let tools = self . get_cloud_tools ( ) . await ?;
1924+ tools. delete_cloud_account ( params. account_id ) . await
1925+ }
1926+
1927+ // =========================================================================
1928+ // Enterprise Tools - CRDB Task Operations
1929+ // =========================================================================
1930+
1931+ #[ tool( description = "List all Active-Active (CRDB) tasks in the Redis Enterprise cluster" ) ]
1932+ async fn enterprise_crdb_tasks_list ( & self ) -> Result < CallToolResult , RmcpError > {
1933+ info ! ( "Tool called: enterprise_crdb_tasks_list" ) ;
1934+ let tools = self . get_enterprise_tools ( ) . await ?;
1935+ tools. list_crdb_tasks ( ) . await
1936+ }
1937+
1938+ #[ tool( description = "Get detailed information about a specific CRDB task" ) ]
1939+ async fn enterprise_crdb_task_get (
1940+ & self ,
1941+ Parameters ( params) : Parameters < CrdbTaskIdParam > ,
1942+ ) -> Result < CallToolResult , RmcpError > {
1943+ info ! ( task_id = %params. task_id, "Tool called: enterprise_crdb_task_get" ) ;
1944+ let tools = self . get_enterprise_tools ( ) . await ?;
1945+ tools. get_crdb_task ( & params. task_id ) . await
1946+ }
1947+
1948+ #[ tool( description = "List CRDB tasks for a specific Active-Active database" ) ]
1949+ async fn enterprise_crdb_tasks_by_crdb (
1950+ & self ,
1951+ Parameters ( params) : Parameters < CrdbGuidParam > ,
1952+ ) -> Result < CallToolResult , RmcpError > {
1953+ info ! ( crdb_guid = %params. crdb_guid, "Tool called: enterprise_crdb_tasks_by_crdb" ) ;
1954+ let tools = self . get_enterprise_tools ( ) . await ?;
1955+ tools. list_crdb_tasks_by_crdb ( & params. crdb_guid ) . await
1956+ }
1957+
1958+ #[ tool( description = "Cancel a CRDB task" ) ]
1959+ async fn enterprise_crdb_task_cancel (
1960+ & self ,
1961+ Parameters ( params) : Parameters < CrdbTaskIdParam > ,
1962+ ) -> Result < CallToolResult , RmcpError > {
1963+ info ! ( task_id = %params. task_id, "Tool called: enterprise_crdb_task_cancel" ) ;
1964+
1965+ if self . config . read_only {
1966+ return Err ( RmcpError :: invalid_request (
1967+ "Server is in read-only mode. Use --allow-writes to enable write operations." ,
1968+ None ,
1969+ ) ) ;
1970+ }
1971+
1972+ let tools = self . get_enterprise_tools ( ) . await ?;
1973+ tools. cancel_crdb_task ( & params. task_id ) . await
1974+ }
18121975}
18131976
18141977#[ tool_handler]
0 commit comments