---
title: "Using an AI Assistant to Read Tool Documentation"
description: "LLM agents can learn unfamiliar command-line tools by reading their documentation and reacting to Unix error signals."
url: "https://swe.quest/articles/using-an-ai-assistant-to-read-tool-documentation-3a8f1d86f339e727"
canonical: "https://www.docker.com/blog/using-an-ai-assistant-to-read-tool-documentation/"
source: "Docker"
published: "2024-09-23"
difficulty: "medium"
kind: "Research"
reading_minutes: 7
tags: ["ai-agents","llms","containers","developer-tools","rag"]
---

# Using an AI Assistant to Read Tool Documentation

A post on [Docker](https://swe.quest/sources/docker.md), published 2024-09-23, 7 min read, Research. Original: [https://www.docker.com/blog/using-an-ai-assistant-to-read-tool-documentation/](https://www.docker.com/blog/using-an-ai-assistant-to-read-tool-documentation/)

## Summary

LLM agents can learn unfamiliar command-line tools by reading their documentation and reacting to Unix error signals. Each tool is packaged as a minimal Docker image exposed through two OpenAI-style tool definitions: one runs the command, the other reads its man page. Failures surface through exit codes and stderr, which the model uses to retry, and GPT-4, Llama 3.1 and Mistral responded to those errors differently. Across roughly 90 tools, only about 60% had man pages, so the fallback chain was man, --help, -h, then bad arguments to capture stderr. Long man pages were chunked by their standard sections for RAG, with priority given to argument descriptions and usage examples.

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)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Containers](https://swe.quest/tags/containers.md) (Infrastructure)
- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)
- [RAG & retrieval](https://swe.quest/tags/rag.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))
- Unix command line

## Keywords

Docker, man pages, OpenAI function calling, GPT-4, Llama 3.1, qrencode, figlet

## Related posts

- [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.
- [Run, Test, and Evaluate Models and MCP Locally with Docker + Promptfoo](https://swe.quest/articles/run-test-and-evaluate-models-and-mcp-locally-with-docker-promptfoo-ad1578ad40c09850.md): Docker · 2025-09-25 · Medium · 7 min read · Evaluation, AI agents, LLMs, AI safety, Containers
  Promptfoo, Docker Model Runner and Docker MCP Toolkit can be combined to evaluate LLM apps entirely on a dev machine.
- [Using AI Tools to Convert a PDF into Images](https://swe.quest/articles/using-ai-tools-to-convert-a-pdf-into-images-7d2ab149efe36a94.md): Docker · 2024-11-04 · Medium · 4 min read · AI agents, Containers, Developer tools, LLMs
  An LLM agent can convert a PDF into JPEG images by planning an ImageMagick \`convert\` call that runs in a Docker container, so nothing needs to be installed locally.
- [ReadMeAI: An AI-powered README Generator for Developers](https://swe.quest/articles/readmeai-an-ai-powered-readme-generator-for-developers-eb083158575e3617.md): Docker · 2024-06-28 · Medium · 10 min read · LLMs, Documentation, JavaScript, Containers
  ReadMeAI, an honorable mention from Docker's AI/ML Hackathon, generates a draft README from an uploaded code file and a short project description.
- [How AI Assistants Can Decode GitHub Repos for UI Writers](https://swe.quest/articles/how-ai-assistants-can-decode-github-repos-for-ui-writers-bed232efc1e6b9e6.md): Docker · 2024-12-16 · Medium · 9 min read · AI agents, LLMs, Code review, Frontend
  An LLM agent can reliably flag user-facing copy changes in a branch when it is given narrow tools and expert hints about what "user-facing" means.

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)
