# Got Dill? — instructions for an AI agent These instructions let an agent that can make HTTP requests (Claude Code, or any agent with a shell) add to and read a Got Dill? grocery list. No MCP server is needed. To use it, give your agent this page and ask it to set up Got Dill?: > Read https://got-dill.com/claude and use it to add to my grocery list. ## The key Every request sends `Authorization: Bearer `. The key starts with `gd_`. The household owner creates it in the Got Dill? iOS app under Settings → Integrations. Read the key from the environment variable `GOTDILL_API_KEY`. If it is not set, ask the user to set it, not to paste it into the conversation. Never print the key, write it to a file, or include it in a reply. In Claude Code, the user sets it once in `~/.claude/settings.json`: ```json { "env": { "GOTDILL_API_KEY": "gd_..." } } ``` In any other agent that runs commands (Codex CLI, Gemini CLI, Cursor and others), the user sets it in their shell profile, such as `~/.zshrc`: ```bash export GOTDILL_API_KEY=gd_... ``` ## Adding: POST https://api.got-dill.com/add Sends free text to the household's inbox. Nothing is added to the list until a member of the household reviews the text in the app, where it is split into items. Send the user's words as written; do not split or reformat them. ```bash curl -s -X POST https://api.got-dill.com/add \ -H "Authorization: Bearer $GOTDILL_API_KEY" \ -H "Content-Type: text/plain" \ --data-binary "bagels, cream cheese, 2 lb salmon" ``` | Status | Meaning | |---|---| | 202 | Stored. Body: `{"id": ""}`. Tell the user it is waiting in the Got Dill? inbox for review. | | 400 | The text was empty. | | 401 | The key is missing, wrong or revoked. The owner can make a new one in Settings → Integrations. | | 413 | Over 500 characters. Send less. | | 429 | The household's limit of 20 submissions per UTC day is reached, or requests are too fast. | ## Reading: GET https://api.got-dill.com/list Returns the names of items still to buy, in no particular order. ```bash curl -s https://api.got-dill.com/list \ -H "Authorization: Bearer $GOTDILL_API_KEY" ``` | Status | Meaning | |---|---| | 200 | Body: `{"items": [{"name": "Milk"}, {"name": "Eggs"}]}`. An empty list is `{"items": []}`. | | 401 | The key is missing, wrong or revoked. | | 429 | Requests are too fast. | ## Rules - Branch on the status code, not the error body. - On 429 or 5xx, report it once. Do not retry in a loop. - Check the list before adding, and leave out what is already on it, unless the user asks otherwise. - Combine several items into one submission. Each request counts toward the daily limit of 20. - There is no way to remove, change or cross off items through the API. Say so if asked. More: https://got-dill.com/integrations