Class: RosettAi::Mcp::Tools::ProvenanceWriteTool
- Inherits:
-
Object
- Object
- RosettAi::Mcp::Tools::ProvenanceWriteTool
- Defined in:
- lib/rosett_ai/mcp/tools/provenance_write_tool.rb
Overview
MCP tool: initialize provenance tracking.
Creates .ai-provenance.yml in the project root. Write operation — creates a new file.
Constant Summary collapse
- TOOL_NAME =
Returns MCP tool identifier string.
'rai_provenance_init'- DESCRIPTION =
Returns Human-readable description of this tool.
'Initialize AI provenance tracking in a project'- ANNOTATIONS =
Returns MCP protocol annotations describing tool capabilities.
{ 'readOnlyHint' => false, 'destructiveHint' => false, 'idempotentHint' => true, 'openWorldHint' => false }.freeze
Instance Method Summary collapse
-
#call ⇒ Hash
Executes the provenance initialization.
Instance Method Details
#call ⇒ Hash
Executes the provenance initialization.
33 34 35 36 37 38 39 |
# File 'lib/rosett_ai/mcp/tools/provenance_write_tool.rb', line 33 def call store = RosettAi::Provenance::Store.new(root: Dir.pwd) store.init ResponseHelper.success('Provenance tracking initialized', path: store.path.to_s) rescue StandardError => e ResponseHelper.error("Provenance init failed: #{e.}") end |