> ## Documentation Index
> Fetch the complete documentation index at: https://docs.melso.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Melso product MCP: https://melso.ai/api/mcp (OAuth; one company per grant). REST: https://melso.ai. Documentation-search MCP: https://docs.melso.ai/mcp. The docs search server does not act on customer accounts.
>
> Use the live tool schema and respect company membership. Ask the person to authorize the exact fiscal document version in the signed-in app. A professional prepares and files included returns after authorization; AI does not file alone. A prepared file or approval receipt is not evidence of filing. Never claim completion from an accepted Task or Run. Keep credentials out of chat and logs. Agents features are internal or by private invitation.

# tasks_control

> Input, output and examples for the tasks_control MCP tool.

<Info>Melso Agents is available only internally or by private invitation. Agents-specific features require existing access. For the autónomo fiscal service, see [Get started](/essentials/quickstart).</Info>

Act on a Task without adding a message: start runs its saved input, pause/resume/cancel\_run control a Run (pause and cancel\_run need its exact run\_id), answer/decline resolve a pending\_interactions card from tasks\_get. To add instructions, use tasks\_send. Only the person can approve or connect an app. Each action accepts only its own fields.

**Availability:** Autónomo / Empresa / Agents invitation.

**Catalog:** Core (`tools/list`).

The live catalog is authoritative: company type, membership, plan, connected apps and execution context can narrow this contract. [Understand access](/mcp/permissions).

## Input

### Agents schema

```json theme={null}
{
  "additionalProperties": false,
  "properties": {
    "action": {
      "enum": [
        "start",
        "pause",
        "resume",
        "cancel_run",
        "answer",
        "decline"
      ],
      "type": "string"
    },
    "answers": {
      "description": "Answer values keyed by question ID.",
      "type": "object"
    },
    "audit_text": {
      "type": "string"
    },
    "execution": {
      "additionalProperties": false,
      "properties": {
        "harness": {
          "description": "Harness from workspace_status execution.",
          "enum": [
            "codex",
            "claude",
            "cursor",
            "pi",
            "melso"
          ],
          "type": "string"
        },
        "model": {
          "type": "string"
        },
        "service_tier": {
          "type": "string"
        },
        "thinking_level": {
          "type": "string"
        }
      },
      "required": [
        "harness"
      ],
      "type": "object"
    },
    "id": {
      "description": "Task UUID or identifier.",
      "type": "string"
    },
    "interaction_id": {
      "description": "Pending interaction UUID.",
      "type": "string"
    },
    "run_id": {
      "description": "Exact Run UUID; required for pause and cancel_run.",
      "type": "string"
    }
  },
  "required": [
    "id",
    "action"
  ],
  "type": "object"
}
```

### Autónomo / Company schema

```json theme={null}
{
  "additionalProperties": false,
  "properties": {
    "action": {
      "enum": [
        "start",
        "pause",
        "resume",
        "cancel_run",
        "answer",
        "decline"
      ],
      "type": "string"
    },
    "answers": {
      "description": "Answer values keyed by question ID.",
      "type": "object"
    },
    "audit_text": {
      "type": "string"
    },
    "id": {
      "description": "Task UUID or identifier.",
      "type": "string"
    },
    "interaction_id": {
      "description": "Pending interaction UUID.",
      "type": "string"
    },
    "run_id": {
      "description": "Exact Run UUID; required for pause and cancel_run.",
      "type": "string"
    }
  },
  "required": [
    "id",
    "action"
  ],
  "type": "object"
}
```

### Managed run / agents / Managed run / company / Managed run / freelancer schema

```json theme={null}
{
  "additionalProperties": false,
  "properties": {
    "action": {
      "enum": [
        "pause",
        "resume",
        "cancel_run"
      ],
      "type": "string"
    },
    "id": {
      "description": "Task UUID or identifier.",
      "type": "string"
    },
    "run_id": {
      "description": "Exact Run UUID; required for pause and cancel_run.",
      "type": "string"
    }
  },
  "required": [
    "id",
    "action"
  ],
  "type": "object"
}
```

## Output

The receipt for the selected control action. Starting or resuming work returns execution state; cancelling, pausing, or answering an interaction returns the corresponding updated state. Inspect the Task after the action.

The result uses MCP `content` blocks; JSON payloads are encoded in text and may also appear in `structuredContent`. Check `isError` before reading a success payload. The server does not currently declare an `outputSchema`, so treat additional fields as extensible. [Result handling](/mcp/results).

## Example

Use an OAuth access token issued for this MCP resource (a Run token for Run-only tools). Replace example identifiers with values from your own account. Write actions change data.

```bash theme={null}
curl --fail-with-body https://melso.ai/api/mcp \
  -H "Authorization: Bearer $MELSO_MCP_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  --data-binary @- <<'JSON'
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "tasks_control",
    "arguments": {
      "action": "resume",
      "id": "11111111-1111-4111-8111-111111111111"
    }
  }
}
JSON
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.