---
title: "Using an AI Assistant to Script Tools"
description: "Instead of feeding large datasets like Pylint violation JSON through an LLM to transform them into SQL INSERT statements, the assistant can be prompted to write a JavaScript program that performs the transformation, then run it through a tool call."
url: "https://swe.quest/articles/using-an-ai-assistant-to-script-tools-714a1e238504d1ea"
canonical: "https://www.docker.com/blog/using-an-ai-assistant-to-script-tools/"
source: "Docker"
published: "2024-10-07"
difficulty: "medium"
kind: "How-to"
reading_minutes: 5
tags: ["ai-agents","sandboxing","containers","llms"]
---

# Using an AI Assistant to Script Tools

A post on [Docker](https://swe.quest/sources/docker.md), published 2024-10-07, 5 min read, How-to. Original: [https://www.docker.com/blog/using-an-ai-assistant-to-script-tools/](https://www.docker.com/blog/using-an-ai-assistant-to-script-tools/)

## Summary

Instead of feeding large datasets like Pylint violation JSON through an LLM to transform them into SQL INSERT statements, the assistant can be prompted to write a JavaScript program that performs the transformation, then run it through a tool call. The tool is defined in YAML and backed by a minimal Docker container with no network, host filesystem, GPU or shell access, only shared volumes and Node.js. Having the model generate tools this way limits how much data goes into the context window and lets repeated tasks run without going back to the LLM.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Sandboxing & isolation](https://swe.quest/tags/sandboxing.md) (Security)
- [Containers](https://swe.quest/tags/containers.md) (Infrastructure)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)

## Prerequisites

- LLM tool calling ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- Docker containers ([easy posts on Containers](https://swe.quest/tags/containers.md?difficulty=easy))
- Node.js basics ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))

## Keywords

Docker, Pylint, GPT-3.5, Node.js, SQLite, Docker Labs GenAI

## Related posts

- [Using Docker AI Tools for Devs to Provide Context for Better Code Fixes](https://swe.quest/articles/using-docker-ai-tools-for-devs-to-provide-context-for-better-code-fixes-c0163de9f3027f93.md): Docker · 2024-10-21 · Medium · 8 min read · AI for coding, AI agents, Static analysis, Containers, Python
  LLMs fix lint violations far better when given the surrounding code, so Docker Labs built a prompt-driven pipeline where each step runs in a container: Pylint produces a violation report, violations are loaded into SQLite, and Tree-sitter parses the project into an AST whose top-level statement ranges are indexed alongside the source.
- [Vibe Coding With AI to Generate Synthetic Data: Part 1](https://swe.quest/articles/vibe-coding-with-ai-to-generate-synthetic-data-part-1-c25e10ea6da5bea8.md): Neon · 2025-03-13 · Medium · 6 min read · AI for coding, LLMs, PostgreSQL, Testing, CI/CD
  Asking Claude to generate synthetic Postgres seed data directly as SQL INSERT statements from a schema-only dump breaks down quickly: claude-3-5-sonnet lost referential integrity somewhere between 20 and 100 rows, and claude-3-7-sonnet often failed with 'model overloaded' errors.
- [Getting Started with the Labs AI Tools for Devs Docker Desktop Extension](https://swe.quest/articles/getting-started-with-the-labs-ai-tools-for-devs-docker-desktop-extension-82e61806b7468ca8.md): Docker · 2024-09-09 · Medium · 4 min read · AI agents, LLMs, Containers, Developer tools
  The Labs AI Tools for Devs Docker Desktop extension runs LLM prompts against local projects.
- [How Edgar Allan Poe found bugs in Turso](https://swe.quest/articles/how-edgar-allan-poe-found-bugs-in-turso-c2af43819364d44c.md): Turso · 2026-06-08 · Medium · 7 min read · Testing, AI agents, SQLite, LLMs, Databases
  Turso runs LLM coding agents (Claude Code with the Ralph Loop plugin) for days at a time to autonomously find SQL correctness bugs.
- [database.build v2: Bring-your-own-LLM](https://swe.quest/articles/database-build-v2-bring-your-own-llm-b2a3b83eee7ef5a0.md): Supabase · 2024-12-06 · Medium · 11 min read · PostgreSQL, LLMs, Browsers, WebAssembly
  database.build, Supabase's in-browser Postgres sandbox built on PGlite, now lets users bring any OpenAI-compatible LLM, with no login and no rate limits.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
