Package ch.so.agi.mcp.config
Class McpDtoReflectionHints
java.lang.Object
ch.so.agi.mcp.config.McpDtoReflectionHints
@Configuration(proxyBeanMethods=false)
@ImportRuntimeHints(ch.so.agi.mcp.config.McpDtoReflectionHints.McpDtoTypes.class)
public class McpDtoReflectionHints
extends Object
Registers the DTO types of the MCP tool contract for reflection.
The MCP SDK converts tool arguments and tool results through Jackson, which
invokes record and bean accessors reflectively. A GraalVM native image keeps
only members that are reachable from a hint, so the payload types are listed in
META-INF/native-image/ch.so.agi/interlis-mcp/reachability-metadata.json.
The list is collected with the GraalVM tracing agent while
tools/test-mcp-stdio.py drives every MCP tool.
The type list is kept as data rather than as a hand written Java list because tool results nest deeply and are composed at runtime. Registering every member of every listed type keeps accessors working regardless of which record component Jackson touches.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
McpDtoReflectionHints
public McpDtoReflectionHints()
-