Package su.onno.mcp
Class MetadataToolFactory
java.lang.Object
su.onno.mcp.MetadataToolFactory
- All Implemented Interfaces:
McpToolProvider
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, ProcessDefinitions processDefinitions, UiAccessService access, CatalogQueryService catalogQuery, DocumentQueryService documentQuery, RegisterQueryService registerQuery, CatalogCommandService catalogCommands, DocumentCommandService documentCommands, OnnoMcpProperties properties, io.modelcontextprotocol.json.McpJsonMapper json) MetadataToolFactory(MetadataRegistry registry, ProcessDefinitions processDefinitions, UiAccessService access, CatalogQueryService catalogQuery, DocumentQueryService documentQuery, RegisterQueryService registerQuery, CatalogCommandService catalogCommands, DocumentCommandService documentCommands, OnnoMcpProperties properties, UiProperties uiProperties, io.modelcontextprotocol.json.McpJsonMapper json) MetadataToolFactory(MetadataRegistry registry, UiAccessService access, CatalogQueryService catalogQuery, DocumentQueryService documentQuery, RegisterQueryService registerQuery, CatalogCommandService catalogCommands, DocumentCommandService documentCommands, OnnoMcpProperties 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, OnnoMcpProperties properties, io.modelcontextprotocol.json.McpJsonMapper json) -
MetadataToolFactory
public MetadataToolFactory(MetadataRegistry registry, ProcessDefinitions processDefinitions, UiAccessService access, CatalogQueryService catalogQuery, DocumentQueryService documentQuery, RegisterQueryService registerQuery, CatalogCommandService catalogCommands, DocumentCommandService documentCommands, OnnoMcpProperties properties, io.modelcontextprotocol.json.McpJsonMapper json) -
MetadataToolFactory
public MetadataToolFactory(MetadataRegistry registry, ProcessDefinitions processDefinitions, UiAccessService access, CatalogQueryService catalogQuery, DocumentQueryService documentQuery, RegisterQueryService registerQuery, CatalogCommandService catalogCommands, DocumentCommandService documentCommands, OnnoMcpProperties properties, UiProperties uiProperties, io.modelcontextprotocol.json.McpJsonMapper json)
-
-
Method Details
-
build
-
tools
- Specified by:
toolsin interfaceMcpToolProvider
-