Skip to content

Restore Met Museum search with bounded v1.1 pagination - #116

Open
jonathanlli wants to merge 2 commits into
scaleapi:mainfrom
jonathanlli:fix/met-museum-search-v11
Open

jonathanlli wants to merge 2 commits into
scaleapi:mainfrom
jonathanlli:fix/met-museum-search-v11

Conversation

@jonathanlli

@jonathanlli jonathanlli commented Nov 5, 2026 •

Copy link
Copy Markdown

Summary

Restore Met Museum search after retirement of /public/collection/v1/search on October 1, 2026. Keep the benchmark's metmuseum-mcp@0.9.2 pin, tool names, argument schemas, and normal text output unchanged.

The latest published adapter (1.0.0) still uses the retired path and additionally changes the interface, so a version bump alone does not fix the outage.

Changes

  • Load a small search-only fetch compatibility module through the Met process's NODE_OPTIONS.
  • Route the exact old HTTPS search GET to /v1.1/search, preserving query filters.
  • Aggregate sequential 500-ID pages for at most 10,000 results under a shared 45-second deadline; propagate cancellation and HTTP failures without hidden retries.
  • Fail explicitly when results exceed the provider's accessible window, pagination is incomplete, totals change, or IDs repeat. Never present partial results as complete.
  • Keep object lookup, departments, and unrelated HTTP calls untouched.
  • Exercise search in the functional service preflight; object lookup remained healthy and did not reveal the retired search endpoint.
  • Add offline CI coverage and an opt-in live stdio MCP test.

Verification

  • 11 offline Node compatibility tests passed in the existing 1.2.7 evaluation image.
  • All 20 Python agent-environment tests passed on this clean upstream-based branch.
  • Real pinned stdio MCP server: tool schemas identical before/after the preload.
  • Live searches returned all 178 IDs for sunflowers, 1,815 IDs for cat (multiple pages), and 727 IDs for Hercules holding a club (multiple pages).
  • Empty-result search, department listing, and object lookup also passed.
  • No provider credentials or model calls used by these tests.

Compatibility caveat

The new provider backend changes matching and ordering, and caps accessible search results at 10,000. This repair restores availability, not exact historical search equivalence. Broad queries must be narrowed rather than silently truncated. Deployments must rebuild the image (or explicitly mount the compatibility file and updated template); changing source alone does not modify an existing image.

Provider documentation: https://metmuseum.github.io/#migrating-from-v1search

RetriggerView in GreptileConfidence Score: 5/5

The follow-up changes appear safe to merge.

Summary

Restores Met Museum search through a search-only preload while keeping the pinned adapter and tool interface.

  • Met Museum search uses v1.1 pages without changing its MCP interface.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Pinned Met adapter fetch] --> B{Exact old search GET?}
  B -->|No| C[Original fetch unchanged]
  B -->|Yes| D[Fetch v1.1 pages under one deadline]
  D --> E{Complete and valid?}
  E -->|More pages needed| D
  E -->|Yes| F[Return total and all IDs]
  E -->|Failure or result limit exceeded| G[Return HTTP failure or throw]
Loading

Reviews (2) · Last reviewed commit: "Strengthen Met empty-search and shared-d..." · Reviewed by Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant