The /insights endpoints expose Armature’s MCP usage analytics: how agents are using your MCP source, which intents recur, where searches fail, and what individual sessions did. Use them to feed BI dashboards, build custom alerts on unmet demand, or export session traces to your own data store.
All paths are relative to the REST API base URL. All requests require an API key.
Insights endpoints require MCP Analytics to be enabled for your organization. Requests against a disabled organization return 403 with error.code = feature_disabled.
Overview KPIs
Returns the headline KPIs, trend lines, top topics, and top failed-search clusters for the selected window.
| Query parameter | Description |
|---|
range | 24h, 7d, 30d, or 90d. Defaults to 7d. |
curl "https://your-org.armature.app/api/armature/v1/insights/overview?range=7d" \
-H "Authorization: Bearer amt_<key-id>_<secret>"
List topics
Lists recurring MCP usage topics and unmet-demand groups.
| Query parameter | Description |
|---|
range | 24h, 7d, 30d, or 90d. Defaults to 7d. |
sort | volume, frustration, or trend. |
limit | Maximum topics to return. |
Get a topic
GET /insights/topics/{id}
Returns the topic record with sample sessions and related failed searches.
Update a topic
PATCH /insights/topics/{id}
Rename a topic, flag it as unmet demand, or archive it. Requires editor, admin, or owner.
Request body
| Field | Type | Description |
|---|
label | string | New display label. |
is_unmet_demand | boolean | Flag the topic as unmet demand. |
archived | boolean | Archive or unarchive the topic. |
curl https://your-org.armature.app/api/armature/v1/insights/topics/{id} \
-X PATCH \
-H "Authorization: Bearer amt_<key-id>_<secret>" \
-H "Content-Type: application/json" \
-d '{ "is_unmet_demand": true }'
List failed searches
Lists failed SDK searches and suggested API gaps.
| Query parameter | Description |
|---|
range | 24h, 7d, 30d, or 90d. Defaults to 7d. |
limit | Maximum clusters to return. |
Get a failed search cluster
GET /insights/searches/{id}
Returns the cluster detail and a sample of sessions where the search appeared.
List sessions
Lists MCP analytics sessions for the selected window.
| Query parameter | Description |
|---|
range | 24h, 7d, 30d, or 90d. Defaults to 7d. |
view | all, high_frustration, repeat, or flagged. |
intent | Filter by raw intent label. |
search_miss | Filter by exact failed-search text. |
limit | Maximum sessions to return. |
curl "https://your-org.armature.app/api/armature/v1/insights/sessions?view=high_frustration&range=7d" \
-H "Authorization: Bearer amt_<key-id>_<secret>"
Get a session trace
GET /insights/sessions/{id}/trace
Returns the full session trace — events, tool calls, searches, logs, and classifications. Use this to drill into a specific session surfaced by the overview, topics, or sessions list.