@toolbeltai/skills 0.1.4 → 0.2.1

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 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: `/run-toolbelt`,
14
- `/geo-analyst`, …
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
- | [run-toolbelt](run-toolbelt/) | `/run-toolbelt` | Onboard, upload docs, connect data, ask questions |
35
- | [geo-analyst](geo-analyst/) | `/geo-analyst` | GPU-accelerated geospatial queries and map rendering |
36
- | [knowledge-graph](knowledge-graph/) | `/knowledge-graph` | Auto-extract entities from docs, explore with Cypher |
37
- | [multi-agent-workspace](multi-agent-workspace/) | `/multi-agent-workspace` | Shareable MCP URL for multi-agent collaboration |
38
- | [sql-analyst](sql-analyst/) | `/sql-analyst` | Upload a CSV, ask plain English, get SQL + results |
39
- | [streaming-analyst](streaming-analyst/) | `/streaming-analyst` | Connect Kafka, aggregate, detect anomalies |
40
- | [vector-search](vector-search/) | `/vector-search` | Upload a document, retrieve semantically similar passages |
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-analyst skill running inside Claude Code
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-analyst${NC}\n"
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 run-toolbelt skill running inside Claude Code
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}> /run-toolbelt document_url=https://docs.toolbelt.ai/intro.pdf question=\"What is Toolbelt?\"${NC}\n"
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"
Binary file
Binary file
Binary file
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.1.4",
4
- "description": "Official Toolbelt skills for Claude Code and MCP agents run-toolbelt, geo-analyst, knowledge-graph, sql-analyst, vector-search, streaming-analyst, multi-agent-workspace, data-blend.",
3
+ "version": "0.2.1",
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
- "vector-search"
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
- "data-blend",
33
- "geo-analyst",
34
- "knowledge-graph",
35
- "multi-agent-workspace",
36
- "run-toolbelt",
37
- "sql-analyst",
38
- "streaming-analyst",
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
  ],
@@ -0,0 +1,307 @@
1
+ ---
2
+ name: toolbelt-analyze
3
+ description: >
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).
13
+ license: MIT
14
+ compatibility: >
15
+ Requires a Toolbelt account (provision free at https://toolbelt.ai) and an
16
+ MCP-compatible AI agent (Claude Code, Claude Desktop, OpenClaw, or any client
17
+ that supports MCP server connections). MCP connection must be pre-established
18
+ before invocation.
19
+ metadata:
20
+ author: toolbeltai
21
+ version: "2.0"
22
+ homepage: "https://toolbelt.ai/docs/sql"
23
+ ---
24
+
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.
31
+
32
+ ## When Not To Use
33
+
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`.
37
+
38
+ ## Invocation Parameters
39
+
40
+ Extract these from the args string or conversation context before starting:
41
+
42
+ | Parameter | Required | Description |
43
+ |---|---|---|
44
+ | `namespace_id` | No | UUID of target namespace. Auto-select if omitted and only one exists; fail if ambiguous. |
45
+ | `csv_inputs` | No | Array of `{ name, content }` objects for multi-table analysis (e.g. orders + customers). Preferred when two or more related CSVs need JOINs. |
46
+ | `csv_content` | No | Single CSV text (shorthand for `csv_inputs: [{ name: asset_name, content: ... }]`). |
47
+ | `asset_name` | No | Name for the single uploaded table (when `csv_content` is used). Defaults to `sales-data`. |
48
+ | `question` | No | Natural language question. Defaults vary by input shape (see below). |
49
+
50
+ If neither `csv_inputs` nor `csv_content` is provided, use the single built-in
51
+ sample dataset below with `asset_name = "sales-data"`.
52
+
53
+ The resolved list of uploads is called **`uploads`** for the rest of this
54
+ skill — each element has `{ name, content }`.
55
+
56
+ ---
57
+
58
+ ## Default Sample Data
59
+
60
+ If no inputs are provided, use this single sales dataset verbatim as
61
+ `uploads = [{ name: "sales-data", content: <csv below> }]`:
62
+
63
+ ```
64
+ order_id,date,region,product,category,quantity,unit_price,amount,rep
65
+ 1001,2024-01-05,Northeast,Widget Pro,Hardware,12,49.99,599.88,Alice Chen
66
+ 1002,2024-01-08,Southeast,Gadget Basic,Software,5,29.99,149.95,Bob Martinez
67
+ 1003,2024-01-12,Midwest,Widget Pro,Hardware,8,49.99,399.92,Carol Singh
68
+ 1004,2024-01-15,West,Service Plan,Services,3,199.00,597.00,David Park
69
+ 1005,2024-01-19,Northeast,Gadget Basic,Software,20,29.99,599.80,Alice Chen
70
+ 1006,2024-01-22,West,Widget Pro,Hardware,6,49.99,299.94,Emma Lopez
71
+ 1007,2024-02-03,Southeast,Service Plan,Services,2,199.00,398.00,Bob Martinez
72
+ 1008,2024-02-07,Midwest,Gadget Plus,Software,15,79.99,1199.85,Frank Kim
73
+ 1009,2024-02-11,Northeast,Widget Pro,Hardware,10,49.99,499.90,Alice Chen
74
+ 1010,2024-02-14,West,Gadget Basic,Software,8,29.99,239.92,David Park
75
+ 1011,2024-02-18,Southeast,Gadget Plus,Software,4,79.99,319.96,Carol Singh
76
+ 1012,2024-02-21,Midwest,Service Plan,Services,1,199.00,199.00,Frank Kim
77
+ 1013,2024-03-02,Northeast,Service Plan,Services,5,199.00,995.00,Alice Chen
78
+ 1014,2024-03-06,West,Gadget Plus,Software,9,79.99,719.91,Emma Lopez
79
+ 1015,2024-03-10,Southeast,Widget Pro,Hardware,7,49.99,349.93,Bob Martinez
80
+ 1016,2024-03-14,Midwest,Gadget Basic,Software,11,29.99,329.89,Carol Singh
81
+ 1017,2024-03-18,Northeast,Gadget Plus,Software,6,79.99,479.94,David Park
82
+ 1018,2024-03-22,West,Service Plan,Services,4,199.00,796.00,Emma Lopez
83
+ 1019,2024-03-25,Southeast,Widget Pro,Hardware,3,49.99,149.97,Frank Kim
84
+ 1020,2024-03-28,Midwest,Widget Pro,Hardware,14,49.99,699.86,Carol Singh
85
+ ```
86
+
87
+ Default `question` for the single-table case:
88
+ `What is the total sales amount by region?`
89
+
90
+ For multi-table cases (`csv_inputs.length >= 2`) with no `question` provided,
91
+ ask the user to clarify — don't guess a default cross-table question.
92
+
93
+ ---
94
+
95
+ ## Phase 0: Verify Connection
96
+
97
+ Call `toolbelt_list_namespaces` (no arguments) immediately.
98
+
99
+ - **If it succeeds:** proceed to Phase 1 using the returned namespaces.
100
+ - **If it fails:** emit structured failure and halt.
101
+
102
+ ```
103
+ FAILURE: Toolbelt MCP connection is not established.
104
+ The MCP server must be connected before invoking this skill.
105
+ See: https://toolbelt.ai/docs/mcp for setup instructions.
106
+ ```
107
+
108
+ ---
109
+
110
+ ## Phase 1: Resolve Namespace
111
+
112
+ Use the namespaces returned from Phase 0.
113
+
114
+ Resolution order:
115
+ 1. If `namespace_id` was provided as a parameter, use it directly.
116
+ 2. If only one namespace exists, use it.
117
+ 3. If multiple exist and no `namespace_id` was specified, emit structured failure and halt.
118
+
119
+ ```
120
+ FAILURE: Multiple namespaces found and none specified.
121
+ Available: [<list namespace display names and IDs>]
122
+ Re-invoke with namespace_id=<uuid>.
123
+ ```
124
+
125
+ Store the resolved `namespace_id` — pass it to every subsequent tool call.
126
+
127
+ ---
128
+
129
+ ## Phase 2: Upload Each CSV
130
+
131
+ Resolve `uploads` per the Invocation Parameters section.
132
+
133
+ **For each** `{ name, content }` in `uploads`, call `toolbelt_save`:
134
+
135
+ ```json
136
+ {
137
+ "asset_type": "document",
138
+ "namespace_id": "<namespace_id>",
139
+ "name": "<name>",
140
+ "file_name": "<name>.csv",
141
+ "content": "<content>",
142
+ "content_encoding": "text",
143
+ "data_format": "csv"
144
+ }
145
+ ```
146
+
147
+ Collect the returned `asset_id` for each upload into an array `asset_ids`.
148
+ Track the upload count as `upload_count`.
149
+
150
+ If any `toolbelt_save` fails, emit structured failure naming which upload
151
+ failed and halt — partial multi-table ingests can't be joined.
152
+
153
+ ---
154
+
155
+ ## Phase 3: Poll for All Ingestions
156
+
157
+ Call `toolbelt_jobs` with `{ "namespace_id": "<namespace_id>" }` every 10 seconds.
158
+
159
+ Wait until **every** `ingest` job for the `asset_ids` from Phase 2 reaches `completed`.
160
+
161
+ Typical duration: 15–60 seconds per file. Maximum wait: 3 minutes total.
162
+
163
+ If any job reaches `failed` or the timeout elapses, emit structured failure:
164
+ ```
165
+ FAILURE: Ingestion did not complete for <asset_name>.
166
+ Job status: <last observed status>
167
+ Completed so far: <N of M>
168
+ ```
169
+
170
+ ---
171
+
172
+ ## Phase 4: Get Schema Context
173
+
174
+ Call `toolbelt_context` with `{ "namespace_id": "<namespace_id>" }`.
175
+
176
+ For each uploaded `asset_name` (from Phase 2), locate the corresponding
177
+ table in the returned context and record:
178
+ - `table_name`: the SQL table name
179
+ - `column_names`: columns in that table
180
+ - `row_count`: row count if provided
181
+
182
+ Store all of them in a `tables` array so Phase 5 can reason about JOINs.
183
+
184
+ ---
185
+
186
+ ## Phase 5: Answer the Question
187
+
188
+ Resolve `question` per the Invocation Parameters section.
189
+
190
+ **Decide on approach using `upload_count`:**
191
+
192
+ ### If `upload_count == 1` (single-table analytics)
193
+
194
+ Prefer `toolbelt_search` (it routes through our hybrid + NL→SQL layer):
195
+
196
+ ```json
197
+ {
198
+ "question": "<question>",
199
+ "namespace_id": "<namespace_id>",
200
+ "synthesize": true
201
+ }
202
+ ```
203
+
204
+ If `toolbelt_search` does not return SQL, fall back to `toolbelt_sql`
205
+ with a query you write from the single table's schema:
206
+
207
+ ```json
208
+ {
209
+ "namespace_id": "<namespace_id>",
210
+ "query": "SELECT <...> FROM <table_name> ..."
211
+ }
212
+ ```
213
+
214
+ ### If `upload_count >= 2` (multi-table JOIN)
215
+
216
+ 1. From the `tables` array collected in Phase 4, **identify candidate join
217
+ keys** — columns that appear in two or more tables with compatible types
218
+ and matching name patterns (e.g. `customer_id` in `orders` + `customers`).
219
+ 2. Write a `SELECT` that JOINs on the identified key(s) and answers the
220
+ user's question. Prefer explicit `JOIN ... ON ...` (never implicit join).
221
+ 3. Call `toolbelt_sql` directly with the JOIN query:
222
+
223
+ ```json
224
+ {
225
+ "namespace_id": "<namespace_id>",
226
+ "query": "SELECT a.<col>, SUM(b.<col>) FROM <t1> a JOIN <t2> b ON a.<key> = b.<key> GROUP BY a.<col>"
227
+ }
228
+ ```
229
+
230
+ If no join key is identifiable, emit structured failure explaining which
231
+ tables were uploaded and asking the caller to supply a join key:
232
+ ```
233
+ FAILURE: Uploaded tables have no obvious join key.
234
+ Tables and columns: [<summary>]
235
+ Re-invoke with a question that specifies which column(s) relate the tables.
236
+ ```
237
+
238
+ ### For either case, parse the result:
239
+
240
+ - `answer`: synthesized natural-language answer (if using `toolbelt_search`) or a one-sentence summary you compose from the rows (if using `toolbelt_sql` directly)
241
+ - `sql_generated`: the SQL that ran
242
+ - `row_count`: rows returned
243
+ - `sources`: cited tables/assets
244
+
245
+ Record the path used as `query_method` — `"search"` (NL→SQL via hybrid),
246
+ `"direct_sql_single"` (one-table direct), or `"direct_sql_join"` (multi-table JOIN).
247
+
248
+ ---
249
+
250
+ ## Phase 6: Structured Output
251
+
252
+ After all phases complete, emit a single structured result:
253
+
254
+ ```
255
+ RESULT:
256
+ namespace_id: <uuid>
257
+ uploaded_tables:
258
+ - asset_name: <name>
259
+ table_name: <sql table name>
260
+ column_names: [<list>]
261
+ row_count_ingested: <rows>
262
+ upload_count: <N>
263
+ phases_run: [0, 1, 2, 3, 4, 5]
264
+
265
+ question: "<question asked>"
266
+ query_method: "<search | direct_sql_single | direct_sql_join>"
267
+ sql_generated: |
268
+ <SQL query executed>
269
+ row_count: <rows returned>
270
+ answer: |
271
+ <natural-language answer>
272
+ sources: [<tables cited>]
273
+ ```
274
+
275
+ ---
276
+
277
+ ## Tool Reference
278
+
279
+ | Phase | Tool(s) |
280
+ |---|---|
281
+ | 0. Verify connection | `toolbelt_list_namespaces` |
282
+ | 1. Resolve namespace | (from Phase 0 result) |
283
+ | 2. Upload each CSV | `toolbelt_save` (once per input) |
284
+ | 3. Poll for ingestion | `toolbelt_jobs` |
285
+ | 4. Get schema context | `toolbelt_context` |
286
+ | 5. Answer | `toolbelt_search` (single-table NL path), `toolbelt_sql` (direct; required for JOINs) |
287
+ | 6. Emit result | (structured output) |
288
+
289
+ ---
290
+
291
+ ## Multi-Table Example
292
+
293
+ Invocation:
294
+ ```
295
+ /toolbelt-analyze csv_inputs=[
296
+ { name: "orders", content: "order_id,customer_id,amount,..." },
297
+ { name: "customers", content: "customer_id,region,tier,..." }
298
+ ] question="Total amount by customer region"
299
+ ```
300
+
301
+ Expected phases:
302
+ - Phase 2: `toolbelt_save` for `orders`, then `toolbelt_save` for `customers`
303
+ - Phase 3: poll both `ingest` jobs to completion
304
+ - Phase 4: context returns two tables; record both schemas
305
+ - Phase 5: identify `customer_id` as the join key, run
306
+ `SELECT c.region, SUM(o.amount) FROM orders o JOIN customers c ON o.customer_id = c.customer_id GROUP BY c.region`
307
+ - Phase 6: structured result with `query_method = "direct_sql_join"` and both tables in `uploaded_tables`
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: knowledge-graph
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 vector-search) or tabular analytics (use sql-analyst).
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/knowledge-graph"
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 `sql-analyst` instead.
30
- - When entity and relationship extraction is not needed — use `sql-analyst` or `streaming-analyst` for the appropriate data type.
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
 
@@ -1,13 +1,13 @@
1
1
  ---
2
- name: vector-search
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 sql-analyst), or entity-relationship extraction
10
- (use knowledge-graph).
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 `sql-analyst` instead.
30
- - For aggregate queries, counts, or filtering by exact values — use `sql-analyst`; vector search ranks by meaning, not criteria.
31
- - For entity and relationship extraction — use `knowledge-graph` instead.
32
- - When you need a synthesized answer that may draw on SQL tables — use `sql-analyst` with `toolbelt_search` (hybrid routing) instead.
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 `vector-search-sample`. |
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
 
@@ -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 `vector-search-sample`).
145
+ Resolve `document_name` (use parameter value or default `toolbelt-find-sample`).
146
146
 
147
147
  Call `toolbelt_save`:
148
148
 
@@ -1,7 +1,7 @@
1
- # geo-analyst
1
+ # toolbelt-geo
2
2
 
3
- ![geo-analyst demo](../assets/geo-analyst-demo.gif)
3
+ ![toolbelt-geo demo](../assets/toolbelt-geo-demo.gif)
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-analyst` in Claude Code, or via the `Skill` tool in any MCP-capable agent.
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-analyst
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 sql-analyst) or
10
- document content (use vector-search).
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 `sql-analyst` instead.
31
- - For unstructured text or documents — use `knowledge-graph` instead.
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
 
@@ -1,12 +1,12 @@
1
1
  ---
2
- name: multi-agent-workspace
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
- run-toolbelt instead.
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 `sql-analyst`, `streaming-analyst`, or `knowledge-graph` instead.
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
 
@@ -1,10 +1,10 @@
1
- # run-toolbelt
1
+ # toolbelt-start
2
2
 
3
- ![run-toolbelt demo](../assets/run-toolbelt-demo.gif)
3
+ ![toolbelt-start demo](../assets/toolbelt-start-demo.gif)
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 `/run-toolbelt` in Claude Code, or via the `Skill` tool in any MCP-capable agent.
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
- /run-toolbelt
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
- /run-toolbelt document_url=https://example.com/report.pdf question="What are the key findings?"
44
+ /toolbelt-start document_url=https://example.com/report.pdf question="What are the key findings?"
45
45
  ```
46
46
 
47
47
  ```
48
- /run-toolbelt document_content="Q1 revenue was $4.2M across three product lines." document_name="q1-summary" question="What was Q1 revenue?"
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
- /run-toolbelt namespace_id=<uuid> document_url=https://example.com/report.pdf question="Summarize this."
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
- /run-toolbelt kafka_broker=kafka-broker:9092 kafka_topic=events kafka_schema="id INTEGER, event VARCHAR(256), ts TIMESTAMP"
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
- /run-toolbelt \
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: "run-toolbelt", args: "namespace_id=<uuid> document_url=https://... question=..." }
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: run-toolbelt
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 sql-analyst, vector-search, or
9
- knowledge-graph for that.
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 `sql-analyst` instead.
31
- - When you only need to upload and analyze a CSV — use `sql-analyst` instead.
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
 
@@ -1,12 +1,12 @@
1
1
  ---
2
- name: streaming-analyst
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 sql-analyst) or document content (use vector-search).
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 `sql-analyst` instead.
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
@@ -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 `toolbelt_list_namespaces` (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 | `toolbelt_list_namespaces` |
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) |
@@ -1,231 +0,0 @@
1
- ---
2
- name: sql-analyst
3
- description: >
4
- Upload a CSV and answer natural-language questions by generating and executing
5
- SQL. Covers totals, averages, group-by, filtering, and single-table joins on
6
- tabular data. Use when an agent has structured rows/columns and needs analytical
7
- answers — trends, breakdowns, comparisons, rankings. NOT for unstructured
8
- documents (use knowledge-graph or vector-search), lat/lon or WKT data (use
9
- geo-analyst), live streams (use streaming-analyst), or multi-table JOINs across
10
- independent datasets (use data-blend).
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 tabular data and answer natural language questions about it using
24
- Toolbelt MCP tools. Work through each phase in order without prompting for
25
- user input. On unrecoverable error, emit a structured failure and halt.
26
-
27
- ## When Not To Use
28
-
29
- - For unstructured text or documents — use `knowledge-graph` to extract entities and relationships.
30
- - For real-time or streaming data — use `streaming-analyst` instead.
31
- - For spatial data with lat/lon coordinates — use `geo-analyst` instead.
32
-
33
- ## Invocation Parameters
34
-
35
- Extract these from the args string or conversation context before starting:
36
-
37
- | Parameter | Required | Description |
38
- |---|---|---|
39
- | `namespace_id` | No | UUID of target namespace. Auto-select if omitted and only one exists; fail if ambiguous. |
40
- | `csv_content` | No | Raw CSV text to upload. Uses the embedded sample dataset if omitted. |
41
- | `asset_name` | No | Name for the uploaded table asset. Defaults to `sales-data`. |
42
- | `question` | No | Natural language question to ask about the data. Defaults to `What is the total sales amount by region?` |
43
-
44
- ---
45
-
46
- ## Default Sample Data
47
-
48
- If no `csv_content` is provided, use this sales dataset verbatim:
49
-
50
- ```
51
- order_id,date,region,product,category,quantity,unit_price,amount,rep
52
- 1001,2024-01-05,Northeast,Widget Pro,Hardware,12,49.99,599.88,Alice Chen
53
- 1002,2024-01-08,Southeast,Gadget Basic,Software,5,29.99,149.95,Bob Martinez
54
- 1003,2024-01-12,Midwest,Widget Pro,Hardware,8,49.99,399.92,Carol Singh
55
- 1004,2024-01-15,West,Service Plan,Services,3,199.00,597.00,David Park
56
- 1005,2024-01-19,Northeast,Gadget Basic,Software,20,29.99,599.80,Alice Chen
57
- 1006,2024-01-22,West,Widget Pro,Hardware,6,49.99,299.94,Emma Lopez
58
- 1007,2024-02-03,Southeast,Service Plan,Services,2,199.00,398.00,Bob Martinez
59
- 1008,2024-02-07,Midwest,Gadget Plus,Software,15,79.99,1199.85,Frank Kim
60
- 1009,2024-02-11,Northeast,Widget Pro,Hardware,10,49.99,499.90,Alice Chen
61
- 1010,2024-02-14,West,Gadget Basic,Software,8,29.99,239.92,David Park
62
- 1011,2024-02-18,Southeast,Gadget Plus,Software,4,79.99,319.96,Carol Singh
63
- 1012,2024-02-21,Midwest,Service Plan,Services,1,199.00,199.00,Frank Kim
64
- 1013,2024-03-02,Northeast,Service Plan,Services,5,199.00,995.00,Alice Chen
65
- 1014,2024-03-06,West,Gadget Plus,Software,9,79.99,719.91,Emma Lopez
66
- 1015,2024-03-10,Southeast,Widget Pro,Hardware,7,49.99,349.93,Bob Martinez
67
- 1016,2024-03-14,Midwest,Gadget Basic,Software,11,29.99,329.89,Carol Singh
68
- 1017,2024-03-18,Northeast,Gadget Plus,Software,6,79.99,479.94,David Park
69
- 1018,2024-03-22,West,Service Plan,Services,4,199.00,796.00,Emma Lopez
70
- 1019,2024-03-25,Southeast,Widget Pro,Hardware,3,49.99,149.97,Frank Kim
71
- 1020,2024-03-28,Midwest,Widget Pro,Hardware,14,49.99,699.86,Carol Singh
72
- ```
73
-
74
- Default `question`: `What is the total sales amount by region?`
75
-
76
- ---
77
-
78
- ## Phase 0: Verify Connection
79
-
80
- Call `toolbelt_list_namespaces` (no arguments) immediately.
81
-
82
- - **If it succeeds:** proceed to Phase 1 using the returned namespaces.
83
- - **If it fails:** emit structured failure and halt.
84
-
85
- ```
86
- FAILURE: Toolbelt MCP connection is not established.
87
- The MCP server must be connected before invoking this skill.
88
- See: https://toolbelt.ai/docs/mcp for setup instructions.
89
- ```
90
-
91
- ---
92
-
93
- ## Phase 1: Resolve Namespace
94
-
95
- Use the namespaces returned from Phase 0.
96
-
97
- Resolution order:
98
- 1. If `namespace_id` was provided as a parameter, use it directly.
99
- 2. If only one namespace exists, use it.
100
- 3. If multiple exist and no `namespace_id` was specified, emit structured failure and halt.
101
-
102
- ```
103
- FAILURE: Multiple namespaces found and none specified.
104
- Available: [<list namespace display names and IDs>]
105
- Re-invoke with namespace_id=<uuid>.
106
- ```
107
-
108
- Store the resolved `namespace_id` — pass it to every subsequent tool call.
109
-
110
- ---
111
-
112
- ## Phase 2: Upload CSV Data
113
-
114
- Resolve `csv_content` (use parameter value or default sample above).
115
- Resolve `asset_name` (use parameter value or default `sales-data`).
116
-
117
- Call `toolbelt_save`:
118
-
119
- ```json
120
- {
121
- "asset_type": "document",
122
- "namespace_id": "<namespace_id>",
123
- "name": "<asset_name>",
124
- "file_name": "<asset_name>.csv",
125
- "content": "<csv_content>",
126
- "content_encoding": "text",
127
- "data_format": "csv"
128
- }
129
- ```
130
-
131
- Record the returned `asset_id`.
132
-
133
- ---
134
-
135
- ## Phase 3: Poll for Ingestion
136
-
137
- Call `toolbelt_jobs` with `{ "namespace_id": "<namespace_id>" }` every 10 seconds.
138
-
139
- Wait for the `ingest` job for this asset to reach `completed`.
140
-
141
- Typical duration: 15–60 seconds. Maximum wait: 3 minutes.
142
-
143
- If the job reaches `failed` or the timeout elapses, emit structured failure and halt:
144
- ```
145
- FAILURE: CSV ingestion did not complete.
146
- Job status: <last observed status>
147
- ```
148
-
149
- ---
150
-
151
- ## Phase 4: Get Schema Context
152
-
153
- Call `toolbelt_context` with `{ "namespace_id": "<namespace_id>" }`.
154
-
155
- Locate the table corresponding to the uploaded asset (match by `asset_name` or
156
- the table name returned from the save call). Record:
157
- - `table_name`: the SQL table name for this asset
158
- - `column_names`: list of columns in the table
159
- - `row_count`: number of rows if provided in context
160
-
161
- ---
162
-
163
- ## Phase 5: Ask a Natural Language Question
164
-
165
- Resolve `question` (use parameter value or default).
166
-
167
- Call `toolbelt_search`:
168
-
169
- ```json
170
- {
171
- "question": "<question>",
172
- "namespace_id": "<namespace_id>",
173
- "synthesize": true
174
- }
175
- ```
176
-
177
- Parse the response to extract:
178
- - `answer`: the synthesized natural language answer
179
- - `sql_generated`: the SQL query that was generated and executed
180
- - `row_count`: number of rows returned by the SQL query
181
- - `sources`: any cited source tables or assets
182
-
183
- If `toolbelt_search` does not return SQL, try `toolbelt_sql` directly with a
184
- query you write from the schema context:
185
-
186
- ```json
187
- {
188
- "namespace_id": "<namespace_id>",
189
- "query": "SELECT region, SUM(amount) AS total_amount FROM <table_name> GROUP BY region ORDER BY total_amount DESC"
190
- }
191
- ```
192
-
193
- Record whichever path succeeded as `query_method` (`"search"` or `"direct_sql"`).
194
-
195
- ---
196
-
197
- ## Phase 6: Structured Output
198
-
199
- After all phases complete, emit a single structured result:
200
-
201
- ```
202
- RESULT:
203
- namespace_id: <uuid>
204
- asset_name: <name of uploaded table>
205
- table_name: <SQL table name>
206
- row_count_ingested: <rows in the table>
207
- phases_run: [0, 1, 2, 3, 4, 5]
208
-
209
- question: "<question asked>"
210
- query_method: "<'search' or 'direct_sql'>"
211
- sql_generated: |
212
- <SQL query that was generated or executed>
213
- row_count: <number of rows returned by the query>
214
- answer: |
215
- <synthesized answer>
216
- sources: [<cited tables or assets>]
217
- ```
218
-
219
- ---
220
-
221
- ## Tool Reference
222
-
223
- | Phase | Tool(s) |
224
- |---|---|
225
- | 0. Verify connection | `toolbelt_list_namespaces` |
226
- | 1. Resolve namespace | (from Phase 0 result) |
227
- | 2. Upload CSV document | `toolbelt_save` |
228
- | 3. Poll for ingestion | `toolbelt_jobs` |
229
- | 4. Get schema context | `toolbelt_context` |
230
- | 5. Ask question | `toolbelt_search`, `toolbelt_sql` (fallback) |
231
- | 6. Emit result | (structured output) |