ai_analysis/src/DemoTools.php

19 lines
345 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
declare(strict_types=1);
namespace App;
use Mcp\Capability\Attribute\McpTool;
final class DemoTools
{
#[McpTool(
name: 'hello',
description: '返回一段测试文字'
)]
public function hello(string $name = '朋友'): string
{
return "你好,{$name}PHP MCP Server 运行成功!";
}
}