Skip to main content
Glama
anki-connect-mcp
by SolarianGG

notes.search

notes_search
Read-only

Search Anki notes using Anki query syntax, with empty queries matching all notes and pagination for browsing result sets.

Instructions

Search with Anki syntax; an empty query searches all notes.

Anki-Connect method notes.search. Scope: collection. Effect: read. Completion: completed. Undo: none.

Possible errors: collectionUnavailable, internalError, invalidParams, invalidSearch, staleCursor, staleSession.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "notes_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
sortNoOptional browser-column sort, e.g. {"column": "noteFld", "direction": "ascending"} (`column` is an Anki browser column key such as noteFld, cardDue). Default: ascending ID order.
limitNoPage size, 1–1000 (default 100).
queryYesAnki search query for notes, e.g. `deck:Japanese tag:verb`. An empty string matches all notes.
cursorNoContinuation token: `nextCursor` from the previous page of the same call. Omit for the first page. Repeat the same query, sort and limit; each cursor is single-use and expires after 10 minutes. `nextCursor: null` means there are no more pages.
sessionNoOptional. Collection session ID: the `session` field returned by `collection_get`. Usually omit it — the server then uses the session current at the time of the call. Pass it to make the call fail with `staleSession` instead of acting on a different profile/collection than the one your IDs, cursors and tokens came from.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false, so the description's strongest additions are the declared scope (collection), undo=none, and the enumerated error codes including invalidSearch and staleCursor. That is meaningful operational context beyond the annotations; it stops short of describing what a page contains beyond the mention of nextCursor.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core behavior in the first line, then telegraphic metadata lines that are quick to scan. The "Effect: read" line partly repeats readOnlyHint and the error list is dense, but nothing is padded or buried.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a paginated, session-aware search this covers scope, safety, undo, and failure modes, and the schema carries the parameter details. With no output schema, the description never says what a result page contains (note fields, total, nextCursor placement), which is the one remaining gap an agent would want closed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already explains query, sort, limit, cursor, and session in detail. The description adds only the empty-query convention for query, which is duplicated in the schema, so it earns the baseline rather than more.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Search ... notes") with Anki query syntax and the empty-query fallback. It does not explicitly distinguish itself from the closely named siblings cards_search, notes_findEmpty, or notes_getMany, so an agent must infer that this returns note records rather than cards.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The empty-query behavior and the cursor/session rules give real usage context for pagination, but there is no explicit statement of when to pick this over cards_search (cards) or notes_findEmpty (empty-note detection). Usage is implied by the resource name rather than spelled out.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools