Class: CovLoupe::Tools::VersionTool
- Defined in:
- lib/cov_loupe/tools/version_tool.rb
Constant Summary
Constants inherited from BaseTool
BaseTool::COMMON_PROPERTIES, BaseTool::DEFAULT_SORT_ORDER, BaseTool::ERROR_MODE_PROPERTY, BaseTool::FILE_INPUT_SCHEMA, BaseTool::PATH_PROPERTY, BaseTool::SORT_ORDER_PROPERTY, BaseTool::TRACKED_GLOBS_PROPERTY
Class Method Summary collapse
-
.call(error_mode: 'log', output_chars: nil, server_context: nil, **_args) ⇒ Object
NOTE: output_chars is accepted for consistency and used in error handling, though the version string itself is already ASCII-only.
Methods inherited from BaseTool
call_with_file_payload, coverage_schema, create_configured_model, create_model, default_model_options, handle_mcp_error, input_schema_def, model_config_for, resolve_output_chars, respond_json, with_error_handling
Class Method Details
.call(error_mode: 'log', output_chars: nil, server_context: nil, **_args) ⇒ Object
NOTE: output_chars is accepted for consistency and used in error handling, though the version string itself is already ASCII-only.
26 27 28 29 30 31 32 33 34 |
# File 'lib/cov_loupe/tools/version_tool.rb', line 26 def call(error_mode: 'log', output_chars: nil, server_context: nil, **_args) # Normalize output_chars before error handling so errors also get converted output_chars_sym = resolve_output_chars(output_chars, server_context) with_error_handling('VersionTool', error_mode: error_mode, output_chars: output_chars_sym) do ::MCP::Tool::Response.new([ { 'type' => 'text', 'text' => "CovLoupe version: #{CovLoupe::VERSION}" }, ]) end end |