Skip to content
Prompty

EngineToolPort

Executes authorized model-requested tools at a runtime cancellation boundary.

---
title: EngineToolPort
config:
  look: handDrawn
  theme: colorful
  class:
    hideEmptyMembersBox: true
---
classDiagram
    class EngineToolPort {
      <<protocol>>
        +execute(request: ModelToolRequest) ModelToolResult [async-capable, runtime-cancellable]
    }

The following helper methods are declared via @method and must be implemented by every runtime. The schema declares the logical protocol contract; each runtime maps async-capable methods to idiomatic sync/async shapes for that language.

Name Signature Runtime shape Description
execute execute(request: ModelToolRequest) -> ModelToolResult async-capable, runtime-cancellable Execute one authorized model-requested tool