File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -174,10 +174,8 @@ export class Server {
174174 this . mcpServer . sendResourceListChanged ( ) ;
175175 }
176176
177- public areLocalAtlasToolsAvailable ( ) : boolean {
178- // TODO: remove hacky casts once we merge the local dev tools
179- const atlasLocalCategory = "atlas-local" as unknown as ToolCategory ;
180- return ! ! this . tools . filter ( ( tool ) => tool . category === atlasLocalCategory ) . length ;
177+ public isToolCategoryAvailable ( name : ToolCategory ) : boolean {
178+ return ! ! this . tools . filter ( ( t ) => t . category === name ) . length ;
181179 }
182180
183181 public sendResourceUpdated ( uri : string ) : void {
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ export abstract class MongoDBToolBase extends ToolBase {
8787 isError : true ,
8888 } ;
8989 case ErrorCodes . AtlasSearchNotSupported : {
90- const CTA = this . isToolCategoryAvailable ( "atlas-local" as unknown as ToolCategory )
90+ const CTA = this . server ?. isToolCategoryAvailable ( "atlas-local" as unknown as ToolCategory )
9191 ? "`atlas-local` tools"
9292 : "Atlas CLI" ;
9393 return {
@@ -123,8 +123,4 @@ export abstract class MongoDBToolBase extends ToolBase {
123123
124124 return metadata ;
125125 }
126-
127- protected isToolCategoryAvailable ( name : ToolCategory ) : boolean {
128- return ( this . server ?. tools . filter ( ( t ) => t . category === name ) . length ?? 0 ) > 0 ;
129- }
130126}
You can’t perform that action at this time.
0 commit comments