Builder
Functions
Add every BuiltInPrompts prompt; each is listed only while the tools it uses are.
Add a prompt served over the prompts/... methods.
Add several prompts.
Serve provider's resources (e.g. MediaTools.resources(context)) over the resources/... methods.
Add a single tool to the registry.
Ask the host before running tools that match requiresConfirmation (by default every tool with ToolAnnotations.destructiveHint) — on both transports. confirmer typically shows a dialog; a decline, a missing answer within the tool timeout, or an exception returns a tool_call_declined error and the tool never runs.
Enable the HTTP transport (Ktor) for desktop MCP clients.
Serve the HTTP transport over TLS using config's keystore. Build a config with SelfSignedCert.loadOrCreate(...) from the opt-in droid-mcp-tls module, or supply your own keystore. The server binds TlsConfig.httpsPort instead of the plaintext port; clients pin DroidMcp.tlsFingerprint. No effect unless the HTTP server is enabled.
Cap every tool call (both transports) at millis; an overrunning tool is cancelled and reported as a tool_timeout error. Defaults to ToolRegistry.DEFAULT_TOOL_TIMEOUT_MS.
Record every HTTP tools/call to sink (e.g. the Room-backed sink from droid-mcp-audit). Has no effect unless the HTTP server is enabled. In-process calls are not audited — the host owns that path.