tool="weather" on its provider. For a shared entry, set resolveTool(result, hostContext) instead. The result notification has no required tool name, and host tool information is optional, so shared routing must be explicit.
The example uses application-owned _meta.view:
mcpResult({ content, structuredContent, _meta: { view: "weather" } }). Toolgrain preserves it without inventing or overwriting routing fields. A missing marker produces an explicit routing error. Expected text-only errors without a marker may use a resolver fallback or display that error state.
Inside View, call useToolResult() and switch on state.toolName to select a component. Each component can call any app-visible tool through its own useToolCall hook; it is not restricted to its initiating tool. Tool visibility is enforced by the host and is not endpoint authorization.