# getDetectionInfo

This method returns useful information about the mental command training or the facial expression training.

## Parameters

| Name      | Type     | Required | Description                                    |
| --------- | -------- | -------- | ---------------------------------------------- |
| detection | `string` | yes      | Must be "mentalCommand" or "facialExpression". |

## Result

The result is an object containing information about the detection you specified in the parameters.

| Name      | Type               | Description                                                                                                                                               |
| --------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| actions   | `array of strings` | The actions that this detection can detect.                                                                                                               |
| controls  | `array of strings` | The list of the status you can use when you call the [training](/cortex-api/bci/training.md) method.                                                      |
| events    | `array of strings` | The events you can receive in the "sys" [data stream](/cortex-api/data-subscription.md) when you train this detection.                                    |
| signature | `array of strings` | The different types of signature that you can get or set with [facialExpressionSignatureType](/cortex-api/advanced-bci/facialexpressionsignaturetype.md). |

## Examples

### Mental command

{% tabs %}
{% tab title="Request" %}

```javascript
{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "getDetectionInfo",
    "params": {
        "detection": "mentalCommand"
    }
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "actions": [
            "neutral",
            "push",
            "pull",
            "lift",
            "drop",
            "left",
            "right",
            "rotateLeft",
            "rotateRight",
            "rotateClockwise",
            "rotateCounterClockwise",
            "rotateForwards",
            "rotateReverse",
            "disappear"
        ],
        "controls": [
            "start",
            "accept",
            "reject",
            "erase",
            "reset"
        ],
        "events": [
            "MC_Started",
            "MC_Succeeded",
            "MC_Failed",
            "MC_Completed",
            "MC_DataErased",
            "MC_Rejected",
            "MC_Reset",
            "MC_AutoSamplingNeutralCompleted",
            "MC_SignatureUpdated"
        ],
        "signature": []
    }
}
```

{% endtab %}
{% endtabs %}

### Facial expression

{% tabs %}
{% tab title="Request" %}

```javascript
{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "getDetectionInfo",
    "params": {
        "detection": "facialExpression"
    }
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "actions": [
            "neutral",
            "blink",
            "winkL",
            "winkR",
            "horiEye",
            "surprise",
            "frown",
            "smile",
            "clench",
            "laugh",
            "smirkLeft",
            "smirkRight"
        ],
        "controls": [
            "start",
            "accept",
            "reject",
            "erase",
            "reset"
        ],
        "events": [
            "FE_Started",
            "FE_Succeeded",
            "FE_Failed",
            "FE_Completed",
            "FE_DataErased",
            "FE_Rejected",
            "FE_Reset"
        ],
        "signature": [
            "universal",
            "trained"
        ]
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://emotiv.gitbook.io/cortex-api/bci/getdetectioninfo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
