Add Serply Search tool to the Atomic Forge - #284
Open
googio wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 asearch_typefield (search,news,scholar) next toqueriesandmax_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_fetchper query gathered withreturn_exceptions=Trueso one failing query is logged and skipped rather than failing the batch, and a syncrunwrapper. The API key comes fromSerplySearchToolConfig.api_keywith a fallback to theSERPLY_API_KEYenvironment variable, andrun_asyncraises a clearValueErrorwhen neither is set.Changes
atomic-forge/tools/serply_search/tool/serply_search.py: the toolatomic-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 toolsatomic-forge/README.md,AGENTS.md,docs/guides/tools.md,README.md: one listing line each, between SearXNG Search and Tavily Searchuv.lock:uv lockoutput registering the new workspace member (additive only)Verification
black --check --line-length 127andflake8(repo.flake8) pass on the new directorypytest atomic-forge/tools/serply_search/tests: 13 passedsearch,news, andscholarwith two queries each returned the expected fields; a wrong key produced a logged 401 warning and an empty result set, as intendedNotes
numand returns up to 100 entries, so the tool trims results client side tomax_results_per_query.User-Agent, which the API requires.