Skip to main content
Glama
Zotero MCP
by 54yyyu

Zotero Advanced Search

zotero_advanced_search

Search Zotero items using structured field conditions such as date ranges, item types, tags, and specific fields when basic search cannot express the query.

Instructions

Search with structured field conditions, for what zotero_search_items cannot express: date ranges, item types, matches on one field. conditions: a list of {field, operation, value}. Fields include title, creator, date, dateAdded, dateModified, tag, itemType, publicationTitle, abstractNote, collection. Operations: is, isNot, contains, doesNotContain, beginsWith, endsWith, isGreaterThan, isLessThan, isBefore, isAfter. Dates are ISO; 'added in the last 30 days' is dateAdded isAfter . join_mode: 'all' (AND, default) or 'any' (OR). sort_by: a field such as dateAdded or title; sort_direction: 'asc' (default) or 'desc'. limit: default 50, max 500. include_subcollections=True makes collection is/isNot match the whole subtree. search_all_libraries=True searches every library (no collection conditions). Example: conditions=[{'field': 'itemType', 'operation': 'is', 'value': 'preprint'}, {'field': 'dateAdded', 'operation': 'isAfter', 'value': '2026-03-22'}].

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": {
      "conditions": "<conditions>"
    },
    "name": "zotero_advanced_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
sort_byNo
join_modeNoall
conditionsYes
sort_directionNoasc
search_all_librariesNo
include_subcollectionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.17.3
    • removedInput schema / properties / sort_by / default
      Removed value: -null
  2. Changed12 schema fields changedv0.16.0
    • removedInput schema / properties / conditions / description
      Removed value: -"List of search condition dictionaries, each containing:\n       - field: The field to search (title, creator, date, tag, etc.)\n       - operation: The operation to perform (is, isNot, contains, etc.)\n       - value: The value to search for"
    • removedInput schema / properties / include_subcollections / description
      Removed value: -"Make a `collection` condition match items filed\nanywhere in that collection's subtree rather than in it directly.\nApplies to the `is` and `isNot` operations, which are the\nmembership questions; other operators keep comparing keys as\nbefore. Defaults to False, matching Zotero's own \"Search\nsubcollections\" checkbox."
    • removedInput schema / properties / join_mode / description
      Removed value: -"Whether all conditions must match (\"all\") or any condition can match (\"any\")"
    • removedInput schema / properties / limit / anyOf
      Removed value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]
    • removedInput schema / properties / limit / description
      Removed value: -"Maximum number of results to return"
    • addedInput schema / properties / limit / type
      Added value: +"integer"
    • removedInput schema / properties / search_all_libraries / description
      Removed value: -"Search every accessible library at once instead\nof the active one (#163). Requires the SQLite backend; each result\nis labelled with its source library. A `collection` condition is\nrejected in this mode — collection keys are per-library — while\n`tag` conditions work, since Zotero stores tags in one\ndatabase-wide table shared by every library."
    • removedInput schema / properties / sort_by / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / sort_by / description
      Removed value: -"Field to sort by (dateAdded, dateModified, title, creator, etc.)"
    • addedInput schema / properties / sort_by / type
      Added value: +"string"
    • removedInput schema / properties / sort_direction / description
      Removed value: -"Direction to sort (asc or desc)"
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "type": "object",
      -  "x-fastmcp-wrap-result": true
      -}New value: +null
  3. Changed1 schema field changedv0.15.1
    • changedInput schema / properties / conditions / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "additionalProperties": {
      -        "type": "string"
      -      },
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "additionalProperties": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "additionalProperties": {
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
  4. Changed5 schema fields changedv0.11.0
    • addedInput schema / properties / conditions / anyOf
      Added value: +[
      +  {
      +    "items": {
      +      "additionalProperties": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / conditions / items
      Removed value: -{
      -  "additionalProperties": {
      -    "type": "string"
      -  },
      -  "type": "object"
      -}
    • removedInput schema / properties / conditions / type
      Removed value: -"array"
    • addedInput schema / properties / include_subcollections
      Added value: +{
      +  "default": false,
      +  "description": "Make a `collection` condition match items filed\nanywhere in that collection's subtree rather than in it directly.\nApplies to the `is` and `isNot` operations, which are the\nmembership questions; other operators keep comparing keys as\nbefore. Defaults to False, matching Zotero's own \"Search\nsubcollections\" checkbox.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / search_all_libraries
      Added value: +{
      +  "default": false,
      +  "description": "Search every accessible library at once instead\nof the active one (#163). Requires the SQLite backend; each result\nis labelled with its source library. A `collection` condition is\nrejected in this mode — collection keys are per-library — while\n`tag` conditions work, since Zotero stores tags in one\ndatabase-wide table shared by every library.",
      +  "type": "boolean"
      +}
  5. Addedv0.4.1
  6. Removedv0.1.6
  7. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden and does so substantially: it discloses defaults (join_mode 'all', sort_direction 'asc', limit 50), a hard cap (max 500), the subtree expansion semantics of include_subcollections, the interaction constraint between search_all_libraries and collection conditions, and ISO date handling with a worked relative-date idiom. It stops short of stating that the call is read-only and does not describe the shape or ordering of returned results.

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 purpose and sibling differentiation before the mechanics, and nearly every clause adds actionable detail (enum vocabularies, defaults, caps, a concrete date example). It is dense to the point of being a single run-on block, and mapping the parameter list into labeled lines would make the same content easier to scan without adding length.

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 7-parameter, 1-required tool with no annotations, no output schema, and 0% schema coverage, the description covers every parameter and supplies a worked example, which is enough to construct a valid call. The remaining gap is return-value behavior: result ordering, pagination/truncation beyond the limit cap, and what the anyOf object/string forms of 'conditions' mean are left unstated.

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

Parameters5/5

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

Schema description coverage is 0%, yet the description compensates by enumerating the accepted field names (title, creator, dateAdded, itemType, tag, collection, etc.) and the full operation vocabulary (is, contains, beginsWith, isAfter, isGreaterThan...), none of which appear in the schema's untyped additionalProperties. It also explains join_mode as AND/OR and pins every default, which the schema only partially conveys.

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

Purpose5/5

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

Opens with a specific verb+resource ('Search with structured field conditions') and immediately delimits scope against the named sibling zotero_search_items, listing the exact capabilities that sibling cannot express (date ranges, item types, single-field matching). An agent can distinguish the two without opening either schema.

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

Usage Guidelines5/5

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

Explicitly routes the agent: use this instead of zotero_search_items when you need field-level conditions, dates, or item types. It also states the operational preconditions that affect query shape, e.g. 'search_all_libraries=True searches every library (no collection conditions)', which tells the agent when a condition type is not permitted.

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