| 1 | package Catalyst::Plugin::MCP::Role::PromptProvider; | ||
| 2 | 1 | ▶ | use v5.36; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 1 | ▶ | use Moo::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 1 | our $VERSION = '0.003'; | |
| 6 | |||
| 7 | 1 | requires qw/list get/; | |
| 8 | |||
| 9 | =head1 NAME | ||
| 10 | |||
| 11 | Catalyst::Plugin::MCP::Role::PromptProvider - MCP prompt provider contract | ||
| 12 | |||
| 13 | =head1 REQUIRED METHODS | ||
| 14 | |||
| 15 | =head2 list( $cursor ) | ||
| 16 | |||
| 17 | Return C<< { prompts => \@items, nextCursor => $opt } >>. | ||
| 18 | |||
| 19 | =head2 get( $name, $args ) | ||
| 20 | |||
| 21 | Return the prompt result hashref (C<< { messages => [...] } >>), or C<undef> if | ||
| 22 | the name is unknown (the engine turns C<undef> into a -32602 error). | ||
| 23 | |||
| 24 | =cut | ||
| 25 | |||
| 26 | 1 | 1; | |