<?php

declare(strict_types=1);

$file = __DIR__ . '/../../src/Framework/Mcp/Tools/GitTools.php';
$content = file_get_contents($file);

// Find and replace all McpTool attributes with inputSchema
$pattern = '/(#\[McpTool\(\s*name:\s*[\'"]([^\'"]+)[\'"]\s*,\s*description:\s*[\'"]([^\'"]+)[\'"]\s*),\s*inputSchema:\s*\[[^\]]*(?:\[[^\]]*\][^\]]*)*\]\s*\)/s';

$content = preg_replace_callback($pattern, function ($matches) {
    return $matches[1] . ')';
}, $content);

file_put_contents($file, $content);

echo "Fixed McpTool attributes in GitTools.php\n";
echo "Removed inputSchema from all attributes\n";
