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
serverInfoand polymorphically builds the nestedconfig. - .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.
1288 1289 1290 |
# File 'lib/claude_agent_sdk/types.rb', line 1288 def config @config end |
#error ⇒ Object
Returns the value of attribute error.
1287 1288 1289 |
# File 'lib/claude_agent_sdk/types.rb', line 1287 def error @error end |
#name ⇒ Object
Returns the value of attribute name.
1287 1288 1289 |
# File 'lib/claude_agent_sdk/types.rb', line 1287 def name @name end |
#scope ⇒ Object
Returns the value of attribute scope.
1287 1288 1289 |
# File 'lib/claude_agent_sdk/types.rb', line 1287 def scope @scope end |
#server_info ⇒ Object
Returns the value of attribute server_info.
1288 1289 1290 |
# File 'lib/claude_agent_sdk/types.rb', line 1288 def server_info @server_info end |
#status ⇒ Object
Returns the value of attribute status.
1287 1288 1289 |
# File 'lib/claude_agent_sdk/types.rb', line 1287 def status @status end |
#tools ⇒ Object
Returns the value of attribute tools.
1288 1289 1290 |
# File 'lib/claude_agent_sdk/types.rb', line 1288 def tools @tools end |
Class Method Details
.parse(data) ⇒ Object
Backwards-compatible parse; normalizes camelCase serverInfo and
polymorphically builds the nested config.
1308 1309 1310 |
# File 'lib/claude_agent_sdk/types.rb', line 1308 def self.parse(data) from_hash(data) end |
.parse_config(config) ⇒ Object
1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 |
# File 'lib/claude_agent_sdk/types.rb', line 1312 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 |