A tool edge is one whose target port is the tool port
An edge's kind is read from the port it plugs into, never from what the edge says about itself. A declared data.edgeType is for drawing the line, not for running it.
The rule
- An edge MUST be a tool edge when, and only when, its target handle ends with
-input-tool. - An edge MUST NOT be treated as a tool edge on any other ground.
- A
data.edgeTypeon an edge is an annotation: it MUST NOT change the edge's kind, MUST NOT change how the edge is validated, and MUST NOT change how the workflow runs. - Its value is open: an implementation MUST NOT refuse a workflow for a
data.edgeTypeit does not recognise.
What it means
The port an edge plugs into is the whole of its kind. Wiring a tool means plugging
into a node's tool port; nothing written on the edge itself can make an ordinary
connection a tool connection, or a tool connection an ordinary one.
data.edgeType survives as an annotation for whoever draws the workflow, so an
editor can, for example, draw tool edges dotted. A runtime never reads it, and a
validator never judges it, so a value nobody recognises is not an error. A surface
that styles an edge does best to style it from its kind, so a stale annotation
cannot draw a data edge as a tool edge.
Example
An edge declares itself a tool edge but plugs into an ordinary port:
{
"source": "search",
"target": "agent",
"targetHandle": "agent-input-context",
"data": { "edgeType": "tool_availability" }
}It is a data edge: search runs before agent and its output is delivered to
context. The same edge plugged into the tool port is a tool edge, with or
without the annotation:
{ "source": "search", "target": "agent", "targetHandle": "agent-input-tool" }