McpPrompt

interface McpPrompt

A reusable prompt template a client can offer its user (MCP prompts/list / prompts/get). droid-mcp ships a few in BuiltInPrompts; hosts can add their own via DroidMcp.Builder.addPrompt.

Inheritors

Properties

Link copied to clipboard
Link copied to clipboard
abstract val description: String
Link copied to clipboard
abstract val name: String
Link copied to clipboard

Tools the prompt tells the model to call. The prompt is listed only while all of them are visible, so a client never sees a prompt it can't carry out.

Link copied to clipboard
open val title: String?

Functions

Link copied to clipboard
open suspend fun complete(argument: String, value: String, context: CompletionContext): List<String>

Suggested values for argument, given what the user has typed so far (value); MCP completion/complete. Return the best matches first; the server sends at most 100. Defaults to no suggestions.

Link copied to clipboard
abstract suspend fun render(arguments: Map<String, String>): PromptResult

Build the messages for arguments. Required arguments are checked before this runs; throw IllegalArgumentException for a value that is present but invalid.