MCPcopy Create free account

hub / github.com/54yyyu/zotero-mcp / functions

Functions2,104 in github.com/54yyyu/zotero-mcp

↓ 1,401 callersMethodget
(self, url, timeout=None, stream=False)
tests/test_webdav.py:36
↓ 156 callersMethodinfo
(self, message: str)
src/zotero_mcp/_context.py:6
↓ 91 callersMethoderror
(self, message: str)
src/zotero_mcp/_context.py:8
↓ 63 callersMethoditems
(self, **kwargs)
tests/conftest.py:44
↓ 59 callersMethodupdate_item
(self, item, **kwargs)
tests/test_update_item.py:177
↓ 56 callersMethodwarning
(self, message: str)
src/zotero_mcp/_context.py:7
↓ 46 callersMethoditem
(self, item_key)
tests/conftest.py:38
↓ 45 callersFunction_set_if_in_template
Assign ``value`` to ``field`` iff the template has that field. Returns True if set.
src/zotero_mcp/citation_import.py:325
↓ 43 callersFunction_make_item
Build a realistic Zotero item dict for stubbing. citation_key defaults to None — the field is omitted from the data dict entirely so add-when
tests/test_update_item.py:13
↓ 38 callersFunction_make_item
Build a minimal Zotero item dict.
tests/test_duplicates.py:13
↓ 27 callersFunction_make_crossref_response
Build a mock requests.Response for CrossRef API.
tests/test_add_by_doi.py:38
↓ 26 callersFunctionformat_item_metadata
Format a Zotero item's metadata as markdown. Args: item: A Zotero item dictionary. include_abstract: Whether to include the
src/zotero_mcp/client.py:250
↓ 24 callersFunction_paper
(key, title="Paper", item_type="conferencePaper", version=1)
tests/test_fulltext_web_mode.py:126
↓ 23 callersMethodclose
Close database connection.
src/zotero_mcp/local_db.py:526
↓ 22 callersFunction_make_arxiv_response
Create a mock requests.Response for arXiv API.
tests/test_add_by_url.py:77
↓ 22 callersFunction_patch_hybrid_mode
Patch _get_write_client to return (read_zot, write_zot).
tests/test_add_from_file.py:97
↓ 21 callersFunction_region
(source, x, y, w, h)
tests/test_page_layout.py:140
↓ 20 callersFunction_build_search
(monkeypatch, zot: FakeZoteroClient, chroma: FakeChromaClient, config_path: str | None = Non
tests/test_fulltext_web_mode.py:142
↓ 20 callersFunctionsetup_zotero_environment
Setup Zotero environment for CLI commands.
src/zotero_mcp/cli.py:243
↓ 19 callersFunction_patch_hybrid
Install a write-capable FakeZotero; return it.
tests/test_add_by_bibtex.py:20
↓ 19 callersFunction_patch_hybrid
(monkeypatch)
tests/test_add_by_csl_json.py:20
↓ 19 callersFunction_patch_path_valid
Patch os.path functions so the file path appears valid.
tests/test_add_from_file.py:89
↓ 19 callersFunction_patch_web_only
Patch for web-only mode: same client for read and write.
tests/test_collections.py:121
↓ 17 callersFunction_normalize_tag_filter
Normalize a tag-filter argument into a list[str] for pyzotero. Accepts every shape we've seen clients produce: - None / empty
src/zotero_mcp/tools/_helpers.py:274
↓ 17 callersFunction_patch_fitz
Patch fitz in sys.modules so 'import fitz' inside server functions works.
tests/test_add_from_file.py:107
↓ 16 callersFunction_coll
(key: str, name: str, deleted: bool = False, parent: str | None = None)
tests/test_trashed_collections.py:27
↓ 16 callersFunctioncreate_semantic_search
Create a ZoteroSemanticSearch instance. Args: config_path: Path to configuration file db_path: Optional path to Zotero datab
src/zotero_mcp/semantic_search.py:2248
↓ 16 callersMethodjson
(self)
tests/test_scite.py:33
↓ 16 callersMethodload_scenario
items: list of pyzotero-shaped dicts with top-level 'key' and 'data'.
tests/test_fulltext_web_mode.py:80
↓ 15 callersFunction_make_item
Build a Zotero item dict with optional relations.
tests/test_item_related.py:13
↓ 15 callersFunctionparse_bibtex
Parse a BibTeX string and return a list of structured entries. Each entry: ``{"entry_type": str, "citekey": str, "fields": dict}``. Applies `
src/zotero_mcp/citation_import.py:261
↓ 15 callersMethodupdate_database
Update the semantic search database with Zotero items. Args: force_full_rebuild: Whether to rebuild the entire database
src/zotero_mcp/semantic_search.py:1471
↓ 15 callersMethodupdate_item
(self, item, **kwargs)
tests/conftest.py:66
↓ 14 callersMethodsearch
Search for similar documents. Args: query_texts: List of query texts n_results: Number of results to return
src/zotero_mcp/chroma_client.py:676
↓ 12 callersFunction_coll
(key, name, parent=False)
tests/test_collection_resolver.py:21
↓ 12 callersMethod_extract_fulltext_for_item
Attempt to extract fulltext and source from the item's best attachment. Preference order: 1. ``.zotero-ft-cache`` (Zotero's own alrea
src/zotero_mcp/local_db.py:477
↓ 12 callersFunction_normalize_isbn
Normalize an ISBN string and validate the checksum. Accepts ISBN-10, ISBN-13, and prefixed/URL forms (isbn:, https://isbndb.com/...). Strips
src/zotero_mcp/tools/_helpers.py:619
↓ 12 callersFunction_parse_caption_block
Parse a text block as a figure/table caption. Args: text: Full text of a PDF text block Returns: {"label": "Figure 3",
src/zotero_mcp/pdf_layout.py:47
↓ 11 callersMethod_args
(self, **kwargs)
tests/test_cli_standalone.py:441
↓ 11 callersFunction_ctx
(args)
src/zotero_mcp/cli_standalone.py:64
↓ 11 callersFunction_import_tools
Import tool modules lazily to avoid heavy startup cost.
src/zotero_mcp/cli_standalone.py:57
↓ 11 callersFunction_make_book_item
Build a realistic Zotero book item dict for stubbing.
tests/test_update_item.py:86
↓ 11 callersFunction_parse_bibtex_author_list
Split a BibTeX authors string on ' and ' and structure each name.
src/zotero_mcp/citation_import.py:123
↓ 11 callersFunction_patch_client
(monkeypatch, fake)
tests/test_server_annotation_crud.py:53
↓ 11 callersMethod_process_item_batch
Process a batch of items. _failed_docs: optional list (passed by reference from update_database) that collects (doc_text, metadata, d
src/zotero_mcp/semantic_search.py:1792
↓ 11 callersMethod_run
(self, args)
tests/test_cli_standalone.py:449
↓ 11 callersMethodcreate_items
(self, items, **kwargs)
tests/conftest.py:53
↓ 11 callersFunctiondetect_page_regions
Detect candidate figure/table regions on a PDF page. Provides coordinate grounding for area annotations: instead of guessing normalized
src/zotero_mcp/pdf_layout.py:312
↓ 10 callersMethod_get_connection
Get database connection, creating if needed.
src/zotero_mcp/local_db.py:153
↓ 10 callersFunction_make_zot
(monkeypatch, items)
tests/test_collection_standalone_attachments.py:25
↓ 10 callersFunction_new_letter_page
(doc)
tests/test_page_layout.py:27
↓ 10 callersFunction_object_attr
(obj: Any, key: str, default: Any = None)
src/zotero_mcp/openai_batch.py:33
↓ 10 callersFunction_save_pdf
(doc, tmpdir, name="test.pdf")
tests/test_page_layout.py:41
↓ 10 callersFunctionbibtex_entry_to_zotero
Convert one parsed BibTeX entry dict into a Zotero item dict. ``template_fn(item_type)`` must return a pyzotero-style item template for the g
src/zotero_mcp/citation_import.py:339
↓ 10 callersMethodchildren
(self, item_key, **kwargs)
tests/conftest.py:50
↓ 10 callersFunctionget_collection_items
Get all items in a specific Zotero collection. Args: collection_key: The collection key/ID limit: Maximum number of items to
src/zotero_mcp/tools/retrieval.py:474
↓ 9 callersFunction_annotation
(key, parent, text)
tests/test_server_get_annotations.py:43
↓ 9 callersFunction_apply_extra_edits
Apply `Key: value` line edits to an Extra field value. Extra is treated as newline-separated lines; lines of the form "Key: value" are matche
src/zotero_mcp/tools/write.py:378
↓ 9 callersFunction_associate_captions_with_regions
Attach captions to regions by spatial scoring. Score components: - vertical proximity (hard cutoff at max_distance) - horizontal x-r
src/zotero_mcp/pdf_layout.py:216
↓ 9 callersMethod_create_document_text
Create searchable text from a Zotero item. Args: item: Zotero item dictionary Returns: Combined tex
src/zotero_mcp/semantic_search.py:577
↓ 9 callersFunction_disable_oa_pdf
Disable network lookups in _try_attach_oa_pdf for tests that create DOIs.
tests/test_add_by_bibtex.py:30
↓ 9 callersFunction_patch_fitz
(monkeypatch, pages, total=None)
tests/test_read_pdf.py:45
↓ 9 callersFunction_write_config
(tmp_path, extra: dict | None = None)
tests/test_fulltext_web_mode.py:281
↓ 9 callersMethodadd_parameters
(self, **kwargs)
tests/test_discovery.py:49
↓ 9 callersFunctioncsl_json_to_zotero
Convert one CSL JSON object into a Zotero item dict.
src/zotero_mcp/citation_import.py:525
↓ 9 callersMethoddelete_item
Delete an item from the semantic search database.
src/zotero_mcp/semantic_search.py:2238
↓ 9 callersMethoddump
Create a dummy file so code that checks os.path.exists passes.
tests/conftest.py:142
↓ 9 callersMethodraise_for_status
(self)
tests/test_webdav.py:20
↓ 8 callersFunction_append_extra
(template: dict, line: str)
src/zotero_mcp/citation_import.py:315
↓ 8 callersFunction_disable_oa_pdf
(monkeypatch)
tests/test_add_by_csl_json.py:29
↓ 8 callersFunction_download_and_attach_pdf
Download a PDF from a URL and attach it to a Zotero item. The URL is fetched through ``_guarded_pdf_get`` (SSRF guard + manual redirect re-va
src/zotero_mcp/tools/_helpers.py:774
↓ 8 callersFunction_fake_get_factory
Build a fake requests.get that returns responses keyed by URL substring.
tests/test_add_by_isbn.py:78
↓ 8 callersMethod_is_extractable_attachment
Return True when ``_extract_text_from_file`` can return useful text. PDF and HTML are handled by their dedicated extractors elsewhere. For
src/zotero_mcp/local_db.py:381
↓ 8 callersFunction_make_item
(deleted=None, collections=None, extra=None)
tests/test_item_metadata_status.py:40
↓ 8 callersFunction_make_items
()
tests/test_batch_update_extra.py:127
↓ 8 callersFunction_merge_candidate_regions
Filter noise, de-duplicate, and merge fragmented candidate regions. Composite figures often appear as multiple raster/vector fragments (
src/zotero_mcp/pdf_layout.py:138
↓ 8 callersFunction_patch_clients
(monkeypatch, zot)
tests/test_trashed_collections.py:67
↓ 8 callersMethod_resolve_attachment_path
Return the injected fake path.
tests/test_local_db.py:22
↓ 8 callersFunction_setup
(monkeypatch, items)
tests/test_batch_update_extra.py:147
↓ 8 callersFunctioncoerce_csl_json_input
Accept a CSL JSON string, single object, or list; return a list of dicts.
src/zotero_mcp/citation_import.py:645
↓ 8 callersMethodcollection
(self, key, **kwargs)
tests/test_token_optimization.py:464
↓ 8 callersFunctionmake_zotero_db
Create a minimal zotero.sqlite with the given item keys.
tests/test_fulltext_sync_watermark.py:18
↓ 7 callersFunction_annotation_item
(key, *, text="old text", comment="", color="#ffd400", tags=None)
tests/test_server_annotation_crud.py:33
↓ 7 callersFunction_book
(**fields)
tests/test_place_field_reads.py:19
↓ 7 callersFunction_build_attachment_extra
Build extra_fields dict from attachment_info for format_item_result.
src/zotero_mcp/tools/retrieval.py:454
↓ 7 callersFunction_caption
(label, kind, text, x, y, w, h)
tests/test_page_layout.py:216
↓ 7 callersFunction_format_bibtex_date
Build an ISO-ish date string from bibtex fields.
src/zotero_mcp/citation_import.py:218
↓ 7 callersFunction_gray_image_bytes
()
tests/test_page_layout.py:33
↓ 7 callersFunction_inject_citekey
Insert *citation_key* on the @-line of the first BibTeX entry if missing. Only touches entries whose @-line is empty (``@article{``) or has a bar
src/zotero_mcp/better_bibtex_client.py:20
↓ 7 callersFunction_make_item
Build a minimal Zotero item dict for testing.
tests/test_relations_field.py:32
↓ 7 callersMethod_make_reader
Create a LocalZoteroReader-like object for path resolution tests. Uses the real _resolve_attachment_path (not the fake override).
tests/test_local_db.py:76
↓ 7 callersFunction_resolve_collections_arg
Normalize the caller's ``collections`` argument and resolve every spec (key, name, or '/'-path) to a live collection key. Raises ValueError w
src/zotero_mcp/tools/write.py:26
↓ 7 callersMethod_setup_clients
(self, monkeypatch, fake_zot, items=None)
tests/test_page_layout.py:599
↓ 7 callersFunctionclean_html
Remove HTML/XML tags from a string. Args: raw_html: String containing HTML content. collapse_whitespace: If True, collapse runs o
src/zotero_mcp/utils.py:116
↓ 7 callersMethoddelete_collection
(self, collection, **kwargs)
tests/test_collections.py:52
↓ 7 callersMethoditem_template
Return a minimal Zotero item template.
tests/conftest.py:71
↓ 7 callersFunctionmake_search
Build a ZoteroSemanticSearch without touching Chroma or pyzotero.
tests/test_fulltext_sync_watermark.py:88
↓ 7 callersFunctionsplit_into_passages
Split *text* into overlapping passages on natural boundaries. Pure function (no I/O, no model load) so it is unit-testable in isolation. Retu
src/zotero_mcp/semantic_search.py:256
↓ 7 callersMethodtruncate
Truncate using tiktoken cl100k_base (correct for OpenAI models).
src/zotero_mcp/chroma_client.py:139
↓ 6 callersFunction_add_common_flags
Collection/idempotency flags shared by every `add` subcommand.
src/zotero_mcp/cli_standalone.py:677
next →1–100 of 2,104, ranked by callers