Spiral gives your agent every tool with one account. Browse the tools →

opencode · Developer

How to Use arXiv paper search in opencode

Returns matching paper metadata, including titles, authors, abstracts, and identifiers. Use it to find research by topic or title before examining individual papers or preparing citations.

Prompts to try with arXiv paper search in opencode

Copy an example into opencode, or ask in your own words.

Use arXiv paper search to find papers about retrieval-augmented generation in computer science, then draft a reading shortlist in docs/research.md with titles, authors, and abstracts.

arXiv paper searchopencode
Try asking
  • Use arXiv paper search to look this up and give me the result as a table. Save the result in ./assets.

  • Pull the latest numbers from arXiv paper search and tell me what changed since last week.

  • Check arXiv paper search and summarize what you find in three bullet points.

  • Pull the newest data from arXiv paper search and give me the result as a table.

How to set up arXiv paper search in opencode

Pick the way that suits you. Each takes about two minutes.

Use Spiral's MCP server

  1. Add the server

    Leave out --global to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

    opencode mcp add spiral --global --url https://api.spiral.ai/mcp
  2. Sign in

    Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, /mcps starts the same sign-in.

    opencode mcp auth spiral
  3. Check it

    Spiral shows as connected.

    opencode mcp list

Use the Spiral skill

  1. Send opencode this message

    Your agent reads Spiral's skill and sets itself up.

    set up https://spiral.ai/SKILL.md
  2. Sign in or paste a key

    Approve Spiral in the browser, or give the agent a key from the console.

Use the Spiral CLI

  1. Install and sign in

    Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

    npx -y spiral-cli@latest init

Call the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Run arXiv paper search

    One request; the result comes back by polling or a webhook.

    curl https://api.spiral.ai/v1/runs \
      -H "Authorization: Bearer $SPIRAL_API_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: $(uuidgen)" \
      -d '{
        "provider": "alexandria",
        "model": "arxiv-org/papers/search_papers",
        "input": {
          "query": "<query>"
        }
      }'

Then paste one of the prompts above: opencode finds arXiv paper search on Spiral, shows the price and runs it.

arXiv paper search providers and prices

Spiral runs arXiv paper search through Alexandria. Open a card for today's price, with every fee included.

AlexandriaDeveloper
arXiv · Search papers
arxiv-org/papers/search_papers

Settings you can ask for

Ask opencode for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Start0 to 30000

Zero-based offset of the first result (the start from a previous page's next_start).

Sort byrelevance, lastUpdatedDate, or submittedDate

Sort key (default relevance).

Sort orderascending or descending

Sort direction (default descending).

Max results1 to 100

Results per page (1-100).

Every API field of arXiv · Search papers is on its tool page: open its card above.

What can you do with arXiv paper search in opencode?

Build a research index with arXiv paper records, subject organization, and bibliography entries. Connect those records to the project's reading lists or documentation so each selected reference has an identifiable source.

Build a subject research catalog

Choose subject sets, collect their metadata, and use category listings and topic searches to organize discovery. Add individual paper details and BibTeX citations to each selected catalog entry.

Prepare a cited literature review

Find papers about retrieval-augmented generation, inspect their abstracts, and export citations for the selected references. Build the initial reading shortlist from metadata before evaluating the papers themselves.

Prepare a journal club reading list

Browse machine learning announcements, search for the meeting's topic, and inspect promising paper records. Attach a BibTeX citation to each paper chosen for discussion.

Plan an interdisciplinary course

Choose subject areas spanning computer science and statistics, browse their paper listings, and search for course topics. Inspect paper details and collect citations for the final reading list.

Maintain a topical reading website

Define subject coverage, refresh metadata, and combine category browsing with topic searches to select papers. Publish chosen paper descriptions and citation entries, with links to arXiv.

Questions about arXiv paper search in opencode

Can opencode use arXiv paper search?

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run arXiv paper search like any built-in tool.

How much does arXiv paper search cost in opencode?

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.

Do I need an Alexandria account to use arXiv paper search in opencode?

No. Spiral runs arXiv paper search on its own Alexandria account. You sign in to Spiral once and never paste a key.

How long does it take to set up arXiv paper search in opencode?

About two minutes: add the server, then sign in, then check it.

Does opencode wait while arXiv paper search runs?

arXiv paper search runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.

Which research fields does arXiv cover?

arXiv covers eight areas, including physics, mathematics, computer science, economics, and quantitative finance. Its coverage is bounded by those subject areas.

How fresh are arXiv records?

New public announcements normally appear Sunday through Thursday, with none on Friday or Saturday. The bulk metadata service adds new article metadata daily.

Does appearing on arXiv mean a paper passed peer review?

No. arXiv checks submissions through moderation, but that process is separate from peer review.

Can I collect metadata for all of arXiv?

The OAI-PMH service provides metadata for all arXiv articles and is the preferred route for keeping a bulk copy current. Subject sets let you restrict collection to a category, archive, or broader discipline.

Does a harvesting date range identify papers submitted during that period?

No. Harvesting dates follow metadata modifications, so older papers can appear when their records change. They cannot reliably produce a count of papers originally submitted in a particular month.

Get started

Start using arXiv paper search in opencode

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into opencode:

Set up opencode

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options