1+ using System ;
12using System . Collections . Generic ;
23using System . Linq ;
34using System . Threading . Tasks ;
@@ -20,7 +21,7 @@ public async Task ListTools_ReturnsExpectedTools()
2021 var tools = await client . ListToolsAsync ( ) ;
2122 var toolNames = tools . Select ( t => t . Name ) . ToList ( ) ;
2223
23- Assert . Contains ( "workspace_component_list " , toolNames ) ;
24+ Assert . Contains ( "workspace_component_type_list " , toolNames ) ;
2425 Assert . Contains ( "workspace_component_type_explain" , toolNames ) ;
2526 }
2627
@@ -29,7 +30,7 @@ public async Task WorkspaceComponentList_ReturnsValidResponse()
2930 {
3031 var client = await McpClient . InstanceAsync ;
3132
32- var result = await client . CallToolAsync ( "workspace_component_list " ) ;
33+ var result = await client . CallToolAsync ( "workspace_component_type_list " ) ;
3334
3435 Assert . NotNull ( result . Content ) ;
3536 Assert . NotEmpty ( result . Content ) ;
@@ -40,12 +41,20 @@ public async Task WorkspaceComponentList_ReturnsValidResponse()
4041 public async Task WorkspaceComponentTypeExplain_ReturnsComponentDetails ( )
4142 {
4243 var client = await McpClient . InstanceAsync ;
43- var args = new Dictionary < string , object > { { "Name " , "pp-entity" } } ;
44+ var args = new Dictionary < string , object > { { "Type " , "pp-entity" } } ;
4445
4546 var result = await client . CallToolAsync ( "workspace_component_type_explain" , args ) ;
4647
4748 Assert . NotNull ( result . Content ) ;
4849 Assert . NotEmpty ( result . Content ) ;
50+
51+ // Log the actual error for debugging
52+ if ( result . IsError == true )
53+ {
54+ var errorContent = result . Content [ 0 ] is TextContentBlock errorBlock ? errorBlock . Text : "Unknown error" ;
55+ throw new InvalidOperationException ( $ "MCP call failed: { errorContent } ") ;
56+ }
57+
4958 Assert . True ( result . IsError != true ) ;
5059
5160 if ( result . Content [ 0 ] is TextContentBlock textBlock )
0 commit comments