External AI clients reach host capabilities through DevTools.Daemon.
In-host MCP runtime is shared across registered hosts.
- Daemon owns stdio MCP, gateway, auth, host discovery, and a fixed external
tool/prompt surface (
ListChanged = false). - Infrastructure tools remain on the daemon (
list_processes,launch_host,read_file_info).list_machinesis answered by the gateway. - Host capabilities are not projected into daemon
tools/list. Clients usecode_mode(code, readOnly?), whosecodeis a C# async method body. Search and dispatch run inside that program:SearchAsyncreturns ranked candidates from the in-memory catalog. Treat them as options, not an instruction to invoke the first result. Inspect the description and callDescribeAsyncfor the schema when intent or arguments are ambiguous. Search is schema-aware lexical retrieval, not a guarantee of semantic equivalence. The detailed policy is in decision 0040.- Specialized capabilities are preferred by default. C# and Python execution tools are the fallback when no specialized candidate is sufficiently relevant; explicit code-execution queries may surface them directly.
DescribeAsyncreturns the SDKTool;InvokeAsyncreturns the hostCallToolResult(including image and audio blocks);ReadAsyncreturnsReadResourceResult. The model receives only the program's return value.readOnlydefaults to false; when true,InvokeAsyncthrows unless the tool'sReadOnlyHintis true.- Text over 40,000 characters keeps its start and end. The full text is saved
under
%TEMP%, and the return includes that path. Image, audio, and blob payloads over 1 MiB are rejected. Ordinary objects and arrays are returned as JSON text;code_modedoes not advertise anoutputSchema. A returnedCallToolResultpasses through when its text is within the limit.
execute_csharp_codeandexecute_python_codedescriptions include the required entry pattern. Fromcode_mode, source is passed as one string and quotes inside that string must be doubled. Search and invocation locators remain inside the Daemon; neithersearch_dynamicnorinvoke_dynamicis an external MCP tool.- MRTR is not a product workflow (0027).
The working loop is one
code_modeprogram: search, call, and return a projection. Execute error tags ([COMPILATION ERROR],[RUNTIME ERROR],[ROLLBACK]) are retried inside that program. Destructive tools use structured warning +dryRun(e.g.revit_delete_elements), not elicitation. The host hop may still serializeInputRequiredResultif a tool throwsInputRequiredException(plumbing); do not build agent features on Gateway/Cursor elicitation,ElicitAsync, or PythonResolve(Elicit). Isolated .NET toolsets: low-level throw/retry only; high-levelMrtrContextsuspend is unsupported on the sync ALC invoker. read_file_infodefaults todetail=summaryfor on-disk file peek; passdetail=fullfor complete transmission/link metadata. Success responses include SDKStructuredContentplus compact JSON inContent(preferStructuredContentfor machine parsing).list_processesemitsStructuredContenton success (manual path — noOutputSchemaontools/listuntil clients accept inferred schemas).- Agent-facing JSON from
code_moderesults,read_file_info, and tool errors uses compact SDKMcpJsonUtilities(not indented pretty-print). - Fixed prompts (
revit_code,acad_code) are daemon-owned via nativeprompts/list/prompts/getand never contact a host. - Two named-pipe protocols stay separate:
- Pytest/control:
DevTools_{Host}_{Version}_{PID}(BridgeMessagelength-prefixed frames) - MCP:
DevToolsMcp_{Host}_{Version}_{PID}(newline-delimited JSON-RPC)
- Pytest/control:
- Host SDK server advertises
listChangedsoHostConnectionscan refresh only that process catalog; the external daemon collections stay unchanged. - Call observability is always-on at protocol boundaries. Host in-process MCP logs
via
McpLogFiltersandILogger; daemoncode_modeand infrastructure tools log the same shape. Arguments and results are protocol JSON via SDKMcpJsonUtilities(not hash-only summaries). Binary blocks are described by type / mime / length — never base64Dataon monitor lines. - MCP Tasks extension (
io.modelcontextprotocol/tasks) is advertised on the daemon SDK server.TaskSelectionreturns Synchronous or Optional only.launch_hostandcode_modeare Optional. The other infrastructure tools stay synchronous. Required is unused until clients advertise the tasks extension; it rejects the call before the tool runs. Daemon-to-hosttools/callstays synchronous; task polling is client ↔ daemon only. view_screenshotcaptures at 1280 px width (Revit 150 DPI unchanged; AutoCAD 1280×720). Return theImageContentBlockfromcode_modewhen the model must see it.
- Search behavior: decision 0040
- Proposed semantic-retrieval evaluation: decision 0044
- Architecture:
docs/architecture/MCP/README.md - SDK gaps:
docs/architecture/MCP/sdk-gap-matrix.md - Product surface:
docs/decisions/0027-mcp-product-surface.md - Host pipe (partially superseded):
docs/decisions/0012-host-mcp-spec-engine.md - Boundaries (host wire):
docs/architecture/MCP/platform-boundaries.md - Workflows:
docs/architecture/MCP/workflows.md - Agent digest:
docs/agents/mcp-pytest-bridge.md