Package com.onec.mcp
Class MetadataToolFactory
java.lang.Object
com.onec.mcp.MetadataToolFactory
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.
-
Constructor Summary
ConstructorsConstructorDescriptionMetadataToolFactory(MetadataRegistry registry, UiAccessService access, CatalogQueryService catalogQuery, DocumentQueryService documentQuery, RegisterQueryService registerQuery, CatalogCommandService catalogCommands, DocumentCommandService documentCommands, OnecMcpProperties properties, io.modelcontextprotocol.json.McpJsonMapper json) -
Method Summary
-
Constructor Details
-
MetadataToolFactory
public MetadataToolFactory(MetadataRegistry registry, UiAccessService access, CatalogQueryService catalogQuery, DocumentQueryService documentQuery, RegisterQueryService registerQuery, CatalogCommandService catalogCommands, DocumentCommandService documentCommands, OnecMcpProperties properties, io.modelcontextprotocol.json.McpJsonMapper json)
-
-
Method Details
-
build
-