Class MCPArtifact
java.lang.Object
ai.redouble.nucleo.harness.artifacts.AbstractArtifact
ai.redouble.nucleo.mcp.MCPArtifact
- All Implemented Interfaces:
Artifact
Generic artifact wrapping an MCP tool's structured response. Behaves like every other
artifact: registered in the
ArtifactRegistry on serialization, replaced by its
ref in LLM-facing output, fetchable by ref via the existing artifact tools.
The walker that produces this artifact is responsible for two things:
- Recursively wrapping non-trivial sub-objects in their own
MCPArtifactinstances and embedding them as values indata. The framework's artifact-ref serializer collapses each nested instance to its own ref in LLM-facing serialization. - Pre-populating the inherited
summaryCache(viaAbstractArtifact.cacheSummary(String, ai.redouble.nucleo.harness.schema.SummarizedField)) for long string and binary leaves, keyed by JSON pointer intodata(e.g./results/0/fullText).
The data field carries @LLMSummarizable(preSummarized=true) so the
framework's serializer walks the tree and renders the cached summary at any leaf where
an entry exists, raw value otherwise. No MCP-specific serialization code path needed.
- Since:
- 0.1 (2026-05-09)
- Author:
- Andrey Santrosyan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetData()voidvoidsetMcpHandle(String mcpHandle) voidsetToolName(String toolName) Methods inherited from class AbstractArtifact
cacheSummary, getArtifactRef, getCachedSummary, hasReference, setArtifactRef, toString
-
Constructor Details
-
MCPArtifact
public MCPArtifact()
-
-
Method Details
-
getData
-
setData
-
getMcpHandle
-
setMcpHandle
-
getToolName
-
setToolName
-