/** A tool exposed by the in-process MCP server, in a plain (SDK-free) shape. */ export interface InProcessToolInfo { /** Tool name, e.g. `list_devices`. */ name: string; /** Human/LLM-readable description of what the tool does. */ description?: string; /** JSON Schema (object schema) describing the tool's input arguments. */ inputSchema: Record; } /** Result of a tool call: the concatenated text content plus the error flag. */ export interface InProcessToolResult { /** Concatenated text of all text content blocks the tool returned. */ text: string; /** True if the tool reported an error (the text then holds the error payload). */ isError: boolean; } /** Options for {@link createInProcessMcp}. */ export interface InProcessMcpOptions { /** The host adapter the MCP server runs inside (its ACLs/connection are used for all calls). */ adapter: ioBroker.Adapter; /** ioBroker user whose permissions every tool call runs with (default: `system.user.admin`). */ defaultUser?: `system.user.${string}`; /** Language for localized output (rooms/devices/functions). */ language?: ioBroker.Languages; /** Allow the state-writing tools `set_state`/`set_states` (default: false). */ allowSetState?: boolean; /** Allow the object/file-changing tools (`create_state`, `set_object`, ...) (default: false). */ allowObjectChange?: boolean; /** Name reported to the server by the embedded client. */ clientName?: string; /** Version reported to the server by the embedded client. */ clientVersion?: string; } /** A ready-to-use in-process MCP connection: list tools, call them, and close everything. */ export interface InProcessMcp { /** List the available tools (already filtered by the configured permission toggles). */ listTools(): Promise; /** Call a tool by name with the given arguments; returns its text result. */ callTool(name: string, args?: Record): Promise; /** Disconnect the client and server and release the host adapter's log listener. */ close(): Promise; } /** * Create an in-process MCP server embedded in the given adapter and a linked client to drive it. * * @param options embedding options (host adapter, default user, language, permission toggles) * @returns a facade to list/call tools and to tear the connection down again */ export declare function createInProcessMcp(options: InProcessMcpOptions): Promise;