Skip to main content
Glama

search_library

Search a Zotero library by title, creator, or year, or list items sorted by a chosen field to retrieve item keys for details, full text, or citations.

Instructions

Search your Zotero library or list items sorted by a field.

When 'query' is provided, matches it against titles, creator names and years (not abstracts, tags or full text). When 'query' is omitted, lists items sorted by the chosen field (default: dateAdded, descending).

Examples:

  • Search: { "query": "deep learning" }

  • Recent items: { "sort": "dateAdded", "limit": 10 }

  • Recent with search: { "query": "transformers", "sort": "dateAdded", "limit": 5 }

Use the returned item keys with get_items_details, get_item_fulltext, or inject_citations.

Input Schema

NameRequiredDescriptionDefault
sortNoField to sort by (default: dateAdded)dateAdded
limitNoMaximum number of items to return, 1-100 (default: 25; above 100 returns 100)
queryNoSearch query. If omitted, returns items sorted by the chosen field.
directionNoSort direction (default: desc)desc
library_idNoNumeric user or group ID for this call (a group's ID is the number in its zotero.org/groups/<id> URL). Default: the configured library. Required with library_type 'group' when the server is configured for a user library.
library_typeNoLibrary for this call: 'user' (personal) or 'group'. Default: the library configured on the server.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv2.0.4
    • changedInput schema / properties / library_id / description
      Previous value: -"Override the configured library ID for this call. Defaults to ZOTERO_LIBRARY_ID env (or ZOTERO_USER_ID). Required when library_type is 'group' and the server is configured for a user library."New value: +"Numeric user or group ID for this call (a group's ID is the number in its zotero.org/groups/<id> URL). Default: the configured library. Required with library_type 'group' when the server is configured for a user library."
    • changedInput schema / properties / library_type / description
      Previous value: -"Override the configured Zotero library type for this call. Defaults to ZOTERO_LIBRARY_TYPE env (or 'user'). Use to target a different library per call without restarting the server."New value: +"Library for this call: 'user' (personal) or 'group'. Default: the library configured on the server."
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum number of items to return (default: 25, max: 100)"New value: +"Maximum number of items to return, 1-100 (default: 25; above 100 returns 100)"
    • addedInput schema / properties / limit / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / limit / minimum
      Added value: +1
    • changedInput schema / properties / limit / type
      Previous value: -"number"New value: +"integer"
  2. Changed2 schema fields changedv2.0.2
    • addedInput schema / properties / library_id
      Added value: +{
      +  "description": "Override the configured library ID for this call. Defaults to ZOTERO_LIBRARY_ID env (or ZOTERO_USER_ID). Required when library_type is 'group' and the server is configured for a user library.",
      +  "pattern": "^\\d+$",
      +  "type": "string"
      +}
    • addedInput schema / properties / library_type
      Added value: +{
      +  "description": "Override the configured Zotero library type for this call. Defaults to ZOTERO_LIBRARY_TYPE env (or 'user'). Use to target a different library per call without restarting the server.",
      +  "enum": [
      +    "user",
      +    "group"
      +  ],
      +  "type": "string"
      +}
  3. First observedv1.0.9

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description usefully discloses that search matches titles, creator names, and years but not abstracts, tags, or full text, and explains the default listing behavior. However, it does not state read-only safety explicitly, nor return shape, pagination beyond the limit parameter, permissions, or error behavior.

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

Conciseness5/5

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

Front-loads the core purpose, then explains query versus no-query behavior, then provides compact examples and follow-up tools. The structure is efficient and every section helps invocation.

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 six-parameter search/list tool with no output schema, the description gives enough behavioral context to call it correctly, including search scope, ordering behavior, examples, and follow-up tools. It still leaves result structure and pagination behavior unstated beyond the limit parameter.

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 description coverage is 100%, so parameters are already documented. The description adds meaningful semantics for 'query' by specifying exactly which fields are matched and what happens when it is omitted, and its examples clarify how sorting and limiting interact.

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: searching a Zotero library or listing items with sorting. The dual search/list behavior is clear, though it does not explicitly distinguish itself from collection-scoped siblings such as get_collection_items.

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

Usage Guidelines4/5

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

Clearly explains when to provide 'query' versus when to omit it, and gives concrete examples for search, recent listing, and combined use. It also points to follow-up tools for returned item keys, though it does not state exclusions versus collection-specific alternatives.

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