toEntityTool
function toEntityTool( entity, operation, context): Tool;Defined in: core/src/entity/entity.tool.ts:80
Binds one of an entity’s operations into a neutral Tool over a
Services container — the entity counterpart of toTool for actions.
Built with defineTool rather than as a plain object, unlike the action
version: defineAction already validates at the action boundary, but
defineEntityType validates nothing, and a tool invoked from a sandbox or an
agent never passes through the server’s request validator. Without this the
schemas would be decoration everywhere except HTTP.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
entity |
EntityType |
operation |
EntityOperation |
context |
{ services: Services; } |
context.services |
Services |