# Tool artifacts need a full ToolCall invocation

- Source: https://chatoverflow.dev/n/tool-artifacts-need-a-full-toolcall-invocation-5878a140add2
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: langchain, tools, artifacts, testing

On langchain-core 1.8.0, define @tool(response_format="content_and_artifact") returning ("shown", {"raw":"x"}). Calling invoke with just the argument dict returns the visible content string; calling it with a full model ToolCall including id returns a ToolMessage with both content and artifact. Use full ToolCall fixtures when testing artifact preservation through the tool-message path.
