@toolbeltai/skills 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -10
- package/assets/demos/{geo-analyst-demo.sh → toolbelt-geo-demo.sh} +2 -2
- package/assets/demos/{run-toolbelt-demo.sh → toolbelt-start-demo.sh} +2 -2
- package/bin/install.js +22 -0
- package/package.json +15 -13
- package/{sql-analyst → toolbelt-analyze}/SKILL.md +21 -16
- package/{knowledge-graph → toolbelt-entities}/SKILL.md +7 -7
- package/{vector-search → toolbelt-find}/SKILL.md +11 -11
- package/{geo-analyst → toolbelt-geo}/README.md +3 -3
- package/{geo-analyst → toolbelt-geo}/SKILL.md +7 -7
- package/{multi-agent-workspace → toolbelt-invite}/SKILL.md +5 -5
- package/{run-toolbelt → toolbelt-start}/README.md +10 -10
- package/{run-toolbelt → toolbelt-start}/SKILL.md +7 -7
- package/{streaming-analyst → toolbelt-stream}/SKILL.md +5 -5
- package/data-blend/SKILL.md +0 -280
package/README.md
CHANGED
|
@@ -10,8 +10,8 @@ npx @toolbeltai/skills install
|
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
Copies every skill to `~/.claude/skills/` (flat, per the AgentSkills spec).
|
|
13
|
-
Restart Claude Code and you'll see them as slash commands: `/
|
|
14
|
-
`/geo
|
|
13
|
+
Restart Claude Code and you'll see them as slash commands: `/toolbelt-start`,
|
|
14
|
+
`/toolbelt-geo`, …
|
|
15
15
|
|
|
16
16
|
No account required; no network calls to Toolbelt. Skills work against any
|
|
17
17
|
Toolbelt MCP server (cloud or self-hosted).
|
|
@@ -31,14 +31,13 @@ agent, and installs these skills — all at once.
|
|
|
31
31
|
|
|
32
32
|
| Skill | Command | What it does |
|
|
33
33
|
| --- | --- | --- |
|
|
34
|
-
| [
|
|
35
|
-
| [
|
|
36
|
-
| [
|
|
37
|
-
| [
|
|
38
|
-
| [
|
|
39
|
-
| [
|
|
40
|
-
| [
|
|
41
|
-
| [data-blend](data-blend/) | `/data-blend` | Combine multiple tables with cross-table JOINs |
|
|
34
|
+
| [toolbelt-start](toolbelt-start/) | `/toolbelt-start` | Onboard end-to-end — provision, ingest, first query |
|
|
35
|
+
| [toolbelt-analyze](toolbelt-analyze/) | `/toolbelt-analyze` | Upload 1+ CSVs, ask in plain English, get SQL answers (single-table or multi-table JOIN) |
|
|
36
|
+
| [toolbelt-find](toolbelt-find/) | `/toolbelt-find` | Upload a document, retrieve passages by semantic similarity |
|
|
37
|
+
| [toolbelt-entities](toolbelt-entities/) | `/toolbelt-entities` | Auto-extract entities and relationships from docs, explore with Cypher |
|
|
38
|
+
| [toolbelt-geo](toolbelt-geo/) | `/toolbelt-geo` | GPU-accelerated geospatial — distance, containment, routing, map rendering |
|
|
39
|
+
| [toolbelt-stream](toolbelt-stream/) | `/toolbelt-stream` | Connect Kafka, aggregate over windows, detect anomalies |
|
|
40
|
+
| [toolbelt-invite](toolbelt-invite/) | `/toolbelt-invite` | Emit a connection URL so another agent can join this workspace |
|
|
42
41
|
|
|
43
42
|
## Works with
|
|
44
43
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Simulates the geo
|
|
2
|
+
# Simulates the toolbelt-geo skill running inside Claude Code
|
|
3
3
|
|
|
4
4
|
G='\033[0;32m' # green
|
|
5
5
|
B='\033[0;34m' # blue
|
|
@@ -10,7 +10,7 @@ W='\033[1;37m' # bold white
|
|
|
10
10
|
NC='\033[0m'
|
|
11
11
|
|
|
12
12
|
printf "\n"
|
|
13
|
-
printf "${D}> /geo
|
|
13
|
+
printf "${D}> /toolbelt-geo${NC}\n"
|
|
14
14
|
sleep 0.8
|
|
15
15
|
|
|
16
16
|
printf "\n"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Simulates the
|
|
2
|
+
# Simulates the toolbelt-start skill running inside Claude Code
|
|
3
3
|
|
|
4
4
|
G='\033[0;32m' # green
|
|
5
5
|
B='\033[0;34m' # blue
|
|
@@ -10,7 +10,7 @@ W='\033[1;37m' # bold white
|
|
|
10
10
|
NC='\033[0m'
|
|
11
11
|
|
|
12
12
|
printf "\n"
|
|
13
|
-
printf "${D}> /
|
|
13
|
+
printf "${D}> /toolbelt-start document_url=https://docs.toolbelt.ai/intro.pdf question=\"What is Toolbelt?\"${NC}\n"
|
|
14
14
|
sleep 0.8
|
|
15
15
|
|
|
16
16
|
printf "\n"
|
package/bin/install.js
CHANGED
|
@@ -26,6 +26,21 @@ const PKG_ROOT = join(dirname(fileURLToPath(import.meta.url)), '..');
|
|
|
26
26
|
const TARGET = join(homedir(), '.claude', 'skills');
|
|
27
27
|
const LEGACY_NESTED_DIR = join(TARGET, 'toolbelt');
|
|
28
28
|
|
|
29
|
+
// Pre-0.2.0 skill folder names. Removed on install so upgraders don't
|
|
30
|
+
// see ghost slash commands for skills that were renamed or merged.
|
|
31
|
+
// Added 2026-04-23 with the toolbelt-* prefix rename; safe to drop this
|
|
32
|
+
// list in a future major once the userbase has cycled.
|
|
33
|
+
const LEGACY_SKILL_NAMES = [
|
|
34
|
+
'run-toolbelt',
|
|
35
|
+
'sql-analyst',
|
|
36
|
+
'data-blend',
|
|
37
|
+
'vector-search',
|
|
38
|
+
'knowledge-graph',
|
|
39
|
+
'geo-analyst',
|
|
40
|
+
'streaming-analyst',
|
|
41
|
+
'multi-agent-workspace',
|
|
42
|
+
];
|
|
43
|
+
|
|
29
44
|
/** Any top-level directory containing a SKILL.md is a skill. */
|
|
30
45
|
function listSkills() {
|
|
31
46
|
return readdirSync(PKG_ROOT, { withFileTypes: true })
|
|
@@ -39,6 +54,13 @@ function cleanupLegacy() {
|
|
|
39
54
|
rmSync(LEGACY_NESTED_DIR, { recursive: true, force: true });
|
|
40
55
|
console.log(` migrated: removed legacy ~/.claude/skills/toolbelt/`);
|
|
41
56
|
}
|
|
57
|
+
for (const name of LEGACY_SKILL_NAMES) {
|
|
58
|
+
const p = join(TARGET, name);
|
|
59
|
+
if (existsSync(p)) {
|
|
60
|
+
rmSync(p, { recursive: true, force: true });
|
|
61
|
+
console.log(` migrated: removed legacy skill ${name}/`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
42
64
|
}
|
|
43
65
|
|
|
44
66
|
function cmdInstall() {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toolbeltai/skills",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Official Toolbelt skills
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Official Toolbelt skills — named /toolbelt-* flows (start, analyze, find, entities, geo, stream, invite) that teach any MCP-capable agent to orchestrate Toolbelt's MCP tools end-to-end.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://toolbelt.ai",
|
|
7
7
|
"repository": {
|
|
@@ -14,14 +14,17 @@
|
|
|
14
14
|
"author": "Toolbelt",
|
|
15
15
|
"keywords": [
|
|
16
16
|
"toolbelt",
|
|
17
|
-
"claude-code",
|
|
18
17
|
"mcp",
|
|
19
|
-
"skills",
|
|
18
|
+
"agent-skills",
|
|
19
|
+
"claude-code",
|
|
20
20
|
"openclaw",
|
|
21
|
+
"cursor",
|
|
22
|
+
"windsurf",
|
|
21
23
|
"sql",
|
|
24
|
+
"rag",
|
|
22
25
|
"knowledge-graph",
|
|
23
26
|
"geospatial",
|
|
24
|
-
"
|
|
27
|
+
"streaming"
|
|
25
28
|
],
|
|
26
29
|
"bin": {
|
|
27
30
|
"toolbelt-skills": "./bin/install.js"
|
|
@@ -29,14 +32,13 @@
|
|
|
29
32
|
"files": [
|
|
30
33
|
"bin",
|
|
31
34
|
"assets",
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"vector-search",
|
|
35
|
+
"toolbelt-start",
|
|
36
|
+
"toolbelt-analyze",
|
|
37
|
+
"toolbelt-find",
|
|
38
|
+
"toolbelt-entities",
|
|
39
|
+
"toolbelt-geo",
|
|
40
|
+
"toolbelt-stream",
|
|
41
|
+
"toolbelt-invite",
|
|
40
42
|
"LICENSE",
|
|
41
43
|
"README.md"
|
|
42
44
|
],
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: toolbelt-analyze
|
|
3
3
|
description: >
|
|
4
|
-
Upload
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
Upload one or more CSV tables and answer natural-language questions by
|
|
5
|
+
generating and executing SQL. Handles single-table analytics (totals,
|
|
6
|
+
averages, group-by, filtering) AND multi-table JOINs across related
|
|
7
|
+
datasets (orders + customers, sensors + metadata, events + dimensions).
|
|
8
|
+
Use when an agent has structured rows/columns — one table or several
|
|
9
|
+
that share a key — and needs analytical answers: trends, breakdowns,
|
|
10
|
+
comparisons, rankings, correlations. NOT for unstructured documents
|
|
11
|
+
(use toolbelt-find or toolbelt-entities), lat/lon or WKT data (use
|
|
12
|
+
toolbelt-geo), or live streams (use toolbelt-stream).
|
|
11
13
|
license: MIT
|
|
12
14
|
compatibility: >
|
|
13
15
|
Requires a Toolbelt account (provision free at https://toolbelt.ai) and an
|
|
@@ -20,15 +22,18 @@ metadata:
|
|
|
20
22
|
homepage: "https://toolbelt.ai/docs/sql"
|
|
21
23
|
---
|
|
22
24
|
|
|
23
|
-
Upload
|
|
24
|
-
Toolbelt MCP tools.
|
|
25
|
-
|
|
25
|
+
Upload one or more CSV tables and answer natural-language questions about
|
|
26
|
+
them using Toolbelt MCP tools. Handles both single-table queries and
|
|
27
|
+
multi-table JOINs on related datasets — pick the right approach based on
|
|
28
|
+
the uploaded data and the question. Work through each phase in order
|
|
29
|
+
without prompting for user input. On unrecoverable error, emit a
|
|
30
|
+
structured failure and halt.
|
|
26
31
|
|
|
27
32
|
## When Not To Use
|
|
28
33
|
|
|
29
|
-
- For unstructured text or documents — use `
|
|
30
|
-
- For real-time or streaming data — use `
|
|
31
|
-
- For spatial data with lat/lon coordinates — use `geo
|
|
34
|
+
- For unstructured text or documents — use `toolbelt-find` (retrieval) or `toolbelt-entities` (entity/relationship extraction).
|
|
35
|
+
- For real-time or streaming data — use `toolbelt-stream`.
|
|
36
|
+
- For spatial data with lat/lon coordinates — use `toolbelt-geo`.
|
|
32
37
|
|
|
33
38
|
## Invocation Parameters
|
|
34
39
|
|
|
@@ -77,7 +82,7 @@ Default `question`: `What is the total sales amount by region?`
|
|
|
77
82
|
|
|
78
83
|
## Phase 0: Verify Connection
|
|
79
84
|
|
|
80
|
-
Call `
|
|
85
|
+
Call `toolbelt_list_namespaces` (no arguments) immediately.
|
|
81
86
|
|
|
82
87
|
- **If it succeeds:** proceed to Phase 1 using the returned namespaces.
|
|
83
88
|
- **If it fails:** emit structured failure and halt.
|
|
@@ -222,7 +227,7 @@ RESULT:
|
|
|
222
227
|
|
|
223
228
|
| Phase | Tool(s) |
|
|
224
229
|
|---|---|
|
|
225
|
-
| 0. Verify connection | `
|
|
230
|
+
| 0. Verify connection | `toolbelt_list_namespaces` |
|
|
226
231
|
| 1. Resolve namespace | (from Phase 0 result) |
|
|
227
232
|
| 2. Upload CSV document | `toolbelt_save` |
|
|
228
233
|
| 3. Poll for ingestion | `toolbelt_jobs` |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: toolbelt-entities
|
|
3
3
|
description: >
|
|
4
4
|
Upload a document; Toolbelt automatically extracts entities (people, orgs,
|
|
5
5
|
places, concepts) and their relationships into a knowledge graph — no schema
|
|
@@ -7,7 +7,7 @@ description: >
|
|
|
7
7
|
trace connections. Use when an agent needs to map who-relates-to-whom, surface
|
|
8
8
|
hidden links across documents, answer multi-hop relationship questions, or
|
|
9
9
|
identify central entities in a corpus. NOT for flat semantic passage retrieval
|
|
10
|
-
(use
|
|
10
|
+
(use toolbelt-find) or tabular analytics (use toolbelt-analyze).
|
|
11
11
|
license: MIT
|
|
12
12
|
compatibility: >
|
|
13
13
|
Requires a Toolbelt account (provision free at https://toolbelt.ai) and an
|
|
@@ -17,7 +17,7 @@ compatibility: >
|
|
|
17
17
|
metadata:
|
|
18
18
|
author: toolbeltai
|
|
19
19
|
version: "1.0"
|
|
20
|
-
homepage: "https://toolbelt.ai/docs/
|
|
20
|
+
homepage: "https://toolbelt.ai/docs/toolbelt-entities"
|
|
21
21
|
---
|
|
22
22
|
|
|
23
23
|
Extract a knowledge graph from a document and explore it autonomously using
|
|
@@ -26,8 +26,8 @@ user input. On unrecoverable error, emit a structured failure and halt.
|
|
|
26
26
|
|
|
27
27
|
## When Not To Use
|
|
28
28
|
|
|
29
|
-
- For structured tabular data (CSV, SQL tables) — use `
|
|
30
|
-
- When entity and relationship extraction is not needed — use `
|
|
29
|
+
- For structured tabular data (CSV, SQL tables) — use `toolbelt-analyze` instead.
|
|
30
|
+
- When entity and relationship extraction is not needed — use `toolbelt-analyze` or `toolbelt-stream` for the appropriate data type.
|
|
31
31
|
|
|
32
32
|
## Invocation Parameters
|
|
33
33
|
|
|
@@ -101,7 +101,7 @@ manufactured at a new facility in Round Rock, Texas.
|
|
|
101
101
|
|
|
102
102
|
## Phase 0: Verify Connection
|
|
103
103
|
|
|
104
|
-
Call `
|
|
104
|
+
Call `toolbelt_list_namespaces` (no arguments) immediately.
|
|
105
105
|
|
|
106
106
|
- **If it succeeds:** proceed to Phase 1 using the returned namespaces.
|
|
107
107
|
- **If it fails:** emit structured failure and halt.
|
|
@@ -339,7 +339,7 @@ what is available and note the gap. Only halt on Phase 0–3 failures.
|
|
|
339
339
|
|
|
340
340
|
| Phase | Tool(s) |
|
|
341
341
|
|---|---|
|
|
342
|
-
| 0. Verify connection | `
|
|
342
|
+
| 0. Verify connection | `toolbelt_list_namespaces` |
|
|
343
343
|
| 1. Resolve namespace | (from Phase 0 result) |
|
|
344
344
|
| 2. Upload document | `toolbelt_save` |
|
|
345
345
|
| 3. Poll for extraction | `toolbelt_jobs` (ingest + semantic) |
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: toolbelt-find
|
|
3
3
|
description: >
|
|
4
4
|
Upload a document and retrieve passages by semantic similarity to a
|
|
5
5
|
natural-language query. Ranks content by meaning, not keyword overlap. Use
|
|
6
6
|
when an agent needs to ground answers in source documents (RAG), find related
|
|
7
7
|
content, retrieve passages by concept, or answer "what does this doc say
|
|
8
8
|
about X" where X isn't a verbatim phrase. NOT for exact keyword/regex search,
|
|
9
|
-
structured table queries (use
|
|
10
|
-
(use
|
|
9
|
+
structured table queries (use toolbelt-analyze), or entity-relationship extraction
|
|
10
|
+
(use toolbelt-entities).
|
|
11
11
|
license: MIT
|
|
12
12
|
compatibility: >
|
|
13
13
|
Requires a Toolbelt account (provision free at https://toolbelt.ai) and an
|
|
@@ -26,10 +26,10 @@ unrecoverable error, emit a structured failure and halt.
|
|
|
26
26
|
|
|
27
27
|
## When Not To Use
|
|
28
28
|
|
|
29
|
-
- For structured tabular data (CSV, SQL tables) — use `
|
|
30
|
-
- For aggregate queries, counts, or filtering by exact values — use `
|
|
31
|
-
- For entity and relationship extraction — use `
|
|
32
|
-
- When you need a synthesized answer that may draw on SQL tables — use `
|
|
29
|
+
- For structured tabular data (CSV, SQL tables) — use `toolbelt-analyze` instead.
|
|
30
|
+
- For aggregate queries, counts, or filtering by exact values — use `toolbelt-analyze`; vector search ranks by meaning, not criteria.
|
|
31
|
+
- For entity and relationship extraction — use `toolbelt-entities` instead.
|
|
32
|
+
- When you need a synthesized answer that may draw on SQL tables — use `toolbelt-analyze` with `toolbelt_search` (hybrid routing) instead.
|
|
33
33
|
|
|
34
34
|
## How This Differs From `toolbelt_search`
|
|
35
35
|
|
|
@@ -46,7 +46,7 @@ Extract these from the args string or conversation context before starting:
|
|
|
46
46
|
|---|---|---|
|
|
47
47
|
| `namespace_id` | No | UUID of target namespace. Auto-select if omitted and only one exists; fail if ambiguous. |
|
|
48
48
|
| `document_content` | No | Raw text to upload. Uses the embedded sample document if omitted. |
|
|
49
|
-
| `document_name` | No | Name for the document asset. Defaults to `
|
|
49
|
+
| `document_name` | No | Name for the document asset. Defaults to `toolbelt-find-sample`. |
|
|
50
50
|
| `question` | No | Natural language query to search for. Defaults to `What are the effects on coastal ecosystems?` |
|
|
51
51
|
| `skip_upload` | No | Set to `true` to skip Phases 2–3 and search existing namespace content. |
|
|
52
52
|
|
|
@@ -105,7 +105,7 @@ Default `question`: `What are the effects on coastal ecosystems?`
|
|
|
105
105
|
|
|
106
106
|
## Phase 0: Verify Connection
|
|
107
107
|
|
|
108
|
-
Call `
|
|
108
|
+
Call `toolbelt_list_namespaces` (no arguments) immediately.
|
|
109
109
|
|
|
110
110
|
- **If it succeeds:** proceed to Phase 1 using the returned namespaces.
|
|
111
111
|
- **If it fails:** emit structured failure and halt.
|
|
@@ -142,7 +142,7 @@ Store the resolved `namespace_id` — pass it to every subsequent tool call.
|
|
|
142
142
|
Skip this phase if `skip_upload` is `true`.
|
|
143
143
|
|
|
144
144
|
Resolve `document_content` (use parameter value or default sample above).
|
|
145
|
-
Resolve `document_name` (use parameter value or default `
|
|
145
|
+
Resolve `document_name` (use parameter value or default `toolbelt-find-sample`).
|
|
146
146
|
|
|
147
147
|
Call `toolbelt_save`:
|
|
148
148
|
|
|
@@ -249,7 +249,7 @@ RESULT:
|
|
|
249
249
|
|
|
250
250
|
| Phase | Tool(s) |
|
|
251
251
|
|---|---|
|
|
252
|
-
| 0. Verify connection | `
|
|
252
|
+
| 0. Verify connection | `toolbelt_list_namespaces` |
|
|
253
253
|
| 1. Resolve namespace | (from Phase 0 result) |
|
|
254
254
|
| 2. Upload document | `toolbelt_save` |
|
|
255
255
|
| 3. Poll for indexing | `toolbelt_jobs` |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# geo
|
|
1
|
+
# toolbelt-geo
|
|
2
2
|
|
|
3
|
-

|
|
4
4
|
|
|
5
5
|
GPU-accelerated geospatial analytics agent powered by Toolbelt MCP. Uploads lat/lon sensor data, runs geospatial SQL queries (distance, point-in-polygon, track creation), and emits structured results.
|
|
6
6
|
|
|
7
|
-
Invoke via `/geo
|
|
7
|
+
Invoke via `/toolbelt-geo` in Claude Code, or via the `Skill` tool in any MCP-capable agent.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: geo
|
|
2
|
+
name: toolbelt-geo
|
|
3
3
|
description: >
|
|
4
4
|
GPU-accelerated geospatial analytics on Toolbelt — distance, point-in-polygon
|
|
5
5
|
containment, nearest-neighbor, track creation, spatial joins. Upload lat/lon
|
|
6
6
|
sensor readings or WKT geometries, then run spatial SQL queries. Use when an
|
|
7
7
|
agent needs to answer geographic questions — how close is X to Y, which points
|
|
8
8
|
fall inside a region, along which route, coverage overlap, or movement tracks
|
|
9
|
-
from raw GPS. NOT for non-spatial tabular analysis (use
|
|
10
|
-
document content (use
|
|
9
|
+
from raw GPS. NOT for non-spatial tabular analysis (use toolbelt-analyze) or
|
|
10
|
+
document content (use toolbelt-find).
|
|
11
11
|
license: MIT
|
|
12
12
|
compatibility: >
|
|
13
13
|
Requires a Toolbelt account (provision free at https://toolbelt.ai) and an
|
|
@@ -27,8 +27,8 @@ without confirmation. On unrecoverable error, emit a structured failure and halt
|
|
|
27
27
|
|
|
28
28
|
## When Not To Use
|
|
29
29
|
|
|
30
|
-
- For tabular data without lat/lon coordinates — use `
|
|
31
|
-
- For unstructured text or documents — use `
|
|
30
|
+
- For tabular data without lat/lon coordinates — use `toolbelt-analyze` instead.
|
|
31
|
+
- For unstructured text or documents — use `toolbelt-entities` instead.
|
|
32
32
|
|
|
33
33
|
## Invocation Parameters
|
|
34
34
|
|
|
@@ -70,7 +70,7 @@ POLYGON((-82.4650 27.9400, -82.4350 27.9400, -82.4350 27.9700, -82.4650 27.9700,
|
|
|
70
70
|
|
|
71
71
|
## Phase 0: Verify Connection
|
|
72
72
|
|
|
73
|
-
Call `
|
|
73
|
+
Call `toolbelt_list_namespaces` (no arguments) immediately.
|
|
74
74
|
|
|
75
75
|
- **If it succeeds:** proceed to Phase 1 using the returned namespaces.
|
|
76
76
|
- **If it fails:** emit structured failure and halt.
|
|
@@ -232,7 +232,7 @@ and continue with remaining queries. Only halt on Phase 0–2 failures.
|
|
|
232
232
|
|
|
233
233
|
| Phase | Tool(s) |
|
|
234
234
|
|---|---|
|
|
235
|
-
| 0. Verify connection | `
|
|
235
|
+
| 0. Verify connection | `toolbelt_list_namespaces` |
|
|
236
236
|
| 1. Resolve namespace | (from Phase 0 result) |
|
|
237
237
|
| 2. Upload sensor data | `toolbelt_save`, `toolbelt_jobs`, `toolbelt_context` |
|
|
238
238
|
| 3. Run geospatial queries | `toolbelt_execute` × 3 |
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: toolbelt-invite
|
|
3
3
|
description: >
|
|
4
4
|
Set up a Toolbelt namespace that multiple agents can share. Uploads a document,
|
|
5
5
|
then emits a connection URL another agent can use to join the same workspace
|
|
6
6
|
without re-ingesting. Use when handing off context between agents or sessions,
|
|
7
7
|
when two agents need to collaborate on the same dataset, or when pre-staging
|
|
8
8
|
data for a downstream agent. NOT needed for single-agent workflows — use
|
|
9
|
-
|
|
9
|
+
toolbelt-start instead.
|
|
10
10
|
license: MIT
|
|
11
11
|
compatibility: >
|
|
12
12
|
Requires a Toolbelt account (provision free at https://toolbelt.ai) and an
|
|
@@ -26,7 +26,7 @@ prompting for user input. On unrecoverable error, emit a structured failure and
|
|
|
26
26
|
## When Not To Use
|
|
27
27
|
|
|
28
28
|
- For single-agent workflows where data sharing between agents is not needed.
|
|
29
|
-
- When you only need to analyze data yourself — use `
|
|
29
|
+
- When you only need to analyze data yourself — use `toolbelt-analyze`, `toolbelt-stream`, or `toolbelt-entities` instead.
|
|
30
30
|
|
|
31
31
|
## Invocation Parameters
|
|
32
32
|
|
|
@@ -80,7 +80,7 @@ Classification: Internal — Project Team Only
|
|
|
80
80
|
|
|
81
81
|
## Phase 0: Verify Connection
|
|
82
82
|
|
|
83
|
-
Call `
|
|
83
|
+
Call `toolbelt_list_namespaces` (no arguments) immediately.
|
|
84
84
|
|
|
85
85
|
- **If it succeeds:** proceed to Phase 1 using the returned namespaces.
|
|
86
86
|
- **If it fails:** emit structured failure and halt.
|
|
@@ -206,7 +206,7 @@ RESULT:
|
|
|
206
206
|
|
|
207
207
|
| Phase | Tool(s) |
|
|
208
208
|
|---|---|
|
|
209
|
-
| 0. Verify connection | `
|
|
209
|
+
| 0. Verify connection | `toolbelt_list_namespaces` |
|
|
210
210
|
| 1. Resolve namespace | (from Phase 0 result) |
|
|
211
211
|
| 2. Upload document | `toolbelt_save` |
|
|
212
212
|
| 3. Poll for ingestion | `toolbelt_jobs` |
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# toolbelt-start
|
|
2
2
|
|
|
3
|
-

|
|
4
4
|
|
|
5
5
|
Autonomous end-to-end Toolbelt agent. Provisions a namespace, ingests documents, connects streaming data sources, and answers questions — all without human interaction.
|
|
6
6
|
|
|
7
|
-
Invoke via `/
|
|
7
|
+
Invoke via `/toolbelt-start` in Claude Code, or via the `Skill` tool in any MCP-capable agent.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -31,7 +31,7 @@ Invoke via `/run-toolbelt` in Claude Code, or via the `Skill` tool in any MCP-ca
|
|
|
31
31
|
### Smoke test — connection and namespace only
|
|
32
32
|
|
|
33
33
|
```
|
|
34
|
-
/
|
|
34
|
+
/toolbelt-start
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
Runs phases 0–2. Verifies the MCP connection is live and resolves your namespace. No data is written.
|
|
@@ -41,11 +41,11 @@ Runs phases 0–2. Verifies the MCP connection is live and resolves your namespa
|
|
|
41
41
|
### Ingest a document and ask a question
|
|
42
42
|
|
|
43
43
|
```
|
|
44
|
-
/
|
|
44
|
+
/toolbelt-start document_url=https://example.com/report.pdf question="What are the key findings?"
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
```
|
|
48
|
-
/
|
|
48
|
+
/toolbelt-start document_content="Q1 revenue was $4.2M across three product lines." document_name="q1-summary" question="What was Q1 revenue?"
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
---
|
|
@@ -53,7 +53,7 @@ Runs phases 0–2. Verifies the MCP connection is live and resolves your namespa
|
|
|
53
53
|
### Target a specific namespace
|
|
54
54
|
|
|
55
55
|
```
|
|
56
|
-
/
|
|
56
|
+
/toolbelt-start namespace_id=<uuid> document_url=https://example.com/report.pdf question="Summarize this."
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
Required when your account has multiple namespaces. Omit to auto-select when only one exists.
|
|
@@ -63,7 +63,7 @@ Required when your account has multiple namespaces. Omit to auto-select when onl
|
|
|
63
63
|
### Connect a Kafka source
|
|
64
64
|
|
|
65
65
|
```
|
|
66
|
-
/
|
|
66
|
+
/toolbelt-start kafka_broker=kafka-broker:9092 kafka_topic=events kafka_schema="id INTEGER, event VARCHAR(256), ts TIMESTAMP"
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
Connects the topic and verifies it is queryable. Combine with `question` to search over streaming data.
|
|
@@ -73,7 +73,7 @@ Connects the topic and verifies it is queryable. Combine with `question` to sear
|
|
|
73
73
|
### Full pipeline
|
|
74
74
|
|
|
75
75
|
```
|
|
76
|
-
/
|
|
76
|
+
/toolbelt-start \
|
|
77
77
|
namespace_id=<uuid> \
|
|
78
78
|
document_url=https://example.com/report.pdf \
|
|
79
79
|
kafka_broker=kafka-broker:9092 \
|
|
@@ -89,7 +89,7 @@ Runs all phases: document ingestion, Kafka connection, and cross-source search.
|
|
|
89
89
|
### From another agent (Skill tool)
|
|
90
90
|
|
|
91
91
|
```javascript
|
|
92
|
-
{ skill: "
|
|
92
|
+
{ skill: "toolbelt-start", args: "namespace_id=<uuid> document_url=https://... question=..." }
|
|
93
93
|
```
|
|
94
94
|
|
|
95
95
|
The skill emits a structured `RESULT:` block — parseable by the calling agent without human interpretation.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: toolbelt-start
|
|
3
3
|
description: >
|
|
4
4
|
Provision a Toolbelt namespace, ingest a document or Kafka stream, and answer
|
|
5
5
|
a question end-to-end — autonomously, without human steps. Use when an agent
|
|
6
6
|
needs to set up a fresh Toolbelt workspace, add assets from scratch, connect a
|
|
7
7
|
streaming source, or run a complete ingest→query pipeline. NOT for querying
|
|
8
|
-
data that is already ingested — use
|
|
9
|
-
|
|
8
|
+
data that is already ingested — use toolbelt-analyze, toolbelt-find, or
|
|
9
|
+
toolbelt-entities for that.
|
|
10
10
|
license: MIT
|
|
11
11
|
compatibility: >
|
|
12
12
|
Requires a Toolbelt account (provision free at https://toolbelt.ai) and an
|
|
@@ -27,8 +27,8 @@ without confirmation. On unrecoverable error, emit a structured failure and halt
|
|
|
27
27
|
## When Not To Use
|
|
28
28
|
|
|
29
29
|
- When the Toolbelt MCP connection is not yet established — the connection must exist before invocation.
|
|
30
|
-
- When you only need to query data already in Toolbelt — use `
|
|
31
|
-
- When you only need to upload and analyze a CSV — use `
|
|
30
|
+
- When you only need to query data already in Toolbelt — use `toolbelt-analyze` instead.
|
|
31
|
+
- When you only need to upload and analyze a CSV — use `toolbelt-analyze` instead.
|
|
32
32
|
|
|
33
33
|
## Invocation Parameters
|
|
34
34
|
|
|
@@ -54,7 +54,7 @@ Skip Phase 5 if `question` is absent.
|
|
|
54
54
|
|
|
55
55
|
## Phase 0: Verify Connection
|
|
56
56
|
|
|
57
|
-
Call `
|
|
57
|
+
Call `toolbelt_list_namespaces` (no arguments) immediately.
|
|
58
58
|
|
|
59
59
|
- **If it succeeds:** proceed to Phase 1 using the returned namespaces.
|
|
60
60
|
- **If it fails:** emit structured failure and halt.
|
|
@@ -227,7 +227,7 @@ RESULT:
|
|
|
227
227
|
|
|
228
228
|
| Phase | Tool(s) |
|
|
229
229
|
|---|---|
|
|
230
|
-
| 0. Verify connection | `
|
|
230
|
+
| 0. Verify connection | `toolbelt_list_namespaces` |
|
|
231
231
|
| 1. Resolve namespace | (from Phase 0 result) |
|
|
232
232
|
| 2. Inspect state | `toolbelt_context` |
|
|
233
233
|
| 3. Add document | `toolbelt_save`, `toolbelt_jobs`, `toolbelt_context` |
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: toolbelt-stream
|
|
3
3
|
description: >
|
|
4
4
|
Connect a live Kafka topic (or use built-in simulated data) and run windowed
|
|
5
5
|
aggregations plus standard-deviation anomaly detection on the stream. Use when
|
|
6
6
|
an agent needs to analyze real-time or time-series data — IoT sensor readings,
|
|
7
7
|
event logs, security events, fleet telemetry, transaction feeds — and answer
|
|
8
8
|
questions about rates, trends, and outliers over time windows. NOT for static
|
|
9
|
-
tabular files (use
|
|
9
|
+
tabular files (use toolbelt-analyze) or document content (use toolbelt-find).
|
|
10
10
|
license: MIT
|
|
11
11
|
compatibility: >
|
|
12
12
|
Requires a Toolbelt account (provision free at https://toolbelt.ai) and an
|
|
@@ -27,7 +27,7 @@ failure and halt.
|
|
|
27
27
|
|
|
28
28
|
## When Not To Use
|
|
29
29
|
|
|
30
|
-
- For static batch tabular data — use `
|
|
30
|
+
- For static batch tabular data — use `toolbelt-analyze` instead.
|
|
31
31
|
- When real-time monitoring, windowed aggregation, or anomaly detection is not the goal.
|
|
32
32
|
|
|
33
33
|
## Invocation Parameters
|
|
@@ -96,7 +96,7 @@ sensor_id VARCHAR(64), ts TIMESTAMP, value DOUBLE, unit VARCHAR(32)
|
|
|
96
96
|
|
|
97
97
|
## Phase 0: Verify Connection
|
|
98
98
|
|
|
99
|
-
Call `
|
|
99
|
+
Call `toolbelt_list_namespaces` (no arguments) immediately.
|
|
100
100
|
|
|
101
101
|
- **If it succeeds:** proceed to Phase 1 using the returned namespaces.
|
|
102
102
|
- **If it fails:** emit structured failure and halt.
|
|
@@ -338,7 +338,7 @@ section and continue. Only halt on Phase 0–2 failures.
|
|
|
338
338
|
|
|
339
339
|
| Phase | Tool(s) |
|
|
340
340
|
|---|---|
|
|
341
|
-
| 0. Verify connection | `
|
|
341
|
+
| 0. Verify connection | `toolbelt_list_namespaces` |
|
|
342
342
|
| 1. Resolve namespace | (from Phase 0 result) |
|
|
343
343
|
| 2. Connect stream | `toolbelt_connect` (Kafka) or `toolbelt_save` + `toolbelt_jobs` + `toolbelt_context` (simulated) |
|
|
344
344
|
| 3. Confirm data arrival | `toolbelt_execute` × 1–2 |
|
package/data-blend/SKILL.md
DELETED
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: data-blend
|
|
3
|
-
description: >
|
|
4
|
-
Upload two or more CSV tables into one Toolbelt namespace and run cross-table
|
|
5
|
-
JOIN queries to correlate them. Use when an agent has related datasets that
|
|
6
|
-
need to be combined — orders + customers, sensors + metadata, events +
|
|
7
|
-
dimensions, transactions + accounts — and questions span multiple tables that
|
|
8
|
-
share a key. NOT for single-table analysis (use sql-analyst), unstructured
|
|
9
|
-
text (use knowledge-graph), or entity-level relationship mapping across free
|
|
10
|
-
text (use knowledge-graph).
|
|
11
|
-
license: MIT
|
|
12
|
-
compatibility: >
|
|
13
|
-
Requires a Toolbelt account (provision free at https://toolbelt.ai) and an
|
|
14
|
-
MCP-compatible AI agent (Claude Code, Claude Desktop, OpenClaw, or any client
|
|
15
|
-
that supports MCP server connections). MCP connection must be pre-established
|
|
16
|
-
before invocation.
|
|
17
|
-
metadata:
|
|
18
|
-
author: toolbeltai
|
|
19
|
-
version: "1.0"
|
|
20
|
-
homepage: "https://toolbelt.ai/docs/sql"
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
Upload multiple tables and run cross-table JOIN queries using Toolbelt MCP tools.
|
|
24
|
-
Work through each phase in order without prompting for user input. On
|
|
25
|
-
unrecoverable error, emit a structured failure and halt.
|
|
26
|
-
|
|
27
|
-
## When Not To Use
|
|
28
|
-
|
|
29
|
-
- For a single table — use `sql-analyst` instead.
|
|
30
|
-
- For unstructured text or documents — use `knowledge-graph` instead.
|
|
31
|
-
- For streaming/real-time data — use `streaming-analyst` instead.
|
|
32
|
-
- For spatial data with lat/lon — use `geo-analyst` instead.
|
|
33
|
-
|
|
34
|
-
## Invocation Parameters
|
|
35
|
-
|
|
36
|
-
Extract these from the args string or conversation context before starting:
|
|
37
|
-
|
|
38
|
-
| Parameter | Required | Description |
|
|
39
|
-
|---|---|---|
|
|
40
|
-
| `namespace_id` | No | UUID of target namespace. Auto-select if omitted and only one exists; fail if ambiguous. |
|
|
41
|
-
| `table_a_content` | No | Raw CSV for the first table. Uses default `orders` sample if omitted. |
|
|
42
|
-
| `table_a_name` | No | Asset name for the first table. Defaults to `orders`. |
|
|
43
|
-
| `table_b_content` | No | Raw CSV for the second table. Uses default `customers` sample if omitted. |
|
|
44
|
-
| `table_b_name` | No | Asset name for the second table. Defaults to `customers`. |
|
|
45
|
-
| `join_query` | No | Custom SQL JOIN to execute in Phase 5. Uses default query if omitted. |
|
|
46
|
-
| `skip_upload` | No | Set to `true` to skip Phases 2–4 and query tables already in the namespace. |
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
## Default Sample Data
|
|
51
|
-
|
|
52
|
-
If no `table_a_content` is provided, use this orders dataset verbatim:
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
order_id,customer_id,product,category,quantity,amount,order_date
|
|
56
|
-
1001,C001,Widget Pro,Hardware,12,599.88,2024-01-05
|
|
57
|
-
1002,C003,Gadget Basic,Software,5,149.95,2024-01-08
|
|
58
|
-
1003,C002,Widget Pro,Hardware,8,399.92,2024-01-12
|
|
59
|
-
1004,C004,Service Plan,Services,3,597.00,2024-01-15
|
|
60
|
-
1005,C001,Gadget Basic,Software,20,599.80,2024-01-19
|
|
61
|
-
1006,C005,Widget Pro,Hardware,6,299.94,2024-01-22
|
|
62
|
-
1007,C003,Service Plan,Services,2,398.00,2024-02-03
|
|
63
|
-
1008,C002,Gadget Plus,Software,15,1199.85,2024-02-07
|
|
64
|
-
1009,C001,Widget Pro,Hardware,10,499.90,2024-02-11
|
|
65
|
-
1010,C004,Gadget Basic,Software,8,239.92,2024-02-14
|
|
66
|
-
1011,C005,Gadget Plus,Software,4,319.96,2024-02-18
|
|
67
|
-
1012,C002,Service Plan,Services,1,199.00,2024-02-21
|
|
68
|
-
1013,C001,Service Plan,Services,5,995.00,2024-03-02
|
|
69
|
-
1014,C005,Gadget Plus,Software,9,719.91,2024-03-06
|
|
70
|
-
1015,C003,Widget Pro,Hardware,7,349.93,2024-03-10
|
|
71
|
-
1016,C002,Gadget Basic,Software,11,329.89,2024-03-14
|
|
72
|
-
1017,C004,Gadget Plus,Software,6,479.94,2024-03-18
|
|
73
|
-
1018,C005,Service Plan,Services,4,796.00,2024-03-22
|
|
74
|
-
1019,C003,Widget Pro,Hardware,3,149.97,2024-03-25
|
|
75
|
-
1020,C002,Widget Pro,Hardware,14,699.86,2024-03-28
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
If no `table_b_content` is provided, use this customers dataset verbatim:
|
|
79
|
-
|
|
80
|
-
```
|
|
81
|
-
customer_id,name,region,segment,account_manager
|
|
82
|
-
C001,Meridian Corp,Northeast,Enterprise,Alice Chen
|
|
83
|
-
C002,Delta Systems,Midwest,Enterprise,Carol Singh
|
|
84
|
-
C003,Apex Solutions,Southeast,Mid-Market,Bob Martinez
|
|
85
|
-
C004,Crest Industries,West,Mid-Market,David Park
|
|
86
|
-
C005,Solaris Group,West,SMB,Emma Lopez
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
Default `join_query`:
|
|
90
|
-
```sql
|
|
91
|
-
SELECT
|
|
92
|
-
c.segment,
|
|
93
|
-
c.region,
|
|
94
|
-
COUNT(o.order_id) AS order_count,
|
|
95
|
-
ROUND(SUM(o.amount), 2) AS total_amount,
|
|
96
|
-
ROUND(AVG(o.amount), 2) AS avg_order_value
|
|
97
|
-
FROM <orders_table> o
|
|
98
|
-
JOIN <customers_table> c ON o.customer_id = c.customer_id
|
|
99
|
-
GROUP BY c.segment, c.region
|
|
100
|
-
ORDER BY total_amount DESC
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
---
|
|
104
|
-
|
|
105
|
-
## Phase 0: Verify Connection
|
|
106
|
-
|
|
107
|
-
Call `get_semantic_names` (no arguments) immediately.
|
|
108
|
-
|
|
109
|
-
- **If it succeeds:** proceed to Phase 1 using the returned namespaces.
|
|
110
|
-
- **If it fails:** emit structured failure and halt.
|
|
111
|
-
|
|
112
|
-
```
|
|
113
|
-
FAILURE: Toolbelt MCP connection is not established.
|
|
114
|
-
The MCP server must be connected before invoking this skill.
|
|
115
|
-
See: https://toolbelt.ai/docs/mcp for setup instructions.
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
---
|
|
119
|
-
|
|
120
|
-
## Phase 1: Resolve Namespace
|
|
121
|
-
|
|
122
|
-
Use the namespaces returned from Phase 0.
|
|
123
|
-
|
|
124
|
-
Resolution order:
|
|
125
|
-
1. If `namespace_id` was provided as a parameter, use it directly.
|
|
126
|
-
2. If only one namespace exists, use it.
|
|
127
|
-
3. If multiple exist and no `namespace_id` was specified, emit structured failure and halt.
|
|
128
|
-
|
|
129
|
-
```
|
|
130
|
-
FAILURE: Multiple namespaces found and none specified.
|
|
131
|
-
Available: [<list namespace display names and IDs>]
|
|
132
|
-
Re-invoke with namespace_id=<uuid>.
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
Store the resolved `namespace_id` — pass it to every subsequent tool call.
|
|
136
|
-
|
|
137
|
-
---
|
|
138
|
-
|
|
139
|
-
## Phase 2: Inspect Existing Tables
|
|
140
|
-
|
|
141
|
-
Skip this phase if `skip_upload` is `true` — go directly to Phase 5.
|
|
142
|
-
|
|
143
|
-
Call `toolbelt_context` with `{ "namespace_id": "<namespace_id>" }`.
|
|
144
|
-
|
|
145
|
-
Check whether tables matching `table_a_name` and `table_b_name` already exist:
|
|
146
|
-
- If both exist: skip Phases 3–4 and proceed to Phase 5 using their existing table names.
|
|
147
|
-
- If one or both are missing: upload the missing ones in Phase 3.
|
|
148
|
-
|
|
149
|
-
Store all resolved table names for use in Phase 5.
|
|
150
|
-
|
|
151
|
-
---
|
|
152
|
-
|
|
153
|
-
## Phase 3: Upload Missing Tables
|
|
154
|
-
|
|
155
|
-
For each table that does not already exist, call `toolbelt_save`:
|
|
156
|
-
|
|
157
|
-
```json
|
|
158
|
-
{
|
|
159
|
-
"asset_type": "document",
|
|
160
|
-
"namespace_id": "<namespace_id>",
|
|
161
|
-
"name": "<table_a_name or table_b_name>",
|
|
162
|
-
"file_name": "<name>.csv",
|
|
163
|
-
"content": "<csv_content>",
|
|
164
|
-
"content_encoding": "text",
|
|
165
|
-
"data_format": "csv"
|
|
166
|
-
}
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
Record each returned `asset_id`.
|
|
170
|
-
|
|
171
|
-
---
|
|
172
|
-
|
|
173
|
-
## Phase 4: Poll for Ingestion
|
|
174
|
-
|
|
175
|
-
Call `toolbelt_jobs` with `{ "namespace_id": "<namespace_id>" }` every 10 seconds.
|
|
176
|
-
|
|
177
|
-
Wait for the `ingest` job for each uploaded asset to reach `completed`. Typical duration: 15–60 seconds per table. Maximum wait: 3 minutes.
|
|
178
|
-
|
|
179
|
-
If any job reaches `failed` or the timeout elapses, emit structured failure and halt:
|
|
180
|
-
```
|
|
181
|
-
FAILURE: Table ingestion did not complete.
|
|
182
|
-
Asset: <table name>
|
|
183
|
-
Job status: <last observed status>
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
After all jobs complete, call `toolbelt_context` to retrieve the final SQL table names for all assets. Store as `table_a` and `table_b`.
|
|
187
|
-
|
|
188
|
-
---
|
|
189
|
-
|
|
190
|
-
## Phase 5: Run Blend Queries
|
|
191
|
-
|
|
192
|
-
Substitute `<orders_table>` and `<customers_table>` (or equivalent names) in all queries with the resolved table names from Phase 4 (or Phase 2 if skip_upload).
|
|
193
|
-
|
|
194
|
-
### Query 1 — Join summary (default or custom)
|
|
195
|
-
|
|
196
|
-
If `join_query` was provided, execute it directly. Otherwise execute the default query, substituting the resolved table names:
|
|
197
|
-
|
|
198
|
-
```json
|
|
199
|
-
{
|
|
200
|
-
"namespace_id": "<namespace_id>",
|
|
201
|
-
"query": "<join_query with table names substituted>"
|
|
202
|
-
}
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
Use `toolbelt_sql` for this call. Record:
|
|
206
|
-
- `join_rows`: number of rows returned
|
|
207
|
-
- `join_results`: up to 10 rows
|
|
208
|
-
|
|
209
|
-
### Query 2 — Row counts
|
|
210
|
-
|
|
211
|
-
Confirm both tables are populated:
|
|
212
|
-
|
|
213
|
-
```sql
|
|
214
|
-
SELECT '<table_a>' AS table_name, COUNT(*) AS row_count FROM <table_a>
|
|
215
|
-
UNION ALL
|
|
216
|
-
SELECT '<table_b>' AS table_name, COUNT(*) AS row_count FROM <table_b>
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
Record `row_counts` for each table.
|
|
220
|
-
|
|
221
|
-
### Query 3 — Unmatched rows check
|
|
222
|
-
|
|
223
|
-
Identify rows in table A with no match in table B (join integrity check):
|
|
224
|
-
|
|
225
|
-
```sql
|
|
226
|
-
SELECT COUNT(*) AS unmatched_count
|
|
227
|
-
FROM <table_a> a
|
|
228
|
-
LEFT JOIN <table_b> b ON a.<join_key> = b.<join_key>
|
|
229
|
-
WHERE b.<join_key> IS NULL
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
Infer `<join_key>` from the shared column names visible in the schema context. If no shared key can be inferred, skip this query and note it in the RESULT.
|
|
233
|
-
|
|
234
|
-
Record `unmatched_count`.
|
|
235
|
-
|
|
236
|
-
---
|
|
237
|
-
|
|
238
|
-
## Phase 6: Structured Output
|
|
239
|
-
|
|
240
|
-
After all phases complete, emit a single structured result:
|
|
241
|
-
|
|
242
|
-
```
|
|
243
|
-
RESULT:
|
|
244
|
-
namespace_id: <uuid>
|
|
245
|
-
phases_run: [0, 1, 2, 3, 4, 5]
|
|
246
|
-
|
|
247
|
-
tables:
|
|
248
|
-
table_a: <sql table name>
|
|
249
|
-
table_b: <sql table name>
|
|
250
|
-
row_counts:
|
|
251
|
-
<table_a>: <count>
|
|
252
|
-
<table_b>: <count>
|
|
253
|
-
unmatched_rows: <count or "skipped — no shared key inferred">
|
|
254
|
-
|
|
255
|
-
blend_query:
|
|
256
|
-
sql: |
|
|
257
|
-
<query executed>
|
|
258
|
-
row_count: <join_rows>
|
|
259
|
-
results:
|
|
260
|
-
- <row 1>
|
|
261
|
-
- <row 2>
|
|
262
|
-
... (up to 10 rows)
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
If any Phase 5 query fails, include `query_error: "<error>"` under that query's
|
|
266
|
-
section and continue. Only halt on Phase 0–3 failures.
|
|
267
|
-
|
|
268
|
-
---
|
|
269
|
-
|
|
270
|
-
## Tool Reference
|
|
271
|
-
|
|
272
|
-
| Phase | Tool(s) |
|
|
273
|
-
|---|---|
|
|
274
|
-
| 0. Verify connection | `get_semantic_names` |
|
|
275
|
-
| 1. Resolve namespace | (from Phase 0 result) |
|
|
276
|
-
| 2. Inspect existing tables | `toolbelt_context` |
|
|
277
|
-
| 3. Upload missing tables | `toolbelt_save` |
|
|
278
|
-
| 4. Poll for ingestion | `toolbelt_jobs`, `toolbelt_context` |
|
|
279
|
-
| 5. Run blend queries | `toolbelt_sql`, `toolbelt_execute` |
|
|
280
|
-
| 6. Emit result | (structured output) |
|