# Update runtime service

Tool: `veryfront__update_agent_push_runtime_service`

Drain or resume a runtime service. Requires project.runtime.manage.

## Arguments

| Name                | Type                  | Required | Description                                                                                                                                                                                                                                                                    |
| ------------------- | --------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `project_reference` | string · min length 1 |          | Project that owns the service. A source project may drain its shared runtime grant using its own project reference. Only a project service is found; a global service answers not\_found.                                                                                      |
| `service_id`        | string · uuid         | Yes      | Runtime service to change. Draining stops selection for new work and, for managed source connections, revokes queued and child dispatch; either project may revoke. Resuming re-enables selection; managed source connections require project.runtime.manage in both projects. |
| `availability`      | string                | Yes      | active makes the runtime service available for selection; drained stops selecting it for new work. For a managed source connection, drained also revokes queued and child dispatch. One of `active`, `drained`.                                                                |

## 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__update_agent_push_runtime_service",
    "arguments": {
      "service_id": "00000000-0000-0000-0000-000000000000",
      "availability": "active"
    }
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"id\":\"00000000-0000-0000-0000-000000000000\",\"service_name\":\"string\",\"service_key\":\"string\",\"scope_kind\":\"global\",\"project_id\":\"00000000-0000-0000-0000-000000000000\",\"availability\":\"active\",\"connection_status\":\"online\",\"runtime\":\"string\",\"region\":\"string\",\"last_seen_at\":\"string\"}"
      }
    ],
    "structuredContent": {
      "id": "00000000-0000-0000-0000-000000000000",
      "service_name": "string",
      "service_key": "string",
      "scope_kind": "global",
      "project_id": "00000000-0000-0000-0000-000000000000",
      "availability": "active",
      "connection_status": "online",
      "runtime": "string",
      "region": "string",
      "last_seen_at": "string"
    }
  }
}
```
