Invocation, options and results
Linktopaz mcp serve
topaz mcp serve
Input
The complete startup form is topaz mcp serve. It accepts no positional operand and no options. Reject every additional argument before executable discovery or worker startup.
The service uses the installed Topaz executable and its admitted default compiler. Source text and supported profile choices are request fields rather than CLI paths or environment based compiler substitutions.
Validate request methods and each advertised tool schema before starting work. Reject unknown tool names, unlisted argument fields, wrong JSON types and request values beyond the advertised size limits.
Options and conflicts
| Option | Default | Contract | Conflicts |
|---|
Output channels
stdout
stderr
Exit status
0
The stdio service closes normally after outstanding work is cancelled or completed.
1
Startup arguments, executable discovery, service initialization or the stdio service fails.
Effects
Read reference assets from the installed product. Keep submitted source and intermediate worker state private to the request and remove temporary worker files at completion or cancellation.
Do not save submitted source, append source to a log, retain state between tool calls, write a caller workspace or load a user supplied component.
Tool execution uses the built in evaluator without filesystem capabilities. A request cannot grant itself filesystem authority by containing a path.
The server has only stdio transport. It opens no HTTP endpoint and performs no registry access, component download or outbound request. The built in evaluator has no network capability.
Identical admitted tool requests under the same installed assets, compiler and resource profile produce the same semantic results. Response identifiers follow their requests.
Concurrent response arrival and wall clock timeout outcomes are not byte stable. Cancellation does not create a retained result or state for the next request.
The stdio service does not discover a package from the current directory. Source checking is a stateless request and does not load caller package manifests, rewrite locks or materialize dependencies.
Reference and evaluator identities come from the installed product. No package or component fallback is selected after a request fails.
Operation
LinkStart this command as a local MCP server. Its runner uses the installed product's capability restrictions.
Example contract
LinkExample contract
The invocation topaz mcp serve main. is expected to exit with 1.
The early MCP parser requires exactly mcp serve. It rejects the adapter-supplied operand and language selector before starting a server or worker.
Why
The MCP server receives requests over its protocol. Rejecting extra startup arguments prevents an ignored source operand from appearing to select the server input.
Source evidence
- compiler/crates/topaz_cli/src/command/flags.rs at
b48527d0a174
Behavior contract
LinkCommand behavior
Arguments and rejection
The complete startup form is topaz mcp serve. It accepts no positional operand and no options. Reject every additional argument before executable discovery or worker startup.
The service uses the installed Topaz executable and its admitted default compiler. Source text and supported profile choices are request fields rather than CLI paths or environment based compiler substitutions.
Validate request methods and each advertised tool schema before starting work. Reject unknown tool names, unlisted argument fields, wrong JSON types and request values beyond the advertised size limits.
Output
Standard input and standard output carry newline delimited MCP JSON-RPC messages. Standard output contains only protocol messages and no usage text, progress banner or worker output outside a tool response.
The initialization response advertises the supported protocol version and tool capabilities. Tool calls return MCP content and structured content according to the advertised result schema. Checker diagnostics and evaluator outcomes are tool results rather than CLI report text.
Human startup and fatal transport errors use standard error. The command has no human report mode and rejects -, - and -. Protocol JSON is the transport format and does not need a report selector.
Exit status
Exit 0 when the stdio service closes normally after its input channel ends and outstanding work is cancelled or completed.
Exit 1 for invalid startup arguments, unavailable installed executable, failed service initialization or fatal transport or service failure. A rejected tool request or a program diagnostic does not alone change the server exit status.
Filesystem effects
Read reference assets from the installed product. Keep submitted source and intermediate worker state private to the request and remove temporary worker files at completion or cancellation.
Do not save submitted source, append source to a log, retain state between tool calls, write a caller workspace or load a user supplied component.
Tool execution uses the built in evaluator without filesystem capabilities. A request cannot grant itself filesystem authority by containing a path.
Network access
The server has only stdio transport. It opens no HTTP endpoint and performs no registry access, component download or outbound request. The built in evaluator has no network capability.
Reproducibility
Identical admitted tool requests under the same installed assets, compiler and resource profile produce the same semantic results. Response identifiers follow their requests.
Concurrent response arrival and wall clock timeout outcomes are not byte stable. Cancellation does not create a retained result or state for the next request.
Packages and locks
The stdio service does not discover a package from the current directory. Source checking is a stateless request and does not load caller package manifests, rewrite locks or materialize dependencies.
Reference and evaluator identities come from the installed product. No package or component fallback is selected after a request fails.
Why
A stdio service already has a protocol for requests and results. Extra CLI inputs would introduce a second way to choose request content. Isolating each request makes supplied source temporary and keeps one client call from changing the meaning of another.
Source evidence
- compiler/crates/topaz_cli/src/command/flags.rs at
b48527d0a174
The linked public CLI recipe checks the exact displayed argument rejection before the requested operation. It does not execute the successful operation or verify its effects.
The reviewed recipe deliberately adds a source operand and language selector to the exact startup form. Successful initialization, tool calls and shutdown need a protocol harness outside the execution allowlist.
Example
LinkArgument-rejection example
Linkfunction identity<T>(value: T) -> T {value}
Expected result
Expected result
Textual rejection details remain Pending in the reference model. The independent Tools example gate expects exit 1.
The early MCP parser requires exactly mcp serve. It rejects the adapter-supplied operand and language selector before starting a server or worker.
Source evidence
- compiler/crates/topaz_cli/src/command/flags.rs at
b48527d0a174
Verification scope
LinkObserved with Topaz 5.21.3 on 2026-11-06T08:36:29.642Z. This invocation passed; exit 1. 4 assertions were evaluated against the independent expected result. Execution record. This result covers the displayed invocation.