# AI insights

## Get Discourse AI Topic Summary

`TOOL discourse_ai_get_topic_summary`

Retrieve an existing cached upstream Discourse AI topic summary, including algorithm and staleness evidence. Requires Discourse AI; this tool does not generate or claim complete MCP-authored output.

Authentication: no security requirement declared for this operation.

Parameters:

- `topic_id` (argument, integer, required)
  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_ai_get_topic_summary",
    "arguments": {
        "topic_id": 0
      }
  }
}
```

### TypeScript

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

### Python

```python
result = await session.call_tool("discourse_ai_get_topic_summary", arguments={
  "topic_id": 0
})
```


## Discourse AI Semantic Search

`TOOL discourse_ai_semantic_search`

Run Guardian-filtered Discourse AI semantic search and return bounded grouped post/topic evidence. Requires Discourse AI embeddings. Results are bounded and expose no fabricated page cursor.

Authentication: no security requirement declared for this operation.

Parameters:

- `query` (argument, string, required)
  Type: string
  
  minLength: 1

- `hyde` (argument, boolean, optional) - Explicitly disable HyDE. Omit to use the site's configured behavior; upstream does not reliably support enabling it per request.
  Type: boolean
  
  Explicitly disable HyDE. Omit to use the site's configured behavior; upstream does not reliably support enabling it per request.
  
  const: false

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_ai_semantic_search",
    "arguments": {
        "query": "string",
        "hyde": false
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "discourse_ai_semantic_search",
  "arguments": {
    "query": "string",
    "hyde": false
  }
});
```

### Python

```python
result = await session.call_tool("discourse_ai_semantic_search", arguments={
  "query": "string",
  "hyde": false
})
```


## List Discourse AI Sentiment Posts

`TOOL discourse_ai_list_sentiment_posts`

List staff-visible posts classified positive, negative, or neutral by Discourse AI for an exact category/tag and date window. Classification is model output, not proof of tone, satisfaction, risk, or an argument.

Authentication: no security requirement declared for this operation.

Parameters:

- `group_by` (argument, string, required)
  Type: string
  
  enum: ["category","tag"]

- `group_value` (argument, string, required)
  Type: string
  
  minLength: 1

- `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}$"

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

- `offset` (argument, integer, optional)
  Type: integer
  
  minimum: 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_ai_list_sentiment_posts",
    "arguments": {
        "group_by": "category",
        "group_value": "string",
        "start_date": "string",
        "end_date": "string",
        "limit": 1,
        "offset": 0
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "discourse_ai_list_sentiment_posts",
  "arguments": {
    "group_by": "category",
    "group_value": "string",
    "start_date": "string",
    "end_date": "string",
    "limit": 1,
    "offset": 0
  }
});
```

### Python

```python
result = await session.call_tool("discourse_ai_list_sentiment_posts", arguments={
  "group_by": "category",
  "group_value": "string",
  "start_date": "string",
  "end_date": "string",
  "limit": 1,
  "offset": 0
})
```
