Skip to content

feat(integrations): add Glasser block and tools - #8198

Open
glasserai wants to merge 3 commits into
simstudioai:stagingfrom
glasserai:feat/glasser-integration
Open

glasserai wants to merge 3 commits into
simstudioai:stagingfrom
glasserai:feat/glasser-integration

Conversation

@glasserai

@glasserai glasserai commented Sep 23, 2026

Copy link
Copy Markdown

Summary

Adds a Glasser integration: one block and six tools, one per Glasser GTM Solution.

Glasser is a data broker. One API key covers 1,000+ paid endpoints from providers such as Apollo, People Data Labs, Hunter, Ahrefs, Semrush, DataForSEO, Serper, Exa, ScrapeCreators and RentCast. Each Solution call names what data is wanted; Glasser routes it to a provider, falls back on provider errors, and returns the provider-native result with the exact USD charge.

Tool Endpoint What it does
glasser_people_search POST /v1/solutions/gtm/people_search Find contacts by title, seniority, location or employer; enrich one person; find a work email
glasser_company_intelligence POST /v1/solutions/gtm/company_intelligence Profile, tech stack, traffic, competitors, funding or news from a domain
glasser_seo_research POST /v1/solutions/gtm/seo_research Keyword volume and ideas, SERP, domain overview, ranked keywords, backlinks, referring domains, domain rating
glasser_web_research POST /v1/solutions/gtm/web_research Web, news, places, scholar, shopping, image and video search; scrape; similar pages; answer with sources
glasser_social_research POST /v1/solutions/gtm/social_research Search posts, read a profile, feed or single post, find other profiles on Reddit, X, YouTube, TikTok, Instagram, LinkedIn
glasser_market_data POST /v1/solutions/gtm/market_data US property values, rent estimates, records, listings, ZIP market stats, stock quotes

Type of Change

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

Implementation notes

  • Request contract: each tool is an absolute external ToolConfig.request. Every call sends a fresh Idempotency-Key (via generateId()), which the API requires; one key binds to one run, so a transport retry reads the original run instead of paying twice.
  • In-flight runs: the API answers with the Run itself, complete (200) or still in flight (202). postProcess polls GET /v1/runs/{id} every 2 s for up to 3 min, tolerating up to three consecutive polling errors, following the Wiza tool's pattern.
  • Outputs: the Run envelope is documented in Glasser's OpenAPI document (id, run_url, status, provider, endpoint, charge_usd, failure, task_id) and is mapped field by field. output is declared as bare json on purpose: it is the provider-native payload, and its shape depends on which provider and endpoint served the call. Nothing is guessed.
  • Model input: only the answer action of glasser_web_research hands the query to a model (Exa's answer endpoint), so request.modelInput projects query for that action alone, like Linkup's sourced-answer projection.
  • Block: one operation dropdown keyed by tool id, per-operation action dropdowns, a provider dropdown whose options derive from the selected operation, canvas sentences for all six operations, eight templates and four skills grounded in tools.access.
  • Icon: Glasser's mark from glasser.ai; the body follows currentColor, the visor keeps its brand orange, so it renders bare in light and dark mode.
  • Baseline: the knowledge page graph was one module over its check-tool-registry-boundary allowance after adding the nine tool modules, so its entry alone was re-recorded. Staging already sits close to the limit on that page.
  • No hosted key, BYOK or OAuth: users bring their own Glasser API key.

Testing

  • bun run tool-metadata:generate, bun run scripts/generate-docs.ts, bun run generate:block-successors, bun run deployment-config:generate — generated artifacts committed
  • bun run check:audits — all 47 audits pass (includes docs:check, integration-catalog:check, check:canvas-sentences, check:bare-icons, check:tool-request-boundary, check:tool-registry-boundary, check:icon-path-precision, check:byok-providers)
  • bun run apps/sim/scripts/check-canvas-sentences.ts --block=glasser — 6/6 operations
  • bunx vitest run tools/glasser/glasser.test.ts — 11 tests: request headers and body shaping, run mapping, failed-run reporting, polling to completion, polling give-up, block param folding
  • bunx vitest run blocks tools/model-input-selectors.test.ts tools/operation-input.test.ts — 1595 tests pass
  • tsc --noEmit — no errors in the added files
  • Request and response shapes follow Glasser's published OpenAPI document and match Glasser's shipped n8n and Dify adapters.

Reviewers may want to focus on apps/sim/tools/glasser/run.ts (idempotency header, polling, run mapping) and the block's tools.config.params, which folds the per-operation action dropdowns into the API's action field.

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)

🤖 Generated with Claude Code

Six tools, one per Glasser GTM Solution (people search, company
intelligence, SEO research, web research, social research, market data),
each a POST to api.glasser.ai with a fresh Idempotency-Key that polls
GET /v1/runs/{id} when the run comes back in flight. One block with an
operation dropdown, canvas sentences, templates and skills. Generated
tool metadata, docs page, catalog and name maps included.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 23, 2026

Copy link
Copy Markdown

@glasserai is attempting to deploy a commit to the Sim Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the remaining stale-parameter finding is fully fixed and no new actionable issues were identified.

Summary

Adds the Glasser integration as a workflow block with six GTM data tools, API-key authentication, asynchronous run polling, provider-native outputs, catalog documentation, icons, generated metadata, deployment configuration, and regression coverage.

  • Registers people search, company intelligence, SEO research, web research, social research, and market data operations.
  • Maps operation-specific block controls into each tool’s request contract while preventing values from previously selected operations from leaking into later requests.
  • Polls in-flight Glasser runs with bounded error handling and exposes run status, provider, charge, failure, and result data.
  • Updates integration discovery surfaces and generated registries for the new block and tools.
  • Adds tests covering request construction, response mapping, polling behavior, and operation parameter folding.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Glasser workflow block] --> B{Selected operation}
  B --> C[Operation-specific parameter fold]
  C --> D[Registered Glasser tool]
  D --> E[POST GTM solution endpoint]
  E --> F{Run status}
  F -->|Completed or failed| G[Map run envelope and provider output]
  F -->|Queued or running| H[Poll run endpoint with bounded retries]
  H --> F
  G --> I[Workflow output]
Loading

Reviews (3) · Last reviewed commit: "fix(glasser): fold only the selected ope..."

Comment thread apps/sim/tools/glasser/run.ts Outdated
Comment thread apps/sim/blocks/blocks/glasser.ts
Comment thread apps/sim/blocks/blocks/glasser.ts
Comment thread apps/sim/tools/glasser/glasser.test.ts Outdated
Comment thread apps/sim/blocks/blocks/glasser.ts Outdated
…on comments

Address review: a rejected or undecodable poll now counts toward the
three-error budget and returns success: false instead of escaping the
loop; Social Media Search gets its own query and URL controls keyed on
its mode rather than the hidden web action; the news query copy says the
domain stays required (the API contract requires it); test drops its any
cast; non-TSDoc section comments removed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@glasserai

Copy link
Copy Markdown
Author

Addressed all five findings in 37b8a66 (details on each thread). bun run check:audits passes again and the Glasser suite is now 12 tests.

@greptileai

Comment thread apps/sim/blocks/blocks/glasser.ts
Values stored by a previously selected operation stayed on the block and
were folded into the request, so a social call could carry the web
query or URL. The fold now reads only the operation's own sub-blocks and
clears every other API field explicitly, so the merge with stored inputs
cannot resurrect them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@glasserai

Copy link
Copy Markdown
Author

Fixed the remaining finding in 3bf514d (see thread); audits and the 13 Glasser tests pass.

@greptileai

This branch has not been deployed

No deployments
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