Anytype task tools
Twelve verbs over the local Anytype API. Everything composes through a
session: find numbers its results (1, 2, …) and sets the working space;
every other verb takes --object <number>.
Setup: the local Anytype app must be running; ANYTYPE_API_KEY holds an
API key from the app's settings (ANYTYPE_API_URL defaults to
http://127.0.0.1:31009).
The loop
anytype spaces # space ids, when none is known
# Work — bafyspace1
anytype find --space bafyspace1 --type Task --filter 'done = false'
# 1. Prepare the Q3 report (Task)
# 2. Ship the beta (Task)
anytype edit-text --object 1 --find "Q3" --replace "Q4"
# --block is optional: the snippet locates the block when it matches
# exactly one; an ambiguous snippet refuses and lists the candidates
anytype read --object 1 --mode outline # block ids + structure
- spaces when no space id is known — it lists
name — id.
- find next — it creates the handles and the working space.
- describe before you create or set properties — it lists the live
property names and each one's format and options. Address properties by
the names describe shows (
"Due date"); select option names must match
exactly.
- read before you edit blocks — block ids come from read
(
--mode outline for structure, full mode for text; table row and
column ids come from full mode too).
Intent → verb recipes
| Intent |
Verb — not that other thing |
| complete/close a task object |
set-properties --object 1 --set '{"Done":true}' (or the status option describe shows, e.g. {"Status":"Done"}) — NOT check-item, which is for checkbox blocks inside a document |
| tick a checklist line in a note |
check-item --object 1 --block ab3f2 --checked |
| change one word/phrase |
edit-text with a short unique snippet — never retype the block; --block only when the snippet alone is ambiguous (the error lists the candidates) |
| delete a word/phrase |
edit-text --find "the phrase" --replace "" — an empty replacement deletes |
| delete several blocks |
delete-block --block "ab3f2,c81d0,e0001" — ONE call, comma-separated; it removes all of them or none — never one call per block |
| add notes/sections/checklists |
add-blocks --markdown '…' — write markdown, the server parses it |
| fill one table cell |
set-cell — never rewrite the table; row/col ids come from full read |
| clear one table cell |
set-cell … --value "" — an empty value clears |
| assign to the current user |
value "@me" — e.g. --set '{"Assignee":"@me"}' |
| due dates |
today, tomorrow, weekday names, +3d, or 2026-08-01 |
| find "my open tasks" |
--filter 'Assignee = "@me" AND Done = false' |
Filter strings
--filter is a compact expression, not JSON:
Done = false AND (Due_date < currentWeek() OR Due_date IS EMPTY) ·
Status IN ("In progress", "Blocked") · Name CONTAINS "report" ·
Last_modified_date > daysAgo(7). String values take double quotes; date
presets are functions (today(), currentWeek(), daysAgo(n)).
Property names here are written as identifiers — a multi-word name takes
underscores (Due_date for "Due date"); a name no identifier can spell
(C++, 50% done) cannot ride a filter string.
Caveats
- Text is markdown source.
edit-text find/replace operates on the
block's markup: **, [, ~~ in a replacement become real formatting.
Escape with \ when you mean the literal character.
- Select options are never created by these verbs. An unknown option
name is an error listing the existing names — fix the spelling (option
names are case-sensitive).
--create-missing is the deliberate escape.
Type and property NAMES are more forgiving: case, _/- and spaces
fold away, so due_date, dueDate and Due date all address one
property; if two properties answer to one spelling the error names
both — it never guesses.
- Handles expire on the next find. Re-run
find and use the new
numbers. Block ids come from read — use them as served, and re-read
after a structural edit rather than reusing remembered ones. A block id
always names an EXISTING block: new content is authored without ids
(add-blocks takes none). Every edit receipt names the object it changed
(ok — "Groceries": …) — check it matches your intent.
- One verb, one intent. There is no batch; run verbs in sequence.
Retries are safe: an identical re-run within a minute is deduplicated,
including after a failed or timed-out attempt.
- Errors are self-describing and name valid alternatives — read them, fix
the named field, retry once. Do not loop blindly.
References
anytype tools — the machine-readable manifest: per-tool JSON schema,
worked example, GBNF grammar (constrained decoding), and the filter
grammar (EBNF + GBNF). --tier small narrows it to the 8-tool set for
~8B models (large, the default, is all twelve).
anytype mcp --tier small|large — serve the same tools over MCP stdio
for LOCAL models (Ollama/LM Studio-class hosts). Coding agents reading
this skill should keep using the verbs directly — the CLI is the
intended delivery for them; mcp exists for hosts that cannot run
commands. Session state is in-memory for the server's lifetime.
anytype help — the verb list; anytype <verb> --help — its flags.
- Spec:
core/api/APIV2.md §7 (the wrapper contract), github.com/anyproto/any-block/format/v2/SPEC.md
(the document format the full-read mode returns).
1---2name: anytype3description: Read, search, create and edit Anytype objects through the anytype CLI. Use when the user asks to find notes/tasks/pages in Anytype, create objects, tick checkboxes, edit document text, fill tables, or reorganize content. Task-shaped verbs over the local API; results are numbered handles you pass back — never copy long ids.4---56# Anytype task tools78Twelve verbs over the local Anytype API. Everything composes through a9session: `find` numbers its results (1, 2, …) and sets the working space;10every other verb takes `--object <number>`.1112Setup: the local Anytype app must be running; `ANYTYPE_API_KEY` holds an13API key from the app's settings (`ANYTYPE_API_URL` defaults to14`http://127.0.0.1:31009`).1516## The loop1718```sh19anytype spaces # space ids, when none is known20# Work — bafyspace121anytype find --space bafyspace1 --type Task --filter 'done = false'22# 1. Prepare the Q3 report (Task)23# 2. Ship the beta (Task)24anytype edit-text --object 1 --find "Q3" --replace "Q4"25# --block is optional: the snippet locates the block when it matches26# exactly one; an ambiguous snippet refuses and lists the candidates27anytype read --object 1 --mode outline # block ids + structure28```29301. **spaces** when no space id is known — it lists `name — id`.312. **find** next — it creates the handles and the working space.323. **describe** before you create or set properties — it lists the live33 property names and each one's format and options. Address properties by34 the names describe shows (`"Due date"`); select option names must match35 exactly.364. **read** before you edit blocks — block ids come from read37 (`--mode outline` for structure, full mode for text; table row and38 column ids come from full mode too).3940## Intent → verb recipes4142| Intent | Verb — not that other thing |43|---|---|44| complete/close a task object | `set-properties --object 1 --set '{"Done":true}'` (or the status option describe shows, e.g. `{"Status":"Done"}`) — NOT check-item, which is for checkbox blocks inside a document |45| tick a checklist line in a note | `check-item --object 1 --block ab3f2 --checked` |46| change one word/phrase | `edit-text` with a short unique snippet — never retype the block; `--block` only when the snippet alone is ambiguous (the error lists the candidates) |47| delete a word/phrase | `edit-text --find "the phrase" --replace ""` — an empty replacement deletes |48| delete several blocks | `delete-block --block "ab3f2,c81d0,e0001"` — ONE call, comma-separated; it removes all of them or none — never one call per block |49| add notes/sections/checklists | `add-blocks --markdown '…'` — write markdown, the server parses it |50| fill one table cell | `set-cell` — never rewrite the table; row/col ids come from full read |51| clear one table cell | `set-cell … --value ""` — an empty value clears |52| assign to the current user | value `"@me"` — e.g. `--set '{"Assignee":"@me"}'` |53| due dates | `today`, `tomorrow`, weekday names, `+3d`, or `2026-08-01` |54| find "my open tasks" | `--filter 'Assignee = "@me" AND Done = false'` |5556## Filter strings5758`--filter` is a compact expression, not JSON:59`Done = false AND (Due_date < currentWeek() OR Due_date IS EMPTY)` ·60`Status IN ("In progress", "Blocked")` · `Name CONTAINS "report"` ·61`Last_modified_date > daysAgo(7)`. String values take double quotes; date62presets are functions (`today()`, `currentWeek()`, `daysAgo(n)`).63Property names here are written as identifiers — a multi-word name takes64underscores (`Due_date` for "Due date"); a name no identifier can spell65(`C++`, `50% done`) cannot ride a filter string.6667## Caveats6869- **Text is markdown source.** `edit-text` find/replace operates on the70 block's markup: `**`, `[`, `~~` in a replacement become real formatting.71 Escape with `\` when you mean the literal character.72- **Select options are never created by these verbs.** An unknown option73 name is an error listing the existing names — fix the spelling (option74 names are case-sensitive). `--create-missing` is the deliberate escape.75 Type and property NAMES are more forgiving: case, `_`/`-` and spaces76 fold away, so `due_date`, `dueDate` and `Due date` all address one77 property; if two properties answer to one spelling the error names78 both — it never guesses.79- **Handles expire on the next find.** Re-run `find` and use the new80 numbers. Block ids come from `read` — use them as served, and re-read81 after a structural edit rather than reusing remembered ones. A block id82 always names an EXISTING block: new content is authored without ids83 (`add-blocks` takes none). Every edit receipt names the object it changed84 (`ok — "Groceries": …`) — check it matches your intent.85- **One verb, one intent.** There is no batch; run verbs in sequence.86 Retries are safe: an identical re-run within a minute is deduplicated,87 including after a failed or timed-out attempt.88- Errors are self-describing and name valid alternatives — read them, fix89 the named field, retry once. Do not loop blindly.9091## References9293- `anytype tools` — the machine-readable manifest: per-tool JSON schema,94 worked example, GBNF grammar (constrained decoding), and the filter95 grammar (EBNF + GBNF). `--tier small` narrows it to the 8-tool set for96 ~8B models (`large`, the default, is all twelve).97- `anytype mcp --tier small|large` — serve the same tools over MCP stdio98 for LOCAL models (Ollama/LM Studio-class hosts). Coding agents reading99 this skill should keep using the verbs directly — the CLI is the100 intended delivery for them; `mcp` exists for hosts that cannot run101 commands. Session state is in-memory for the server's lifetime.102- `anytype help` — the verb list; `anytype <verb> --help` — its flags.103- Spec: `core/api/APIV2.md` §7 (the wrapper contract), `github.com/anyproto/any-block/format/v2/SPEC.md`104 (the document format the full-read mode returns).