# Analytics

## List Reports

`TOOL discourse_list_reports`

Discover staff-visible Discourse report identifiers and metadata. The catalog is authoritative because core and plugins can add or hide reports.

Authentication: no security requirement declared for this operation.

Declared MCP annotations:

```json
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": true
}
```

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "discourse_list_reports",
    "arguments": {}
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "discourse_list_reports",
  "arguments": {}
});
```

### Python

```python
result = await session.call_tool("discourse_list_reports", arguments={})
```


## Get Report

`TOOL discourse_get_report`

Execute one discovered staff-visible Discourse report with dates, facets, typed filters, limit, and upstream caching. This exposes existing reports, not arbitrary SQL.

Authentication: no security requirement declared for this operation.

Parameters:

- `report_type` (argument, string, required)
  Type: string
  
  pattern: "^[a-z0-9_]+$"

- `start_date` (argument, string, optional)
  Type: string
  
  pattern: "^\\d{4}-\\d{2}-\\d{2}$"

- `end_date` (argument, string, optional)
  Type: string
  
  pattern: "^\\d{4}-\\d{2}-\\d{2}$"

- `facets` (argument, Array<string>, optional)
  Type: Array<string>
  
  maxItems: 20
  
  Items:
    Type: string
    
    minLength: 1

- `filters` (argument, object, optional)
  Type: object
  
  Additional properties: 
    Type: string | number | boolean | Array<string | number | boolean>
    
    anyOf:
      Type: string
    
      Type: number
    
      Type: boolean
    
      Type: Array<string | number | boolean>
      
      Items:
        Type: string | number | boolean

- `limit` (argument, integer, optional)
  Type: integer
  
  minimum: 1
  
  maximum: 50

- `cache` (argument, boolean, optional)
  Type: boolean

Declared MCP annotations:

```json
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": true
}
```

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "discourse_get_report",
    "arguments": {
        "report_type": "string",
        "start_date": "string",
        "end_date": "string",
        "facets": [
          "string"
        ],
        "filters": {},
        "limit": 1,
        "cache": true
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "discourse_get_report",
  "arguments": {
    "report_type": "string",
    "start_date": "string",
    "end_date": "string",
    "facets": [
      "string"
    ],
    "filters": {},
    "limit": 1,
    "cache": true
  }
});
```

### Python

```python
result = await session.call_tool("discourse_get_report", arguments={
  "report_type": "string",
  "start_date": "string",
  "end_date": "string",
  "facets": [
    "string"
  ],
  "filters": {},
  "limit": 1,
  "cache": true
})
```


## Get Solved Support Dashboard

`TOOL discourse_get_support_dashboard`

Get the staff Solved support dashboard. Requires Discourse Solved. 'Unanswered' means unsolved with no qualifying regular reply, not no reply from a configured support team.

Authentication: no security requirement declared for this operation.

Parameters:

- `start_date` (argument, string, optional)
  Type: string
  
  pattern: "^\\d{4}-\\d{2}-\\d{2}$"

- `end_date` (argument, string, optional)
  Type: string
  
  pattern: "^\\d{4}-\\d{2}-\\d{2}$"

- `category_ids` (argument, Array<integer>, optional)
  Type: Array<integer>
  
  maxItems: 100
  
  Items:
    Type: integer
    
    exclusiveMinimum: 0

Declared MCP annotations:

```json
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": true
}
```

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "discourse_get_support_dashboard",
    "arguments": {
        "start_date": "string",
        "end_date": "string",
        "category_ids": [
          0
        ]
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "discourse_get_support_dashboard",
  "arguments": {
    "start_date": "string",
    "end_date": "string",
    "category_ids": [
      0
    ]
  }
});
```

### Python

```python
result = await session.call_tool("discourse_get_support_dashboard", arguments={
  "start_date": "string",
  "end_date": "string",
  "category_ids": [
    0
  ]
})
```
