Class: ShapeupCli::Client
- Inherits:
-
Object
- Object
- ShapeupCli::Client
- Defined in:
- lib/shapeup_cli/client.rb
Defined Under Namespace
Classes: ApiError, AuthError, NotFoundError, PermissionError, RateLimitError
Constant Summary collapse
- MCP_PROTOCOL_VERSION =
"2025-06-18"
Instance Method Summary collapse
-
#call_tool(name, **arguments) ⇒ Object
Call an MCP tool by name with arguments.
-
#initialize(host: Config.host, token: Auth.token) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(host: Config.host, token: Auth.token) ⇒ Client
Returns a new instance of Client.
13 14 15 16 17 18 |
# File 'lib/shapeup_cli/client.rb', line 13 def initialize(host: Config.host, token: Auth.token) raise AuthError, "Not authenticated" unless token @host = host @token = token @request_id = 0 end |
Instance Method Details
#call_tool(name, **arguments) ⇒ Object
Call an MCP tool by name with arguments. The only method the CLI uses — the MCP session/introspection/resource calls were never wired up.
22 23 24 |
# File 'lib/shapeup_cli/client.rb', line 22 def call_tool(name, **arguments) call_method("tools/call", name: name, arguments: arguments) end |