Convex Insights

作者 get-convex2cfe645c87f9無授權條款63 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫6 天前更新

Query a running Convex app's logs + health in natural language (official MCP): failures, slow/expensive functions, deploy causality — scoped, evidence-backed, with a dashboard deep link.

僅含說明DevOps & Cloud
AI 產生的概覽

用自然語言查詢執行中 Convex 應用程式的日誌與健康狀態,給出有範圍、有證據並附儀表板連結的答案。

功能
包裝官方 Convex MCP 的唯讀工具(logs、insights、functionSpec、status),回答關於某個部署的維運問題。它先查出真實的函式名稱與部署版本,再取得一段有界的近期日誌視窗,並在用戶端過濾成三種檢視之一:失敗、健康狀態或單一請求的呼叫鏈。每個答案包含一行結論、支撐計數與一筆代表性堆疊或日誌行,以及供人工核驗的儀表板深層連結。它一律唯讀,並把效能、成本、程式碼缺陷與監控類後續問題轉交其他能力。
適用情境
適用於詢問 Convex 部署中什麼在報錯、某次呼叫為何失敗、某次部署是否造成問題,或部署近期有哪些健康事件。適合以可核驗結論收尾、而非直接傾倒原始日誌的維運排查問題。
執行需求
需要存取執行中的 Convex 部署,以及官方 Convex MCP 唯讀工具(logs、insights、functionSpec、status);insights 僅限雲端 dev/prod 且需使用者驗證。此技能不附帶指令碼,僅為指示說明。
<!-- GENERATED from convex-agents content/capabilities/convex-insights.json — do not edit by hand. -->

Query logs + health in natural language

The deployment already records what happened; the agent just has to ask well. This capability is a disciplined wrapper over the official Convex MCP's read tools (logs, insights, functionSpec, status) that turns operational questions into narrow, evidence-returning queries and hands back answers a human can one-click verify in the dashboard. The discipline is copied from the observability MCP surface that works best in the wild: discover fields before querying, three views not fifteen tools, token-frugal output, and a dashboard deep link on every answer.

Workflow

  1. GUARD: deploy-guard step 0-1 — identify + announce which deployment is being read. Reading logs/insights is read-only; never enable prod mutation flags for an insights pass.
  2. DISCOVER before you query — never guess identifiers. Use functionSpec to list the real function names and status for the deployment/version. Note the tool limits up front: logs takes only --history <n> (a COUNT, not a time window), --success, --jsonl, --prod, --deployment — there is NO server-side status/function/requestId/time filter; insights has no function filter and is cloud dev/prod + user-auth only. So you fetch a recent window and filter CLIENT-SIDE.
  3. PICK ONE OF THREE VIEWS and fetch the raw window, then filter locally:
    • failures view → logs --history <n> --jsonl, then locally keep failures + group by function + error message, returning counts + the first stack per group. Answers 'what's erroring', 'what failed after deploy'.
    • health view → insights (cloud only): the typed 72h read-limit / OCC events. Surface + rank them, but hand perf/cost ROOT-CAUSING and fixes to convex-advisor — emit those as pointer findings, do not own the perf-fix framing here.
    • trace view → logs --history <n> --jsonl then locally filter to one requestId/function to read the full execution. Answers 'why did THIS call fail'.
  4. SCOPE by fetching a bounded recent window (a sensible --history count) and filtering client-side to the function/status/requestId asked about; when the window is large, aggregate (counts by function/message) rather than dumping lines.
  5. ANSWER with (a) the one-line finding, (b) the evidence (counts + one representative stack/log line), and (c) WHEN POSSIBLE an agent-constructed dashboard deep link (dashboard.convex.dev, the deployment's Logs/Functions view) for human verification — no tool returns the link, so build it from the deployment name + function; never a raw log dump as the answer.
  6. CROSS-CHECK deploy causality when asked 'did my deploy break this': compare the failure onset (from the log timestamps) against the deployment version from status; correlate, don't assert.
  7. HAND OFF, don't fix here: a perf/cost cause → convex-advisor (which owns those fixes); a code defect → convex-reviewer/convex-authz; a live error to react to going forward → monitor/sentinel. Emit findings on the bus (specs/finding.schema.json) — primarily observability, with perf/cost as pointer findings to advisor — so a composite pass can pick them up.

Rules

  • Discover real function/field names (functionSpec/status) before filtering — never guess identifiers, never return a confusing empty result for a name the app doesn't have.
  • logs and insights have NO server-side status/function/requestId/time-window filter (logs takes only a --history COUNT; insights is cloud-only) — fetch a bounded recent window and filter CLIENT-SIDE; say so rather than implying params that don't exist.
  • One of three views per question (failures / health / trace) — don't fan out into many speculative tool calls.
  • No tool returns a dashboard link — construct it from the deployment name + function when possible for human verification; never answer with a raw log dump.
  • Read-only always: an insights pass runs no mutation and never enables prod mutation flags (deploy-guard discipline).
  • Stay a reader and defer perf/cost fixes to convex-advisor: emit primarily observability, route perf/cost as POINTER findings so advisor uniquely owns the perf-fix framing; forward-looking reaction goes to monitor/sentinel.

來源與署名

來源:get-convex/agent-skills位於skills/convex-insights提交2cfe645

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架