CompletionContext

What a completion (McpPrompt.complete, ResourceProvider.complete) can draw on: the other arguments the user has already filled in, and callTool for reading device data through a read-only tool, e.g. contact names from search_contacts. The server builds the context; the public constructor (no tools, callTool always null) is for testing a completer.

Constructors

Link copied to clipboard
constructor(arguments: Map<String, String> = emptyMap())

Properties

Link copied to clipboard

Functions

Link copied to clipboard
suspend fun callTool(name: String, params: Map<String, Any>): ToolResult?

Runs the tool name if it is visible, read-only and needs no host confirmation; null otherwise, so a suggestion never pops a confirmation dialog or changes anything.