# Morph Tools

Makes Morph tools available to downstream AI nodes. Use it when an agent should apply code-like edits quickly or search selected workspace resources: documents, tables, workflows, and memories.

## Configuration

**Connection** - Morph connection **id**. Use `list_connections`; pass the returned ULID `id`, not the connection name.

**Fast apply** - Emits `morph_fast_apply`.

**WarpGrep** - Emits `morph_warp_grep`.

**Index** - Workspace resource families available to search: `documents`, `tables`, `workflows`, `memories`.

At least one tool must be enabled. WarpGrep requires at least one resource family.

## Inputs & Outputs

**Input:** `input` is required by workflow shape and ignored.

**Output:** `tools` is an array of tool descriptors. Connect it to an AI node's tools input.

## Tool names

Every emitted tool is called `<handle>__<tool>`, where `<handle>` is the fixed handle of the
configured Morph connection, for example `morph__morph_fast_apply`. The prefix is there even when
the workspace has a single Morph connection. Renaming the connection never changes it. The
headings below are the `<tool>` part.

## Emitted Tool Contracts

### `morph_fast_apply`

Input:

```json
{
  "instruction": "Apply the requested change",
  "code": "original text",
  "update": "requested update",
  "model": "auto"
}
```

`model` accepts `auto`, `morph-v3-fast`, or `morph-v3-large`.

Output:

```json
{
  "merged_code": "updated text"
}
```

Use when the agent has an original block plus a requested edit and needs the merged result.

### `morph_warp_grep`

Input:

```json
{
  "query": "Find workspace resources about quarterly planning"
}
```

Output contains Morph search results for matching workspace resources. Results include enough context for the AI node to decide which documents, tables, workflows, or memories are relevant.

Use when the agent needs fast semantic search across selected workspace resources.

## Example

```
[Manual Trigger]
    ↓
[Morph Tools: Fast apply + WarpGrep over documents/memories]
    ↓ tools
[AI Agent]
```
