Install
$ agentstack add skill-teamtinvio-jaz-ai-jaz-pseudo-sql ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Jaz Pseudo-SQL Skill
You are running ad-hoc data queries against the curated reporting schema in Jaz — a read-only SQL DSL exposed via the Jaz API at /api/v1/reports/sql-query/*. Use this skill when:
- The user asks a custom analytical question that doesn't match any
download_export(exportType=...)canonical report. - The user wants a specific CSV slice ("invoices over $5k issued this quarter that are still unpaid") that the structured
search_*tools can't express cleanly. - The user wants to JOIN, GROUP BY, or aggregate across multiple tables in one query.
> NOT a general-purpose database surface. Curated schema only — no DML (DELETE/UPDATE/INSERT), no multi-statement input, no access to private columns. Validators reject anything that isn't a single SELECT against an allowed table. See references/error-catalog.md for the full error vocabulary.
Source of truth for the schema
Always call get_pseudo_sql_schema first. The response returns the live curated catalog (~70 tables, 91 join edges, 47 functions) AND the canonical jaz-pseudo-sql.md skill body in agentSkillsDoc.content. That .md body is the authoritative syntax guide — drop it into your context and use it instead of any cached column list.
The version field is a stable 16-char hex hash; cache by it. If you've already called the tool this session and the version is unchanged on a re-call, the schema and skill body are identical to your cached copy — no need to re-read.
Don't write a pseudo-SQL query from memory. The catalog grows; column names change; the live schema is the only source you should trust.
When NOT to use this skill
| Use this instead | When | |---|---| | download_export(exportType='analysis-anomalous-invoices') etc. | Canonical anomaly / audit / risk reports — they're tuned, parameterized, and faster than re-deriving them in SQL. See jaz-api Rule 141. | | download_export(exportType='trial-balance') etc. | Statements (TB, BS, P&L, GL, cashflow). The reporting engine handles period closing rules, intercompany eliminations, FX revaluation. SQL would miss these. | | search_invoices(filter:...), search_bills, etc. | Listing entities with structured filters. Returns typed objects, supports pagination, faster than SQL. | | get_invoice(resourceId) etc. | Single-entity lookup by ID. | | view_auto_reconciliation | Bank reconciliation match suggestions. |
Tool selection within pseudo-SQL
get_pseudo_sql_schema— call FIRST. Returns the live curated catalog (tables/columns/joins/functions) plus the canonicaljaz-pseudo-sql.mdskill body inagentSkillsDoc.content. Drop the.mdbody into context as the syntax guide. Use the response'sversion(16-char hex) as a session-stable cache key. Org-agnostic.preview_pseudo_sql— sync, ≤100 rows. Use for any agent-loop question where you need to look at the data quickly.export_pseudo_sql+get_pseudo_sql_export— async kickoff + polling. Use when you want explicit job control (manual retry, parallel jobs, polling at your own cadence) or when the result set is too big for preview's 100-row cap.run_pseudo_sql_and_download— one-shot composite: kickoff + poll + fetch CSV. Use for "give me the file" flows. Default returns the CSV buffer; passdownloadToFile=trueto write to~/Downloads/.
DSL rules (load-bearing)
- SELECT only. DELETE/UPDATE/INSERT → 422
PSEUDOSQL_VALIDATION_ERROR"only SELECT queries are supported". - Single statement.
SELECT 1; SELECT 2;→ 422PSEUDOSQL_PARSE_ERROR"only a single SELECT statement is allowed per query". A trailing semicolon on one statement is fine. - Must SELECT FROM at least one table.
SELECT 1(no FROM) → 422PSEUDOSQL_VALIDATION_ERROR. - Max 16,384 characters. Over → 422
validation_error"query must be a maximum of 16,384 characters in length". Note: this is the request-shape validator (different error_type from the SQL-engine validators). - Curated tables only. Unknown table → 422
PSEUDOSQL_VALIDATION_ERROR"unknown table " (lowercased in the error message). Callget_pseudo_sql_schemafor the live inventory. - Preview cap is 100 rows.
truncated:truemeans "MORE rows matched than were returned in this preview" — NOT "you hit the cap". To interpret: comparerowCountagainst yourLIMITclause or the preview cap (100). If you need every row, switch toexport_pseudo_sql. - Export
downloadUrlis short-lived. S3 pre-signed, ~15min expiry (X-Amz-Expires=900). Fetch immediately. If a fetch returns 403, callget_pseudo_sql_export(jobId)again for a fresh URL. Idempotency-Keydedups server-side. Same key + DIFFERENT query body returns the prior job's result (the server doesn't cross-check).run_pseudo_sql_and_downloadauto-keys fromsha256(query).slice(0,16)so dedup is query-tied automatically. If you callexport_pseudo_sqldirectly with a manual key, don't reuse it across different intents.
Reference docs
- Schema inventory — call
get_pseudo_sql_schema(live, ~30 KB response with tables / joins / functions + the canonicaljaz-pseudo-sql.mdbody for context). - [Query patterns](references/query-patterns.md) — example SELECTs by user intent (top customers, unpaid invoices, FX-exposed bills, etc.).
- [Error catalog](references/error-catalog.md) — every observed error code + recovery action.
Quick example — preview an ad-hoc query
Agent intent: "show me the 10 largest unpaid invoices"
preview_pseudo_sql({
query: `
SELECT invoice_number, total, balance, contact_id, due_date
FROM invoices
WHERE balance > 0
ORDER BY balance DESC
LIMIT 10
`
})
→ { data: { columns: [...], rows: [...], rowCount: 10, truncated: false } }
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: teamtinvio
- Source: teamtinvio/jaz-ai
- License: MIT
- Homepage: https://www.jaz.ai
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.