Class: RosettAi::Mcp::Tools::DocumentationStatusTool

Inherits:
Object
  • Object
show all
Defined in:
lib/rosett_ai/mcp/tools/documentation_status_tool.rb

Overview

MCP tool: show documentation status.

Returns the current state of project documentation. Read-only operation.

Author:

  • hugo

  • claude

Constant Summary collapse

TOOL_NAME =
'rai_documentation_status'
DESCRIPTION =
'Show rai documentation status'
ANNOTATIONS =
{
  'readOnlyHint' => true,
  'destructiveHint' => false,
  'idempotentHint' => true,
  'openWorldHint' => false
}.freeze

Instance Method Summary collapse

Instance Method Details

#callHash

Executes the documentation status check.

Returns:

  • (Hash)

    documentation status



30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/rosett_ai/mcp/tools/documentation_status_tool.rb', line 30

def call
  root = RosettAi.root
  doc_dir = root.join('doc')
  man_dir = root.join('doc', 'man')
  {
    doc_files: doc_dir.directory? ? doc_dir.glob('*.md').size : 0,
    man_pages: man_dir.directory? ? man_dir.glob('*.ronn').size : 0,
    changelog_exists: root.join('CHANGELOG.md').exist?,
    readme_exists: root.join('README.md').exist?,
    install_guide_exists: root.join('INSTALL.md').exist?
  }
end