Acme-MCP
view release on metacpan or search on metacpan
use v5.42;
use Test2::V0;
use lib '../lib';
use Acme::MCP;
use JSON::PP;
#
subtest 'Tool Registration' => sub {
isa_ok my $mcp = Acme::MCP->new(), ['Acme::MCP'];
ok $mcp->add_tool( name => 'echo', code => sub ($args) { $args->{text} } ), 'add_tool->( ... )';
# Internal check
my %all_tools = $mcp->tools;
is $all_tools{echo}, E(), 'Tool registered';
( run in 0.498 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )