‹ 首页

querying-well-data

@wellapp-ai · 收录于 5 天前 · 上游提交 1 个月前

How to query a Well workspace correctly — discover the schema first, then query the right root. Use whenever the user asks about their invoices, companies, contacts, bank transactions, accounts, or accounting ledger in Well, or before writing any well_query_records call.

适合你,如果你使用 Well 管理财务和业务数据,需要快速查询。

/ 通过 npx 安装 校验哈希
npx oh-my-skill add wellapp-ai/well/querying-well-data
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- wellapp-ai/well/querying-well-data
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify wellapp-ai/well/querying-well-data
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
340GitHub stars
~584上下文体积 · 单文件
索引托管

怎么用

商店整理自技能原文 · 版本 782601c · 表述以原文为准
它做什么

安装后,Claude 在回答关于 Well 工作区的财务数据前,会先调用 well_get_schema 获取数据结构,再使用 well_query_records 精准查询,避免猜字段名。

什么时候触发

当用户询问 Well 中的发票、公司、联系人、银行交易、账户或会计分类账时触发;也用于编写 well_query_records 调用之前。

装好后可以这样说
Claude 会先获取发票的 schema,然后查询记录。
技能原文 SKILL.md作者撰写 · MIT · 782601c

Querying Well data

Well exposes a workspace's financial graph through three MCP tools:

  • well_get_schema() — list every available root (entity type).
  • well_get_schema({ root }) — list the fields available on one root, with types and semantic context.
  • well_query_records({ root, fields, whereClause?, orderBy?, limit? }) — read rows.
  • well_get_entity({ root, id }) — fetch one record by id.
The one rule: discover before you query

Always call well_get_schema(root) first, pick the fields you need from what it returns, then call well_query_records. Field paths are arrays: "invoices.issuer.name"["invoices", "issuer", "name"]. Do not guess field names — they vary by root and are documented in the schema response (each field carries a type and often a context explaining what it means).

The roots you can read

Calling well_get_schema() with no argument returns the full set. It includes far more than invoices and companies — in particular the accounting graph:

  • Commercial documents: invoices, invoice_items, invoice_transactions
  • Parties: companies, people, payment_means
  • Banking: accounts, transactions, account_balances
  • Accounting graph (read-only, posted by Well's pipelines): ledger_accounts, journals, journal_entries
  • Reference: tax_rates, exchange_rates, categories, connectors
  • Workspace: memberships, tasks, workspace_connectors

If you are about to answer a financial question by reconstructing it from raw invoices, stop and check well_get_schema() first — the posted ledger (journal_entries, ledger_accounts) is almost always the correct, more accurate source. See the well:compte-de-resultat and well:balance-sheet skills.

Filtering

whereClause is a Hasura-style boolean expression. Use the operator the field's type allows (from the schema):

  • numeric / date_eq, _gt, _lt, _gte, _lte
  • enum_eq, _neq, _in, _nin, _is_null
  • text_eq, _like, _ilike
  • relations → nest: { "issuer": { "name": { "_ilike": "%acme%" } } }
Gotchas
  • Reads are scoped to the authenticated workspace automatically — you never pass a workspace id.
  • Select the specific fields you need (5–15), not everything — it is faster and cheaper.
  • Amounts on commercial documents are in the document currency; check the schema context for currency fields before summing across currencies (see exchange_rates).
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。