Skip to content

Add Serply Search tool to the Atomic Forge - #284

Open
googio wants to merge 1 commit into
Eigenwise:mainfrom
googio:feat/serply-search
Open

Add Serply Search tool to the Atomic Forge#284
googio wants to merge 1 commit into
Eigenwise:mainfrom
googio:feat/serply-search

Conversation

@googio

@googio googio commented Sep 12, 2026

Copy link
Copy Markdown

I work with Serply, the provider of the search API this tool calls.

Summary

Adds atomic-forge/tools/serply_search, a Forge tool that runs Google web, Google News, and Google Scholar searches through the Serply API. One tool covers all three: the input schema carries a search_type field (search, news, scholar) next to queries and max_results_per_query, and each result item exposes the fields that endpoint returns (position for web results, published date and source for news, authors and citation count for papers).

The implementation follows the layout of the newer Forge tools (hackernews_search, arxiv_search): input schema, output schemas, config, tool class with an async _fetch per query gathered with return_exceptions=True so one failing query is logged and skipped rather than failing the batch, and a sync run wrapper. The API key comes from SerplySearchToolConfig.api_key with a fallback to the SERPLY_API_KEY environment variable, and run_async raises a clear ValueError when neither is set.

Changes

  • atomic-forge/tools/serply_search/tool/serply_search.py: the tool
  • atomic-forge/tools/serply_search/tests/test_serply_search.py: 13 unit tests (result normalisation for all three endpoints, request parameters, client-side trimming for the news endpoint, HTTP error, failing-query skip, API key header and fallback, sync wrapper)
  • atomic-forge/tools/serply_search/README.md, pyproject.toml, requirements.txt, .coveragerc: packaging files in the same shape as the other tools
  • atomic-forge/README.md, AGENTS.md, docs/guides/tools.md, README.md: one listing line each, between SearXNG Search and Tavily Search
  • uv.lock: uv lock output registering the new workspace member (additive only)

Verification

  • black --check --line-length 127 and flake8 (repo .flake8) pass on the new directory
  • pytest atomic-forge/tools/serply_search/tests: 13 passed
  • Live run against the API for search, news, and scholar with two queries each returned the expected fields; a wrong key produced a logged 401 warning and an empty result set, as intended

Notes

  • The Serply news endpoint ignores num and returns up to 100 entries, so the tool trims results client side to max_results_per_query.
  • The tool sends an explicit User-Agent, which the API requires.

Adds atomic-forge/tools/serply_search, a Forge tool that queries Google web,
Google News, and Google Scholar results through the Serply API. It follows the
layout of the existing search tools (input/output schemas, config, async fetch
per query, sync run wrapper) and ships with unit tests, a README, and the
packaging files the Forge expects. The tool is listed alongside the other
search tools and registered in the workspace lockfile.
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