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のその他のスキル

account
convex-dev
Convexアカウントを作成または確認します。ユーザーが新しいアカウントを設定したい場合、アカウントの詳細を確認したい場合、またはキーを管理したい場合に使用します。
build-convex
convex-dev
Convexプロジェクトをソースからビルドします。コントリビューターがConvexをコンパイル、テスト、またはパッケージ化したい場合に使用します。
cad3-encoding
convex-dev
CAD3エンコーディング形式 — セル、埋め込み参照とブランチ参照、値ID、有効性ルール。エンコーダー、デコーダー、シリアライゼーション、ハッシュ化、その他…に取り組む際に使用します。
cad-reference
convex-dev
Convexアーキテクチャ文書(CAD)の索引。Convexの規範仕様であり、プロトコルを変更する前にどのCADがどのサブシステムを管理しているかを確認するために使用する、…
cns
convex-dev
Convex Name System(CNS)名の解決または登録を行います。ユーザーがCNS名を検索したい、新しい名前を登録したい、または名前のターゲットを更新したい場合に使用します。
convex-db
convex-dev
Convex DB(ラティスベースのSQLデータベース)を使用します。ユーザーがクエリを作成したり、JDBCやPostgreSQLクライアント経由で接続したり、テーブルを作成したり、データの挿入・クエリを行う際に役立ちます。
convex-lisp
convex-dev
Convex Lisp言語リファレンス — CVMの規約、ライブラリコードの呼び出し、アクター定義、ジュースとエラーコード。CVMソースの作成やデバッグ時に使用。
deploy
convex-dev
アクター(スマートコントラクト)をConvexネットワークにデプロイします。ユーザーがエクスポートされた関数を持つ新しいオンチェーンアクターを作成したい場合に使用します。