Skip to main content
Glama

Manage Zotero saved searches

zotero_saved_searches
Destructive

List, create, or delete Zotero saved-search definitions using conditions. Note: manages definitions only; execute searches separately with zotero_search_items.

Instructions

List, create, or delete saved-search DEFINITIONS. NOTE: the Zotero cloud Web API stores saved searches but does NOT execute them — to get the items a saved search matches, run an equivalent zotero_search_items query (or use the desktop local API when available). Set action to "list" (all saved searches with their conditions), "create" (needs name and conditions, each {condition, operator, value}), or "delete" (needs search_key). Writes go to the cloud Web API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoSaved-search name (create).
actionYesWhat to do. "list" returns every saved-search definition; "create" needs `name` + `conditions`; "delete" needs `search_key`.
conditionsNoSearch conditions (create).
library_idNoNumeric id of the library to address, e.g. 5234875 for a group (zotero_groups lists the ids you can reach). Omit to use the configured default library; an id given without library_type is read as a group id.
search_keyNoSaved-search key (delete).
library_typeNoWhich library to address: "user" (a personal library) or "group" (a shared group library). Omit to use the library this server is configured for. "group" on its own is refused: pass library_id with it.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
createdNoKey of the saved search created.
deletedNoKey of the saved search deleted.
searchesNoSaved-search definitions (action:"list"). The cloud API stores them but does not execute them.
libraryVersionNoThe library's Last-Modified-Version after this write.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.21.0
    • addedInput schema / properties / library_id / exclusiveMinimum
      Added value: +0
  2. Changed2 schema fields changedv1.20.2
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedOutput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  3. Changed7 schema fields changedv1.20.0
    • addedInput schema / properties / action / description
      Added value: +"What to do. \"list\" returns every saved-search definition; \"create\" needs `name` + `conditions`; \"delete\" needs `search_key`."
    • addedInput schema / properties / conditions / items / properties / condition / description
      Added value: +"Zotero search field, e.g. \"title\", \"tag\", \"itemType\", \"dateAdded\"."
    • addedInput schema / properties / conditions / items / properties / operator / description
      Added value: +"Zotero operator for that field, e.g. \"is\", \"isNot\", \"contains\", \"doesNotContain\", \"isBefore\"."
    • addedInput schema / properties / conditions / items / properties / value / description
      Added value: +"Value to compare against, as a string, e.g. \"kalman\" or \"journalArticle\"."
    • addedInput schema / properties / library_id / description
      Added value: +"Numeric id of the library to address, e.g. 5234875 for a group (zotero_groups lists the ids you can reach). Omit to use the configured default library; an id given without library_type is read as a group id."
    • addedInput schema / properties / library_type / description
      Added value: +"Which library to address: \"user\" (a personal library) or \"group\" (a shared group library). Omit to use the library this server is configured for. \"group\" on its own is refused: pass library_id with it."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "properties": {
      +    "created": {
      +      "description": "Key of the saved search created.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "deleted": {
      +      "description": "Key of the saved search deleted.",
      +      "type": "string"
      +    },
      +    "libraryVersion": {
      +      "description": "The library's Last-Modified-Version after this write.",
      +      "type": "number"
      +    },
      +    "searches": {
      +      "description": "Saved-search definitions (action:\"list\"). The cloud API stores them but does not execute them.",
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "conditions": {
      +            "description": "Its conditions, each { condition, operator, value } as Zotero stores them.",
      +            "items": {
      +              "additionalProperties": {},
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "key": {
      +            "description": "8-character saved-search key.",
      +            "type": "string"
      +          },
      +          "name": {
      +            "description": "Saved-search name.",
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
  4. First observedv1.0.4

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already signal destructiveHint=true and readOnlyHint=false; the description aligns with these (delete action, 'Writes go to the cloud Web API'). It adds genuinely useful context beyond annotations: the saved searches are not executed server-side, which is a non-obvious behavioral trait an agent needs to know. No contradiction with annotations.

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?

The description is dense but efficient, front-loading the core caveat before the parameter mapping. Every sentence earns its place: purpose, the non-execution warning, action semantics, and write destination. Slightly long but appropriately so for a multi-action tool.

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?

With an output schema present, full schema coverage on all 6 params (including library_id/library_type disambiguation and additionalProperties:false on conditions), the description covers the action-specific requirements and the key caveat about non-execution. A full worked example of a conditions array would push this to 5, but nothing essential is missing for correct invocation.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds value beyond the schema by tying each action value to its specific parameter requirements (list=none, create=name+conditions, delete=search_key) and by clarifying the condition object structure as {condition, operator, value}. This per-action mapping is not implicit in the schema alone.

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?

The description opens with a specific verb+resource ('List, create, or delete saved-search DEFINITIONS') that clearly states the tool's scope. It further differentiates itself from siblings by emphasizing it manages definitions only and explicitly points to zotero_search_items for execution, so an agent can tell them apart without opening schemas.

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?

The NOTE explicitly states the cloud Web API stores but does not execute saved searches and names the exact alternative (zotero_search_items, or the desktop local API) to use when matched items are needed. It also maps each action value to its required parameters, leaving no ambiguity about when to call this tool versus a sibling.

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