File tree Expand file tree Collapse file tree
tools/aimdb-mcp/src/tools Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 "args" : [
1111 " run" ,
1212 " --manifest-path" ,
13- " /aimdb_ws/aimdb /tools/aimdb-mcp/Cargo.toml" ,
13+ " ${workspaceFolder} /tools/aimdb-mcp/Cargo.toml" ,
1414 " --" ,
1515 " --socket" ,
1616 " /tmp/aimdb-demo.sock"
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ impl StageProfilingInfo {
5050
5151impl RecordProfilingMetrics {
5252 /// Returns a serializable snapshot of every registered stage's metrics,
53- /// ordered sources → taps → links → transforms .
53+ /// ordered sources → taps → links.
5454 pub fn snapshot ( & self ) -> Vec < StageProfilingInfo > {
5555 let mut out = Vec :: new ( ) ;
5656 for ( kind, stages) in [
Original file line number Diff line number Diff line change @@ -116,17 +116,15 @@ pub async fn reset_stage_profiling(args: Option<Value>) -> McpResult<Value> {
116116 "reset" : true ,
117117 "message" : "Stage profiling counters reset on all records." ,
118118 } ) ) ,
119- Err ( e) => {
120- // Most likely the server was built without the `profiling` feature.
121- let msg = e. to_string ( ) ;
122- if msg. contains ( "method_not_found" ) || msg. contains ( "Unknown method" ) {
123- Ok ( json ! ( {
124- "reset" : false ,
125- "message" : "The target instance does not support profiling.reset (built without the `profiling` feature?)." ,
126- } ) )
127- } else {
128- Err ( McpError :: Client ( e) )
129- }
119+ Err ( aimdb_client:: ClientError :: ServerError { ref code, .. } )
120+ if code == "method_not_found" =>
121+ {
122+ // The server was built without the `profiling` feature.
123+ Ok ( json ! ( {
124+ "reset" : false ,
125+ "message" : "The target instance does not support profiling.reset (built without the `profiling` feature?)." ,
126+ } ) )
130127 }
128+ Err ( e) => Err ( McpError :: Client ( e) ) ,
131129 }
132130}
You can’t perform that action at this time.
0 commit comments