Przejdź do treści
Biblioteka skilli
AI i agenci · Automatyzacja

tool-scripting

/tool-scripting

Pisze skrypty wywołujące narzędzia MCP organizacji z poziomu sandboxa, np. do wielu wywołań dla każdego wiersza lub pliku.

Repozytorium
studio ↗
Licencja
MIT
Ostatnia zmiana repozytorium
27.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Pisze skrypty wywołujące narzędzia MCP organizacji z poziomu sandboxa, np. do wielu wywołań dla każdego wiersza lub pliku.

Oryginalny opis (EN)

Script against the org's MCP tools from inside the sandbox — discover schemas under .deco/tools/, call one tool from the shell with `typegen call`, or batch many calls in a script. Use whenever a task needs repeated or bulk tool calls (same tool many times, one call per file/row/item) instead of one-at-a-time agent tool calls.

Jak działa

  1. Discover tools (cheap)
  2. One-off call from the shell
  3. Bulk calls — write a script
  4. Typed client (optional)
Sekcje z nagłówków SKILL.md, w oryginale · 104 linii, 466 słów
Podgląd SKILL.md
---
name: tool-scripting
description: Script against the org's MCP tools from inside the sandbox — discover schemas under .deco/tools/, call one tool from the shell with `typegen call`, or batch many calls in a script. Use whenever a task needs repeated or bulk tool calls (same tool many times, one call per file/row/item) instead of one-at-a-time agent tool calls.
---

# tool-scripting — call org tools from scripts

The workspace carries a materialized catalog of the org's tools:

- `.deco/tools/<TOOL>.json` — one JSON Schema per tool:
  `{ name, description, inputSchema, outputSchema }`
- `.deco/tools/.endpoint.json` — the run's pre-authenticated MCP endpoint.
  The `typegen` CLI and client discover it automatically (walking up from
  cwd) — no flags, keys, or env needed. The daemon refreshes it; a reconnect
  picks up new credentials.

## Discover tools (cheap)

Browse the catalog from disk instead of loading every schema into context:

```bash
ls .deco/tools/
cat .deco/tools/SEND_EMAIL.json
```

or `typegen tools` (list names + descriptions) / `typegen tools SEND_EMAIL`
(one tool's full schema).

## One-off call from the shell

```bash
typegen call SEND_EMAIL '{"to":"ada@example.com","subject":"hi"}'
```

Prints the tool's structured output as JSON; non-zero exit and a message on
stderr on failure. If `typegen` is not on PATH, use
`bunx @decocms/typegen call ...`.

## Bulk calls — write a script

For N calls (a tool per row/file/item), never loop through your own
tool-calling — write a script, run it, read back the summary. Results belong
in a file, not in your context.

Set up a scratch project so the user's repo stays untouched. Cloud sandboxes
carry the typegen package built from the same Studio revision; Desktop falls
back to the published package. Then run from the repo root (endpoint discovery
walks up from cwd):

```bash
mkdir -p /tmp/toolrun && cd /tmp/toolrun
if [ -f /opt/sandbox-daemon/typegen.tgz ]; then
  bun add /opt/sandbox-daemon/typegen.tgz
else
  bun add @decocms/typegen
fi
cd - && bun run /tmp/toolrun/bulk.ts
```

```ts
// /tmp/toolrun/bulk.ts
import { createStudioClient } from "@decocms/typegen";

const client = createStudioClient(); // discovers .deco/tools/.endpoint.json
const rows: { email: string }[] = JSON.parse(
  await Bun.file("input.json").text(),
);

const out = Bun.file("results.jsonl").writer();
let ok = 0;
let failed = 0;
for (const [i, row] of rows.entries()) {
  try {
    const result = await client.SEND_EMAIL({ to: row.email, subject: "hi" });
    out.write(`${JSON.stringify({ i, ok: true, result })}\n`);
    ok++;
  } catch (err) {
    out.write(`${JSON.stringify({ i, ok: false, error: String(err) })}\n`);
    failed++;
  }
  if (i % 25 === 0) console.error(`progress ${i}/${rows.length}`);
}
out.end();
await client.close();
console.log(JSON.stringify({ ok, failed, total: rows.length }));
```

Determinism rules:

- Sequential by default. Only add bounded concurrency (a small worker pool)
  when the tool is safe to call in parallel.
- Every call's outcome goes to `results.jsonl` — partial progress survives a
  crash, and failures are greppable afterwards.
- On errors that look like expired credentials, `await client.close()` and
  retry the call once — the reconnect re-reads the endpoint file, which the
  daemon refreshes.
- Report the summary line (plus failures, if any) back to the user — not the
  N raw results.

## Typed client (optional)

```bash
typegen --output client.ts
```

generates a `client.ts` with one typed method per tool from the same
endpoint, for larger scripts where input/output types help.

Wersje

W bazie nie ma innych skilli o nazwie tool-scripting.

Migawka bazy z 13.11.2026 · wersja paczki ec30274d13b6 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 4 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100mcp-tool-scout
    Wykrywa serwery MCP i czyta schematy narzędzi przed ich wywołaniem, aby wybrać właściwe narzędzie MCP.
  • 100tools
    Optymalizuje zestaw narzędzi własnego agenta: nazwy, opisy, dokumentację parametrów, schematy i kod handlerów, gdy agent myli narzędzia lub błędnie wypełnia argumenty.
  • 100exploring-mcp-tool-quality
    Bada jakość wywołań narzędzi MCP w PostHog: wskaźniki błędów, opóźnienia, zasięg oraz które narzędzia zawodzą lub działają wolno.
  • 100tool-design
    Pomaga projektować narzędzia agentów i ich opisy oraz redukować złożoność, w tym narzędzia MCP, konsolidację i konwencje nazewnicze.
  • 100agent-tools
    Projektuje i przegląda narzędzia wywoływane przez agenta LLM: definicje, schematy JSON, opisy, komunikaty błędów i serwery MCP.
  • 100tool-design
    Pomaga projektować narzędzia agentów, opisy i interfejsy: konsolidacja, redukcja złożoności, nazewnictwo i narzędzia MCP, bez budowy serwerów MCP.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.