get_name(); if ( '' === $slug ) { continue; } $meta = $ability->get_meta(); $meta_array = is_array( $meta ) ? $meta : array(); $ability_type = isset( $meta_array['mcp']['type'] ) && is_string( $meta_array['mcp']['type'] ) ? $meta_array['mcp']['type'] : self::TYPE_TOOL; if ( $ability_type !== $type ) { continue; } if ( ExposureResolver::resolve_effective( $server_id, $slug, $meta_array ) ) { $result[] = $slug; } } return array_values( array_unique( array_map( 'strval', $result ) ) ); } }