query

作成者: convex-dev

Convexネットワーク上で読み取り専用のCVMクエリを実行します。オンチェーンの状態を読み取る、残高を確認する、アカウントを検索する、Convex Lispを評価する場合に使用します…

npx skills add https://github.com/convex-dev/convex --skill query

Query Convex State

Queries are read-only, free and instant. They never modify state and need no key, so prefer a query over a transaction whenever you only need to read.

Expression: $0 Address (optional): $1 — the account context for the query (e.g. #13)

See the convex-lisp skill for CVM conventions and error codes.

How to Run It

With a Convex MCP server configured (tool names look like mcp__<server>__query), use its query tool. The server is configured per user, not by this repository — do not assume it is present.

Otherwise use the CLI, which always works from a built convex.jar:

java -jar convex.jar client query '(balance #13)'
java -jar convex.jar client query --host <host> --port <port> '(balance #13)'
java -jar convex.jar client query -a #13 '*balance*'

-a / --address sets the account context. Against a local network started with the local-network skill, pass --host localhost --port <PORT>.

Common Queries

TaskExpression
Coin balance(balance #13)
Own balance*balance*
Account info(account #13)
Token balance(@convex.fungible/balance #TOKEN #USER)
Token supply(@convex.fungible/total-supply #TOKEN)
Lookup symbol(lookup #ADDR 'symbol)
Full state*state* (large!)

lookup needs a literal symbol as its last argument — it is resolved at compile time, so a computed symbol fails with :COMPILE.

Present balances in CVM units (e.g. "1.5 CVM", not "1500000000 copper").

convex-devのその他のスキル

convex-lisp
convex-dev
Convex Lisp言語リファレンス — CVMの規約、ライブラリコードの呼び出し、アクター定義、ジュースとエラーコード。CVMソースの作成やデバッグ時に使用。
ecosystem
convex-dev
Convexエコシステムにおけるオリエンテーション — どのリポジトリに何が含まれているか、仕様書とドキュメントがどこにあるか、どのクライアントライブラリが存在するか。コンテキストが必要なときに使用します…
local-network
convex-dev
開発用にローカルのConvexテストネットワークを実行します。ライブネットワークに対して変更をテストする場合、ピアの問題を再現する場合、またはリモートネットワークがない場合に使用します…
protocol-versions
convex-dev
プロトコルバージョン、マイグレーション、v1アップグレード — どのセマンティクスに対して記述するか、そしてネットワークをフォークせずにCVMの動作を変更する方法。使用する場面:…
etch
convex-dev
Etchストアを検査および保守する — Convexのコンテンツアドレス型データベース。ピアストレージの調査、破損の診断、ガベージコレクションなどを行う際に使用します…
juice
convex-dev
Juice会計 — CVMにおける計算と帯域幅のコスト。トランザクション実行コストの推論、:JUICE障害の診断、または…の際に使用します。
trust
convex-dev
Trust monitors — Convexの合成可能なオンチェーン認可モデルです。アクセス制御の記述、アクター関数の制限、誰がミントできるかの定義などの際に使用します…
memory
convex-dev
メモリの会計処理と許容量 — オンチェーンストレージのコスト、およびそれを最小化・回収する方法。状態の増大について推論する際や、診断する際に使用します…