# Upsert child agent run

Tool: `veryfront__upsert_child_agent_run`

Create or recover the child run of a parent run tool call.

## Arguments

| Name            | Type                                   | Required | Description                                                                           |
| --------------- | -------------------------------------- | -------- | ------------------------------------------------------------------------------------- |
| `parent_run_id` | string · min length 1 · max length 128 | Yes      | Run that delegates the work; the caller must hold its current execution credential.   |
| `tool_call_id`  | string · min length 1 · max length 128 | Yes      | Tool call in the parent run that starts the child; the pair identifies the child run. |
| `request`       | object                                 | Yes      | Child agent and the input to start it with.                                           |

## Responses

| Status | Description                                           |
| ------ | ----------------------------------------------------- |
| 200    | The tool ran; its output is result.structuredContent. |

## Call it

```bash
curl -X POST -N "https://api.veryfront.com/mcp" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "veryfront__upsert_child_agent_run",
    "arguments": {
      "parent_run_id": "string",
      "tool_call_id": "string",
      "request": {}
    }
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"child_conversation_id\":\"00000000-0000-0000-0000-000000000000\",\"child_run_id\":\"string\",\"child_message_id\":\"00000000-0000-0000-0000-000000000000\",\"agent_id\":\"string\",\"duplicate\":false}"
      }
    ],
    "structuredContent": {
      "child_conversation_id": "00000000-0000-0000-0000-000000000000",
      "child_run_id": "string",
      "child_message_id": "00000000-0000-0000-0000-000000000000",
      "agent_id": "string",
      "duplicate": false
    }
  }
}
```
