Class: ActiveMcp::Response::Initialize

Inherits:
Object
  • Object
show all
Defined in:
app/models/active_mcp/response/initialize.rb

Class Method Summary collapse

Class Method Details

.call(id:) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'app/models/active_mcp/response/initialize.rb', line 4

def self.call(id:)
  {
    jsonrpc: JSON_RPC_VERSION,
    id:,
    result: {
      protocolVersion: PROTOCOL_VERSION,
      capabilities: {
        logging: {},
        capabilities: {
          resources: {
            subscribe: false,
            listChanged: false
          },
          tools: {
            listChanged: false
          }
        },
      },
      serverInfo: {
        name: ActiveMcp.config.server_name,
        version: ActiveMcp.config.server_version
      }
    }
  }
end