Class: ReadTool
- Inherits:
-
MCP::Tool
- Object
- MCP::Tool
- ReadTool
- Defined in:
- lib/exe.rb
Overview
MCPツール定義
Class Method Summary collapse
Class Method Details
.call(name:) ⇒ Object
96 97 98 99 100 |
# File 'lib/exe.rb', line 96 def self.call(name:) return MCP::Tool::Response.new([{ type: "text", text: "Name must be a string" }], error: true) unless name.is_a?(String) result = ObsidianFetch.read_note($manager.vault, name) MCP::Tool::Response.new([{ type: "text", text: result.text }], error: result.error) end |