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

# Connect to Mistral

> Use V5 MCP tools in Mistral Le Chat and the Mistral API.

# Connect to Mistral

Mistral Le Chat and the Mistral API both support MCP tools. Connect V5 to access all 34 GTM tools from Mistral's models.

<Info>
  Mistral MCP integration is in validation status — behavior may differ between Le Chat (consumer), Mistral Studio (enterprise), and the Mistral API. The instructions below cover the API path, which is confirmed stable.
</Info>

## Option A — Mistral API (function calling)

The Mistral API supports tool/function calling with any V5 tool schema. V5 tools are exposed as standard JSON Schema function definitions.

### Get tool schemas

V5 exposes its tool schemas at the MCP endpoint. For Mistral API integration, retrieve them:

```bash theme={null}
curl https://ascend-gateway-v5.ascendgtm.workers.dev/mcp \
  -H "Authorization: Bearer your-bearer-token" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"tools/list","params":{},"id":1}'
```

Use the returned schemas in Mistral API `tools` array.

### Example call

```python theme={null}
import mistralai

client = mistralai.Mistral(api_key="your-mistral-key")

# V5 tools retrieved from /mcp tools/list endpoint
tools = [...]  # paste schemas here

response = client.chat.complete(
    model="mistral-large-latest",
    messages=[{"role": "user", "content": "How many new HubSpot leads this week?"}],
    tools=tools,
)
```

## Option B — Mistral Le Chat (MCP connector)

Le Chat's MCP connector support is rolling out to Pro and Enterprise accounts.

1. Open [le.chat](https://le.chat) → **Settings** → **Connectors**
2. Click **Add MCP connector**
3. Enter URL: `https://ascend-gateway-v5.ascendgtm.workers.dev/mcp`
4. Select **Bearer token** auth and enter your token
5. Save — Le Chat will discover all 34 tools

## LLM-proxy compatibility

V5 exposes an OpenAI-compatible `/v1/chat/completions` endpoint. Use it with any Mistral-compatible client that accepts an OpenAI base URL:

```python theme={null}
from openai import OpenAI

client = OpenAI(
    base_url="https://ascend-gateway-v5.ascendgtm.workers.dev/v1",
    api_key="your-v5-bearer-token",
)

response = client.chat.completions.create(
    model="mistral-large-latest",  # passed through to AI Gateway
    messages=[{"role": "user", "content": "Summarize this week's pipeline"}],
)
```

## Troubleshooting

**"No tools available" in Le Chat**\
Connector support is gated to Pro/Enterprise accounts. Check your account tier under Settings → Plan.

**Tool call fails with VALIDATION\_ERROR**\
Every V5 tool call requires a `rationale` field. Add it to your tool parameters:

```json theme={null}
{"rationale": "Checking pipeline for weekly review", "object_type": "deals", ...}
```
