Skip to content

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

Open
googio wants to merge 1 commit into
simstudioai:stagingfrom
googio:feat/serply-search
Open

feat(serply): add Serply web search tool and block#6866
googio wants to merge 1 commit 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.

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.
@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)
docs Skipped Skipped Aug 19, 2026 9:27pm

Request Review

@cursor

cursor Bot commented Aug 19, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Additive integration only; no changes to auth, core execution paths, or existing search tools beyond registry entries.

Overview
Adds an optional Serply web search integration alongside existing providers like Serper: a new serply_search tool calls Serply’s API with X-Api-Key, optional num, and a fixed User-Agent for Cloudflare, and normalizes organic hits into searchResults (title, link, snippet).

A matching Serply workflow block (query, result count, API key) wires to that tool and is registered in the block and tool registries. Existing workflows are unchanged unless they adopt this block; no global Serply env key is introduced.

Reviewed by Cursor Bugbot for commit a4129fe. 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!

@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.

updateProjectTool,
} from '@/tools/sentry'
import { serperSearchTool } from '@/tools/serper'
import { searchTool as serplySearchTool } from '@/tools/serply/search'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Generated tool metadata left stale

Medium Severity

serply_search is registered in the live tool registry, but apps/sim/tools/generated/tool-ids.ts, tool-metadata.ts, and tool-outputs.ts were not regenerated. Client and serializer code resolve tools through those artifacts via hasToolId / getToolParams / getToolMetadata, so the new tool is treated as unknown and tool-metadata:check will fail.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit a4129fe. Configure here.

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