close
Skip to content

feat(serply): add Serply web search tool and block - #6866

Open
googio wants to merge 2 commits into
simstudioai:stagingfrom
googio:feat/serply-search
Open

feat(serply): add Serply web search tool and block#6866
googio wants to merge 2 commits into
simstudioai:stagingfrom
googio:feat/serply-search

Conversation

@googio

@googio googio commented Aug 19, 2026

Copy link
Copy Markdown

Summary

Adds a Serply (https://serply.io) web search tool and block, following the existing serper/tavily integration pattern.

Closes #6865

  • New tool serply_search (apps/sim/tools/serply/search.ts): GET https://api.serply.io/v1/search/ with X-Api-Key auth, mapped to searchResults (title, link, snippet). Serply sits behind Cloudflare, so the request always sends an explicit User-Agent.
  • New block SerplyBlock (apps/sim/blocks/blocks/serply.ts) with query, number of results, and API key fields, mirroring the serper block's shape. Uses the shared Search icon from @sim/emcn/icons rather than adding a hand-drawn brand SVG.
  • Registered in tools/registry.ts and blocks/registry-maps.ts (BLOCK_REGISTRY + BLOCK_META_REGISTRY, alphabetical).

Serply is fully optional. No existing behavior changes for workflows that do not use it, and no SERPLY_API_KEY is required anywhere.

More on the API: https://serply.io/docs

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

  • Added apps/sim/tools/serply/search.test.ts (4 tests: headers/User-Agent, URL building, result mapping, empty-results case). All pass.
  • bun run type-check in apps/sim: 0 errors.
  • Regression sweep: tools/serper, tools/index.test.ts (164 tests) and all of blocks/ (66 files, 938 tests) pass unchanged.
  • bun run check:api-validation passes.
  • bunx biome check clean on all touched files.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

N/A (no bespoke UI; the block renders through the standard block UI generated from its config)

Disclosure: I work with Serply. Happy to adjust scope, naming, or drop this
entirely if it isn't a direction you want for the project.

@vercel

vercel Bot commented Aug 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
Image docs Skipped Skipped Aug 22, 2026 12:46pm

Request Review

@cursor

cursor Bot commented Aug 19, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Additive optional integration following existing search-block patterns. Users supply their own API key; no auth or existing workflow behavior is changed.

Overview
Adds a Serply workflow block so users can run Google web search via Serply with an API key.

The new serply block takes a required query, optional result count (10–50), and a password-style API key, then exposes searchResults via the serply_search tool. It is registered in BLOCK_REGISTRY and BLOCK_META_REGISTRY (tags: web-scraping, seo).

Shape mirrors Serper, but with fewer options (no type/country/language) and the shared Search icon instead of a brand SVG.

Reviewed by Cursor Bugbot for commit cf20804. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds a Serply web-search integration and exposes it as a workflow block.

  • Defines the authenticated Serply search request and maps results into the shared search-result shape.
  • Registers the new tool and block in their respective catalogs.
  • Adds tests for headers, URL construction, response mapping, and empty results.

Confidence Score: 4/5

The PR appears safe to merge, with only a non-blocking type-safety cleanup needed in the new integration and its test.

The block and tool identifiers align and the request path is wired consistently with existing search integrations; the only accepted concern is explicit any usage that weakens compile-time validation.

Files Needing Attention: apps/sim/tools/serply/search.ts, apps/sim/tools/serply/search.test.ts

Important Files Changed

Filename Overview
apps/sim/tools/serply/search.ts Implements the Serply request and result mapping correctly at a high level, but uses an explicit any for response items.
apps/sim/blocks/blocks/serply.ts Defines the Serply block with aligned inputs, outputs, credentials, and registered tool access.
apps/sim/tools/serply/search.test.ts Covers the principal request and mapping behavior, with one explicit any weakening type safety.
apps/sim/tools/registry.ts Registers the new tool under the matching serply_search identifier.
apps/sim/blocks/registry-maps.ts Registers the Serply block and metadata consistently in both block maps.

Reviews (1): Last reviewed commit: "feat(serply): add Serply web search tool..." | Re-trigger Greptile

const results = Array.isArray(data.results) ? data.results : []

const searchResults: SearchResult[] = results.map((item: any) => ({
title: item.title || '',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Avoid untyped response items

The explicit any removes compiler checks from every Serply result mapping, allowing invalid response assumptions to pass type checking as the integration evolves. Model the response item or narrow it from unknown; the same explicit any pattern also appears in the URL-builder test.

Context Used: TypeScript conventions and type safety (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in cf20804. transformResponse now parses into declared shapes (SerplySearchApiResponse / SerplyResultItem with optional title/link/description) instead of mapping over any, and the URL-builder test casts to the exported SearchParams rather than any — matching the mem0/memory test convention. No any left in tools/serply/; bun run type-check is clean.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a4129fe. Configure here.

Comment thread apps/sim/tools/registry.ts
googio added 2 commits August 22, 2026 08:44
Adds a Serply search tool and block following the existing serper/tavily
pattern: GET https://api.serply.io/v1/search/ with an API key header,
mapped to organic search results (title, link, snippet). Serply is
optional; nothing changes for workflows that do not use it.
Addresses review feedback on the Serply tool.

serply_search was registered in tools/registry.ts but missing from the
generated artifacts, so hasToolId/getToolParams/getToolMetadata resolved
it as unknown and tool-metadata:check failed. Regenerated via
tool-metadata:generate; the only delta is the added serply_search entry
in each file, no existing tool changed.

Replaced the explicit any in transformResponse with declared
SerplyResultItem/SerplySearchApiResponse shapes, and typed the URL
builder cast in the test as SearchParams.
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.

2 participants