Module tools

Source
Expand description

MCP tool catalog and dispatch.

§Tool organization

Tools are split into categories matching the Python server:

  • Read tools (9): pure SQLite, sub-millisecond. The performance win.
  • BBT tools (3): BibTeX/bibliography export, still need BBT JSON-RPC.
  • Write tools (14): Zotero Web API, same latency as Python.
  • PDF tools (3): network-bound, tokio async.

This module defines the tool catalog (for tools/list) and the dispatch function (for tools/call).

Modules§

bibliography
Native bibliography formatting — APA and IEEE styles.
bibtex
Native BibTeX/BibLaTeX export — no BBT dependency.
format
Item formatting utilities.
paper
Paper search MCP tools — expose paper-resolver as standalone tools.
read
Read-only MCP tools — pure SQLite, sub-millisecond.
write
Write MCP tools — Zotero Web API operations.

Functions§

check_writes_enabled
Check if write tools are enabled. Returns error if not.
handle_tool_call
Dispatch a tool call to the appropriate handler.
optional_str
Extract an optional string parameter.
optional_u64
Extract an optional u64 parameter with a default value.
required_str
Extract a required string parameter, or return a ToolCallResult error.
resolve_citekey
Resolve a citekey to a Zotero item key.
tool 🔒
tool_catalog
Build the complete tool catalog for tools/list.