# Tool Provider

Selects configured **tool groups** for an AI Agent or AI Conversation. Connect `output` to the AI
node's `tools` input. The provider packages tools; it does not invoke their operations.

## Configuration

`tools` is a `ToolSelectionConfig`: an array of `{ "group": "...", "config": { ... } }` selections.
Choose a group, configure its required connections or resources, and enable only the operations the
agent needs. Use the group's catalog schema for its exact configuration; do not assume every group
has the same fields. An empty array provides no tools.

Each selection entry also carries two optional entry-level fields, beside `group` and `config`:

- `enabled` — switches the entry on or off without discarding its configuration. Defaults to `true`;
  a disabled entry emits no tools and is not validated. It belongs on the entry, never inside
  `config`.
- `name` — a display label for the entry, so two instances of one group can be told apart. It is
  not a tool name and the model never sees it.

For example, this provides one workflow as a tool:

```json
{
  "tool_provider": {
    "tools": [
      {
        "group": "workflow_tools",
        "config": {
          "workflow": "<workflow id>",
          "start_node": "<tool input node id>",
          "name": "summarize_inbox"
        }
      }
    ]
  }
}
```

Do not put individual externally tagged tools such as `{ "SomeTool": { ... } }` in this field.
Those are the **output socket** format, not the provider's saved configuration. Do not wrap the
selection array in a `groups` object or encode `config` as a JSON string.

## Group Picker

The node schema declares `type: tool_selection`, `surface: workflow`, and a `groups` allowlist for
new choices. The allowlist is every registered group offered on the Workflow surface whose
configuration does not select a connection. Groups whose tools run through a connection, such as
Gmail, Linear, Notion, GitHub, Firecrawl, or Tavily search, are offered by
**Connection Tool Provider** (`connection_tool_provider`) instead.

This is picker curation, not a runtime capability restriction. An existing explicit selection outside
that list, including a connection-backed group saved in this node before, remains editable and valid
if its group, concrete tools, and configuration are compatible. Catalog availability does not enable
anything automatically. A group's operation flags and resource configuration still decide which
tools are emitted.

A selection can contain the same group more than once, with independent configurations. Each
emitted callable name must remain unique. `Tool Workflow` (`workflow_tools`) configures one workflow
tool per instance: `workflow`, `start_node`, `name` (the tool name the model calls), and optional
`context` (fixed data handed to the workflow, never seen by the model). The tool's description and
argument schema come from the target's Tool Input node. Add another instance for another workflow
tool.

## Surfaces and Output

`workflow` accepts tools declared `general` plus tools declared `workflow`. A surface describes the
execution handling a tool expects, not permission to access a workspace and not an automatic grant.

Agents sessions and Spawn Agent Tool children accept only `general` tools. Do not feed Yield
to a child: it requires the workflow's own AI node and graph-controlled handoff. The General Agents
group itself can be selected for agents, MCP, or workflow use when explicitly configured.

`output` carries the materialized array of individual, externally tagged configured tools accepted
by AI `tools` sockets. Specialized tool nodes still emit that same raw configured-tool format; do
not convert their output to `{group, config}` selections.

## Wiring

Connect a trigger or preceding node to this node's `input` so it executes, then connect its `output`
to the AI node's `tools`. Supply the AI's prompt/data through its own input.

When combining several tool sources, use **Flatten** to combine their arrays. Multiple edges into
one socket do not concatenate their values.

Use direct tools for bounded reads and explicit simple actions. Prefer **Subworkflow Tool** for a
deterministic business process and **Yield Tool** when the graph must handle a request after the AI
run finishes.
