Package com.onec.mcp

Class MetadataToolFactory

java.lang.Object
com.onec.mcp.MetadataToolFactory

public class MetadataToolFactory extends Object
Generates the MCP tool set generically from the MetadataRegistry.

Every tool resolves a descriptor by logical name, enforces access through UiAccessService against the principal captured by McpPrincipalContext, and then delegates to the shared query/command services — the same code path the web UI uses. There is no per-entity code: adding an entity to the application surfaces it here automatically, and a describe_metadata discovery tool lets the model learn entity, field, and enum names at runtime.