Skip to main content
Glama
JingYangYuan

zotero-local-mcp

by JingYangYuan

zotero_update_search_database

Refresh the semantic search embedding database by re-embedding new or changed Zotero items. Supports incremental updates or full rebuilds with optional limits.

Instructions

Build or refresh the semantic search embedding database from Zotero items. Run this: (a) after first install, (b) after adding items via zotero_add_item, or (c) when the user has added items directly in Zotero desktop since the last update. By default the update is INCREMENTAL — only new or changed items are re-embedded, so repeated calls are cheap. force_rebuild=True re-embeds ALL items from scratch (slow; use when changing the embedding model or recovering from corruption). limit: optional cap on items processed (useful for smoke-testing). Progress is reported via the MCP context; on large libraries an incremental update is seconds, a full rebuild can take minutes. Requires the [semantic] optional dependency and a configured embedding provider (see config.json). Check status with zotero_get_search_database_status. Example: zotero_update_search_database() after adding a batch of papers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoLimit number of items to process (useful for testing)
force_rebuildNoWhether to rebuild the entire database from scratch

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden. It discloses the incremental vs. full-rebuild behavior, progress reporting via MCP context, performance expectations (seconds vs minutes), dependencies ([semantic] optional dependency and configured embedding provider), and the side effect of re-embedding items. It also notes that force_rebuild is slow, which is critical for agent planning. This is thorough behavioral disclosure.

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?

The description is well-structured and front-loaded with the main purpose. It uses a numbered list for usage scenarios, bold for key modes, and includes a concrete example. Every sentence adds value—no fluff. It is appropriately detailed for a tool with two parameters and complex behavior.

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

Completeness5/5

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

The tool is complex (builds an embedding database with incremental and full modes, requires dependencies). The description covers when to use it, how it behaves, performance expectations, prerequisites, and a status-check alternative. It also provides a usage example. Given the output schema exists (per context), the description doesn't need to explain return values, so nothing critical is missing.

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?

The input schema already covers both parameters with descriptions, and schema coverage is 100%. The description adds significant context beyond the schema: force_rebuild re-embeds ALL items from scratch and is for model changes or corruption recovery; limit is described as an optional cap for smoke-testing. This enriches the schema meaning and helps the agent choose appropriate values.

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 clearly states the tool's purpose: 'Build or refresh the semantic search embedding database from Zotero items.' It specifies the verb (build/refresh), the resource (embedding database), and the scope (from Zotero items). It also distinguishes this from sibling tools like zotero_get_search_database_status (status check) and zotero_semantic_search (which consumes the database), 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 description explicitly enumerates when to run the tool: (a) after first install, (b) after adding items via zotero_add_item, (c) when the user added items directly in Zotero desktop. It also explains when to use force_rebuild (changing embedding model or recovering from corruption) and mentions checking status with zotero_get_search_database_status. This is explicit when/when-not guidance with a named alternative.

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