Skip to content

Commit 3480aee

Browse files
committed
docs(tools): tell tool authors to regenerate the metadata artifacts
A new tool now has a second registration step. Client code reads `params` and `outputs` from the generated artifacts rather than from the registry, so a tool added without regenerating them is registered but invisible to the UI — and CI fails on the stale artifacts. `add-tools` and `add-integration` are where someone actually adds a tool, so the step goes in both, next to the registry edit and in each checklist.
1 parent 6bb7a7b commit 3480aee

6 files changed

Lines changed: 69 additions & 0 deletions

File tree

.agents/skills/add-integration/SKILL.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,16 @@ export const tools: Record<string, ToolConfig> = {
415415
}
416416
```
417417

418+
Then regenerate the generated tool metadata and commit it:
419+
420+
```bash
421+
bun run tool-metadata:generate
422+
```
423+
424+
Client code reads `params`/`outputs` from these artifacts rather than importing
425+
the registry, so a new tool is invisible to the UI until they are regenerated,
426+
and CI fails on stale ones. See `.agents/skills/tool-registry-boundary/SKILL.md`.
427+
418428
### Block Registry (`apps/sim/blocks/registry-maps.ts`)
419429

420430
The data maps (`BLOCK_REGISTRY` + `BLOCK_META_REGISTRY`) live in `registry-maps.ts`; `registry.ts` holds only the accessor functions. Add the import and an entry to each map alphabetically:
@@ -490,6 +500,7 @@ If creating V2 versions (API-aligned outputs):
490500
- [ ] All optional outputs have `optional: true`
491501
- [ ] Created `index.ts` barrel export
492502
- [ ] Registered all tools in `tools/registry.ts`
503+
- [ ] Ran `bun run tool-metadata:generate` and committed the regenerated artifacts
493504

494505
### Block
495506
- [ ] Created `blocks/blocks/{service}.ts`

.agents/skills/add-tools/SKILL.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,17 @@ export const tools = {
296296
}
297297
```
298298

299+
3. Regenerate the tool metadata artifacts:
300+
301+
```bash
302+
bun run tool-metadata:generate
303+
```
304+
305+
Client code reads a tool's `params`/`outputs` from generated metadata rather than
306+
importing the registry, so a new or changed tool is invisible to the UI until
307+
these are regenerated — and CI fails on stale artifacts. Commit the result. See
308+
`.agents/skills/tool-registry-boundary/SKILL.md`.
309+
299310
## Wiring Tools into the Block (Required)
300311

301312
After registering in `tools/registry.ts`, you MUST also update the block definition at `apps/sim/blocks/blocks/{service}.ts`. This is not optional — tools are only usable from the UI if they are wired into the block.
@@ -443,6 +454,7 @@ All tool IDs MUST use `snake_case`: `{service}_{action}` (e.g., `x_create_tweet`
443454
- [ ] Types file has all interfaces
444455
- [ ] Index.ts exports all tools and re-exports types (`export * from './types'`)
445456
- [ ] Tools registered in `tools/registry.ts`
457+
- [ ] `bun run tool-metadata:generate` run and the regenerated artifacts committed
446458
- [ ] Block wired: `tools.access`, dropdown options, subBlocks, `tools.config`, outputs, inputs
447459

448460
## Final Validation (Required)

.claude/commands/add-integration.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,16 @@ export const tools: Record<string, ToolConfig> = {
414414
}
415415
```
416416

417+
Then regenerate the generated tool metadata and commit it:
418+
419+
```bash
420+
bun run tool-metadata:generate
421+
```
422+
423+
Client code reads `params`/`outputs` from these artifacts rather than importing
424+
the registry, so a new tool is invisible to the UI until they are regenerated,
425+
and CI fails on stale ones. See `.agents/skills/tool-registry-boundary/SKILL.md`.
426+
417427
### Block Registry (`apps/sim/blocks/registry-maps.ts`)
418428

419429
The data maps (`BLOCK_REGISTRY` + `BLOCK_META_REGISTRY`) live in `registry-maps.ts`; `registry.ts` holds only the accessor functions. Add the import and an entry to each map alphabetically:
@@ -489,6 +499,7 @@ If creating V2 versions (API-aligned outputs):
489499
- [ ] All optional outputs have `optional: true`
490500
- [ ] Created `index.ts` barrel export
491501
- [ ] Registered all tools in `tools/registry.ts`
502+
- [ ] Ran `bun run tool-metadata:generate` and committed the regenerated artifacts
492503

493504
### Block
494505
- [ ] Created `blocks/blocks/{service}.ts`

.claude/commands/add-tools.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,17 @@ export const tools = {
295295
}
296296
```
297297

298+
3. Regenerate the tool metadata artifacts:
299+
300+
```bash
301+
bun run tool-metadata:generate
302+
```
303+
304+
Client code reads a tool's `params`/`outputs` from generated metadata rather than
305+
importing the registry, so a new or changed tool is invisible to the UI until
306+
these are regenerated — and CI fails on stale artifacts. Commit the result. See
307+
`.agents/skills/tool-registry-boundary/SKILL.md`.
308+
298309
## Wiring Tools into the Block (Required)
299310

300311
After registering in `tools/registry.ts`, you MUST also update the block definition at `apps/sim/blocks/blocks/{service}.ts`. This is not optional — tools are only usable from the UI if they are wired into the block.
@@ -442,6 +453,7 @@ All tool IDs MUST use `snake_case`: `{service}_{action}` (e.g., `x_create_tweet`
442453
- [ ] Types file has all interfaces
443454
- [ ] Index.ts exports all tools and re-exports types (`export * from './types'`)
444455
- [ ] Tools registered in `tools/registry.ts`
456+
- [ ] `bun run tool-metadata:generate` run and the regenerated artifacts committed
445457
- [ ] Block wired: `tools.access`, dropdown options, subBlocks, `tools.config`, outputs, inputs
446458

447459
## Final Validation (Required)

.cursor/commands/add-integration.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,16 @@ export const tools: Record<string, ToolConfig> = {
409409
}
410410
```
411411

412+
Then regenerate the generated tool metadata and commit it:
413+
414+
```bash
415+
bun run tool-metadata:generate
416+
```
417+
418+
Client code reads `params`/`outputs` from these artifacts rather than importing
419+
the registry, so a new tool is invisible to the UI until they are regenerated,
420+
and CI fails on stale ones. See `.agents/skills/tool-registry-boundary/SKILL.md`.
421+
412422
### Block Registry (`apps/sim/blocks/registry-maps.ts`)
413423

414424
The data maps (`BLOCK_REGISTRY` + `BLOCK_META_REGISTRY`) live in `registry-maps.ts`; `registry.ts` holds only the accessor functions. Add the import and an entry to each map alphabetically:
@@ -484,6 +494,7 @@ If creating V2 versions (API-aligned outputs):
484494
- [ ] All optional outputs have `optional: true`
485495
- [ ] Created `index.ts` barrel export
486496
- [ ] Registered all tools in `tools/registry.ts`
497+
- [ ] Ran `bun run tool-metadata:generate` and committed the regenerated artifacts
487498

488499
### Block
489500
- [ ] Created `blocks/blocks/{service}.ts`

.cursor/commands/add-tools.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,17 @@ export const tools = {
290290
}
291291
```
292292

293+
3. Regenerate the tool metadata artifacts:
294+
295+
```bash
296+
bun run tool-metadata:generate
297+
```
298+
299+
Client code reads a tool's `params`/`outputs` from generated metadata rather than
300+
importing the registry, so a new or changed tool is invisible to the UI until
301+
these are regenerated — and CI fails on stale artifacts. Commit the result. See
302+
`.agents/skills/tool-registry-boundary/SKILL.md`.
303+
293304
## Wiring Tools into the Block (Required)
294305

295306
After registering in `tools/registry.ts`, you MUST also update the block definition at `apps/sim/blocks/blocks/{service}.ts`. This is not optional — tools are only usable from the UI if they are wired into the block.
@@ -437,6 +448,7 @@ All tool IDs MUST use `snake_case`: `{service}_{action}` (e.g., `x_create_tweet`
437448
- [ ] Types file has all interfaces
438449
- [ ] Index.ts exports all tools and re-exports types (`export * from './types'`)
439450
- [ ] Tools registered in `tools/registry.ts`
451+
- [ ] `bun run tool-metadata:generate` run and the regenerated artifacts committed
440452
- [ ] Block wired: `tools.access`, dropdown options, subBlocks, `tools.config`, outputs, inputs
441453

442454
## Final Validation (Required)

0 commit comments

Comments
 (0)