1- use crate :: tools:: { deployment:: * , docs:: * , logs:: * , project:: * } ;
2- use crate :: utils:: run_tool;
31use rmcp:: {
42 handler:: server:: { tool:: ToolRouter , wrapper:: Parameters } ,
53 model:: { ServerCapabilities , ServerInfo } ,
64 tool, tool_handler, tool_router, ServerHandler ,
75} ;
6+ use tracing:: instrument;
87
9- #[ derive( serde:: Serialize , serde:: Deserialize , schemars:: JsonSchema ) ]
8+ use crate :: tools:: { deployment:: * , docs:: * , logs:: * , project:: * } ;
9+ use crate :: utils:: run_tool;
10+
11+ #[ derive( Debug , serde:: Serialize , serde:: Deserialize , schemars:: JsonSchema ) ]
1012struct SearchDocsArgs {
1113 #[ schemars( description = "Search query for documentation" ) ]
1214 query : String ,
@@ -27,11 +29,13 @@ impl ShuttleMcpServer {
2729
2830#[ tool_router]
2931impl ShuttleMcpServer {
32+ #[ instrument( skip( self ) ) ]
3033 #[ tool( description = "Deploy a project" ) ]
3134 async fn deploy ( & self , Parameters ( args) : Parameters < DeployArgs > ) -> Result < String , String > {
3235 run_tool ( deploy ( args) ) . await
3336 }
3437
38+ #[ instrument( skip( self ) ) ]
3539 #[ tool( description = "List the deployments for a service" ) ]
3640 async fn deployment_list (
3741 & self ,
@@ -40,6 +44,7 @@ impl ShuttleMcpServer {
4044 run_tool ( deployment_list ( args) ) . await
4145 }
4246
47+ #[ instrument( skip( self ) ) ]
4348 #[ tool( description = "View status of a deployment" ) ]
4449 async fn deployment_status (
4550 & self ,
@@ -48,11 +53,13 @@ impl ShuttleMcpServer {
4853 run_tool ( deployment_status ( args) ) . await
4954 }
5055
56+ #[ instrument( skip( self ) ) ]
5157 #[ tool( description = "View build and deployment logs" ) ]
5258 async fn logs ( & self , Parameters ( args) : Parameters < LogsArgs > ) -> Result < String , String > {
5359 run_tool ( logs ( args) ) . await
5460 }
5561
62+ #[ instrument( skip( self ) ) ]
5663 #[ tool( description = "Get the status of this project on Shuttle" ) ]
5764 async fn project_status (
5865 & self ,
@@ -61,14 +68,13 @@ impl ShuttleMcpServer {
6168 run_tool ( project_status ( args) ) . await
6269 }
6370
71+ #[ instrument( skip( self ) ) ]
6472 #[ tool( description = "List all projects you have access to" ) ]
65- async fn project_list (
66- & self ,
67- Parameters ( args) : Parameters < ProjectListArgs > ,
68- ) -> Result < String , String > {
69- run_tool ( project_list ( args) ) . await
73+ async fn project_list ( & self ) -> Result < String , String > {
74+ run_tool ( project_list ( ) ) . await
7075 }
7176
77+ #[ instrument( skip( self ) ) ]
7278 #[ tool( description = "Search Shuttle documentation" ) ]
7379 async fn search_docs (
7480 & self ,
@@ -80,6 +86,7 @@ impl ShuttleMcpServer {
8086
8187#[ tool_handler]
8288impl ServerHandler for ShuttleMcpServer {
89+ #[ instrument( skip( self ) ) ]
8390 fn get_info ( & self ) -> ServerInfo {
8491 ServerInfo {
8592 instructions : Some (
0 commit comments