Skip to content

Commit 3d51ce8

Browse files
Update docs
1 parent 6ffbc83 commit 3d51ce8

9 files changed

+102
-39
lines changed

docs/content/tools/docs/_index.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ title: Documentation
44

55
### Topics
66

7-
* [How to author prompts](prompts)
7+
* [How to author prompts](authoring-prompts)
88
* [Updating Claude Desktop](claude-desktop)
99
* [Adding to the catalog](adding-to-catalog)
10+
* [mcp/docker container logs](mcp-server)
11+
* [Using from docker ai (Gordon)](gordon)
1012

1113

docs/content/tools/docs/adding-to-catalog.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Adding to Catalog
1+
---
2+
title: Adding to Catalog
3+
---
24

35
Once you have published a prompt to a publicly accessible git repository, you can submit a PR to add it to the catalog.
46

@@ -10,3 +12,7 @@ Once you have published a prompt to a publicly accessible git repository, you ca
1012
icon: <prompt-icon> # Required URL to icon
1113
ref: <prompt-ref> # Required ref to prompt. Format: <provider>:<repo>?ref=<ref>&path=<path> example: github:docker/labs-ai-tools-for-devs?ref=main&path=prompts/examples/mcp-sqlite.md
1214
```
15+
16+
* choose a unique `<prompt-name>`
17+
* the `<prompt-ref>` must be a valid github reference uri, which is of the form `github:<org-name>/<repo-name>?path=relative/path/to/file.md` (you can refer to a branch
18+
by adding another query parameter `&ref=<branch-name>`)

docs/content/tools/docs/authoring-prompts.md

+36-21
Original file line numberDiff line numberDiff line change
@@ -121,22 +121,56 @@ contain template parameters.
121121
For example, the above curl example could be re-written as a template with a ``{{ user }}`` parameter.
122122

123123
```markdown
124-
---
124+
---yaml
125125
tools:
126126
- name: curl
127127
url: http://localhost/v1/chat/completions
128128
stream: false
129129
model: llama3.1
130+
arguments:
131+
- name: user
132+
description: the GitHub username to fetch gists for
133+
required: true
130134
---
131135

132136
# prompt
133137

134138
Run the curl command, in silent mode, to fetch gists for user {{ user }} from GitHub.
135139
```
136140

141+
### Template Engine
142+
143+
We support two templating engines today.
144+
145+
* [mustache](https://mustache.github.io/mustache.5.html) is the default
146+
* [django](https://docs.djangoproject.com/en/5.1/topics/templates/)
147+
148+
If you want to use django, then add the following field in the markdown preamble.
149+
150+
```markdown
151+
---
152+
prompt-format: "django"
153+
arguments:
154+
- name: user
155+
description: the GitHub username to fetch gists for
156+
required: true
157+
---
158+
```
159+
160+
### MCP arguments
161+
162+
MCP clients can use `arguments` to help you bind values into templates.
163+
164+
```yaml
165+
---
166+
prompt-format: "django"
167+
---
168+
```
169+
137170
### Binding values during testing
138171

139-
When running in VSCode, you can set values of the parameters in the markdown preamble.
172+
When running in VSCode, you can set values of the parameters in the markdown preamble. This is
173+
a great way to quickly test your prompt during development.
140174

141175
```markdown
142176
---
@@ -186,22 +220,3 @@ This project contains {{language}} code.
186220

187221
```
188222

189-
### Template Engine
190-
191-
We support two templating engines today.
192-
193-
* [mustache](https://mustache.github.io/mustache.5.html) is the default
194-
* [django](https://docs.djangoproject.com/en/5.1/topics/templates/)
195-
196-
If you want to use django, then add the following field in the markdown preamble.
197-
198-
```markdown
199-
---
200-
prompt-format: "django"
201-
---
202-
```
203-
204-
### MCP arguments
205-
206-
207-

docs/content/tools/docs/claude-desktop.md

+15-12
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,25 @@ Enable mcp_run in your claude_desktop_config.json file using the following snipp
2323
}
2424
```
2525

26-
Notice in the above snippet that the server is loaded with one example prompt, which you can view in our [public github repo](https://github.com/docker/labs-ai-tools-for-devs/blob/main/prompts/examples/hello_world.md?plain=1).
27-
This will have already been exposed using this MCP server so when using Claude Desktop, you can type "use hello docker to greet me with a joke".
26+
## Adding Tools
2827

29-
You'll see a prompt asking if you want to run the "hello world" tool locally.
30-
31-
![consent](consent.png)
28+
Install the [`docker/labs-ai-tools-for-devs` extension](https://open.docker.com/extensions/marketplace?extensionId=docker/labs-ai-tools-for-devs) to
29+
see a catalog of tools that you can install into the server.
3230

33-
## More prompts
34-
35-
You can register new definitions in public github repos by adding additional `--register` arguments.
31+
You can also register new tool definitions by adding `--register` arguments to the above server definition.
3632

3733
```
3834
"--register", "github:docker/labs-ai-tools-for-devs?path=prompts/examples/swagger.md"
3935
```
4036

41-
We are moving these registration command to a command line. It doesn't make sense to change the claude
42-
config each time you add or remote a defintion. However, because Claude Desktop has to be restarted
43-
every time a definition changes today (because of the missing notification), we will work
44-
with Anthropic to make this much smoother.
37+
Learn more about the tool definitions being referenced here using the page on [authoring the tool definitions](../authoring-prompts).
38+
39+
## Try a sample tool
40+
41+
Try activating thel _hello world_ tool in our catalog (here's the [definition](https://github.com/docker/labs-ai-tools-for-devs/blob/main/prompts/examples/hello_world.md?plain=1) )
42+
and then type "use hello docker to greet me with a joke".
43+
44+
You'll see a prompt asking if you want to run the "hello world" tool locally.
45+
46+
![consent](consent.png)
47+

docs/content/tools/docs/gordon.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: Using with Gordon
3+
---
4+
5+
## gordon-mcp.yaml
6+
7+
When you run `docker ai` from any directory, docker ai will search that directory for a gordon-mcp.yml file.
8+
If that file is present, and configured with the `mcp/docker` container then Gordon will load tools from
9+
this container and try to use them.
10+
11+
```yaml
12+
services:
13+
mcp_docker:
14+
image: mcp/docker:latest
15+
command: serve --mcp --register github:docker/labs-ai-tools-for-devs?path=prompts/bootstrap.md
16+
volumes:
17+
- /var/run/docker.sock:/var/run/docker.sock
18+
- docker-prompts:/prompts
19+
x-mcp-autoremove: true
20+
21+
volumes:
22+
docker-prompts:
23+
external: true
24+
```
25+
26+
## debugging
27+
28+
We suggest using `docker ai --debug` if you are trying to debug some of your tools while using the `docker ai` cli.
29+
30+

docs/content/tools/docs/mcp-server.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: running the mcp/docker image
2+
title: mcp/docker server logs
33
---
44

55
## Logging

docs/content/tools/quickstart.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ weight: 1
99

1010
## Quick Start w/ Docker Desktop Extension
1111

12-
1. Install [Docker Labs AI Tools for Devs](https://hub.docker.com/extensions/docker/labs-ai-tools-for-devs)
12+
1. Install [Docker Labs AI Tools for Devs](https://open.docker.com/extensions/marketplace?extensionId=docker/labs-ai-tools-for-devs)
1313
2. Click on the Claude button to add `mcp_docker` toolbox to your Claude Desktop.
1414
3. Select any prompts you would like to add from the catalog to your toolbox.
1515

@@ -23,8 +23,8 @@ currently have to restart desktop more less continuously. Fire up those keybinds
2323

2424
### Try a prompt
2525

26-
Write a prompt in Claude that will run one of the tools in a registered defintion.
27-
For example:
26+
Type an instruction to Claude that will use one of the tools you've added.
27+
For example, if you've enabled the _hello world_ tool, then you could type the following.
2828

2929
> Use hello world to send a greeting and then respond to what comes back.
3030

docs/hugo.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ markup:
1313
goldmark:
1414
renderer:
1515
unsafe: true
16+
params:
17+
search:
18+
enable: false

prompts/examples/mcp-sqlite.md

+4
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ tools:
7575
prompt-format: django
7676
parameter-values:
7777
topic: Ocean Conservation
78+
arguments:
79+
- name: topic
80+
description: The topic for the business scenario
81+
required: true
7882
---
7983

8084
# prompt user

0 commit comments

Comments
 (0)