Recommend this page to a friend! |
Classes of Mohamed Ahmed | Laravel MCP SDK | docs/api/_Prompt.md | Download |
|
![]() PromptNamespace: `` Implementation of a prompt in the MCP system. A prompt represents an interactive element that can be presented to users or processed by the system. Each prompt has a unique name, a handler that processes requests, and a set of messages that define its content. Prompts can be used to: - Gather user input - Display system notifications - Process structured messages - Implement interactive workflows @package LaravelMCP\MCP\Server Methods__constructCreate a new prompt instance. @param string $name The unique identifier for the prompt @param callable $handler The function that processes prompt requests @param string|null $description Optional description of the prompt getName{@inheritdoc} getMessages{@inheritdoc} getDescription{@inheritdoc} setDefaultArgumentsSet the default arguments for the prompt. @param array $arguments The default arguments getDefaultArgumentsGet the default arguments for the prompt. @return array The default arguments handleHandle a prompt request. @param array $arguments The arguments for the request @return array The response data getArguments{@inheritdoc} setMessagesSet the messages for this prompt. @param array $messages The messages that make up the prompt's content getHandlerGet the handler function for this prompt. @return callable The handler function |