Class: ClaudeAgentSDK::McpServerStatus
- Defined in:
- lib/claude_agent_sdk/types.rb
Overview
Status of a single MCP server connection
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#error ⇒ Object
Returns the value of attribute error.
-
#name ⇒ Object
Returns the value of attribute name.
-
#scope ⇒ Object
Returns the value of attribute scope.
-
#server_info ⇒ Object
Returns the value of attribute server_info.
-
#status ⇒ Object
Returns the value of attribute status.
-
#tools ⇒ Object
Returns the value of attribute tools.
Class Method Summary collapse
-
.parse(data) ⇒ Object
Backwards-compatible parse; normalizes camelCase ‘serverInfo` and polymorphically builds the nested `config`.
- .parse_config(config) ⇒ Object
Methods inherited from Type
#[], #[]=, from_hash, #initialize, #to_h, wrap
Constructor Details
This class inherits a constructor from ClaudeAgentSDK::Type
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ClaudeAgentSDK::Type
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
1169 1170 1171 |
# File 'lib/claude_agent_sdk/types.rb', line 1169 def config @config end |
#error ⇒ Object
Returns the value of attribute error.
1168 1169 1170 |
# File 'lib/claude_agent_sdk/types.rb', line 1168 def error @error end |
#name ⇒ Object
Returns the value of attribute name.
1168 1169 1170 |
# File 'lib/claude_agent_sdk/types.rb', line 1168 def name @name end |
#scope ⇒ Object
Returns the value of attribute scope.
1168 1169 1170 |
# File 'lib/claude_agent_sdk/types.rb', line 1168 def scope @scope end |
#server_info ⇒ Object
Returns the value of attribute server_info.
1169 1170 1171 |
# File 'lib/claude_agent_sdk/types.rb', line 1169 def server_info @server_info end |
#status ⇒ Object
Returns the value of attribute status.
1168 1169 1170 |
# File 'lib/claude_agent_sdk/types.rb', line 1168 def status @status end |
#tools ⇒ Object
Returns the value of attribute tools.
1169 1170 1171 |
# File 'lib/claude_agent_sdk/types.rb', line 1169 def tools @tools end |
Class Method Details
.parse(data) ⇒ Object
Backwards-compatible parse; normalizes camelCase ‘serverInfo` and polymorphically builds the nested `config`.
1189 1190 1191 |
# File 'lib/claude_agent_sdk/types.rb', line 1189 def self.parse(data) from_hash(data) end |
.parse_config(config) ⇒ Object
1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 |
# File 'lib/claude_agent_sdk/types.rb', line 1193 def self.parse_config(config) return nil unless config.is_a?(Hash) && config[:type] case config[:type] when 'claudeai-proxy' McpClaudeAIProxyServerConfig.new(url: config[:url], id: config[:id]) when 'sdk' McpSdkServerConfigStatus.new(name: config[:name]) else config end end |