Glasser
← All posts

Glasser Team8 min read

How to Add Reliable Web Search to Your AI Agent

Connect your AI agent through the Glasser Skill or MCP, cut repeated searches, and verify sources, Run results, and costs before relying on an answer.

An ivory terminal connects through an amber glass magnifying lens to blank web-document tiles.

Give your agent a search tool and a clear job

Your agent needs current sources when it checks a product release, researches a company, or compares documentation. A useful web search workflow ends with evidence you can inspect: relevant URLs, the claims those pages support, and any gaps the agent could not resolve.

Glasser's Skill gives local agents instructions for finding data, checking the price, and retrieving it through the CLI. Its MCP server connects supported assistants to the same data operations. One Glasser Key provides access to allowed provider operations without separate provider accounts; Search and Inspect are free, while Runs use the selected operation's price.

The practical starting point is to connect your existing agent, give it one bounded research task, and review the first result. You can ask it to discover a suitable web search operation and show the price before spending.

Your working environmentStarting pointWhat you need
Local Claude Code, Codex, or Cursor agentGlasser Skill plus CLITerminal and internet access; local setup requires Node.js 22 or newer
Supported assistant using connectorsGlasser MCPA client that can connect to Glasser and complete sign-in
Local client already connected through MCPKeep the existing connectionConfirm that the Glasser balance tool responds

These paths follow Glasser's official setup guidance. If your agent already has a working search integration that covers the task, use that connection first.

Define the answer before the agent starts searching

“Research this company” leaves the agent to decide how many queries, which sources, and when to stop. Give it the subject, the question, a time window, and the output you will review.

Our recommended task contract is:

ConstraintExampleWhat it resolves
QuestionWhat product announcements did Stripe publish in the last 30 days?Sets the facts to find
Source preferencePrefer Stripe's own announcement pagesSets the evidence standard
Market and languageUS market, English resultsMakes regional assumptions explicit
OutputUp to five announcements, each with title, date, URL, and a supported summaryDefines completion
SpendingShow the operation and current price before any paid RunCreates a review point
Stop conditionStop when the requested items are verified; report any shortfallLimits open-ended exploration

This is an editorial workflow recommendation. The agent must map these constraints to the selected operation's supported input. A date window or source preference in your prompt does not establish that the provider has a matching filter; the agent may need to check returned pages itself.

Keep discovery and verification separate. A URL and search snippet can identify a promising page. A summary of a product change needs evidence from that page. Request full-page retrieval only when the chosen search output does not contain enough information to support the answer.

Connect through the Skill or MCP

Use the Skill in a local coding agent

Paste this into your local agent's chat:

set up https://glasser.ai/SKILL.md

Follow the setup guide for your client. Local setup saves the Skill, installs the CLI, signs in through the browser, and checks your balance. Complete the sign-in approval when prompted; you do not need to paste a Key into the conversation. Setup can require file or installation approval in your client.

After setup, start a new conversation if the client needs one to discover the saved Skill. Confirm the connection with:

Use the installed Glasser Skill to check my available balance.
Do not make any paid Runs.

A successful balance check confirms the connection, including when the available balance is zero. Glasser's Claude Code guide documents this setup and new-session check.

Use MCP in a supported assistant

Open the Glasser MCP guide, choose your client, and connect using its documented steps. The server URL is:

https://api.glasser.ai/mcp

For clients supporting OAuth sign-in, sign in to Glasser, choose your Workspace, and select Allow. Ask the assistant to check your available balance without making paid Runs. MCP setup does not require installing the Glasser CLI; clients that cannot use OAuth have separate Key-based instructions in the official guide.

Glasser's MCP exposes search, inspect, and run, plus tools for reading Runs and checking balance. The agent discovers provider operations through those tools, so you can ask for the research task in plain language.

Ask the agent to find sources and show its execution plan

After the connection check, use this example. Replace the company and time window with your task:

Use Glasser to find product announcements published by Stripe
in the last 30 days. Use English results for the US market and
prefer Stripe's own pages.

Find a suitable web search operation and inspect its current
input, output, run mode, and price. Show me what it can return,
the planned queries, and the cost basis. Wait for my approval
before any paid Run, including page retrieval.

After approval, return up to five verified announcements with:
- title and publication date
- source URL
- a short summary supported by the source page
- whether you read the page or only saw a search snippet

Stop when those items are verified. If there are fewer than five,
report the shortfall. Keep the Run reference and actual charge
with the result. Ask before starting additional paid work.

The prompt is our suggested task instruction. It does not create provider filters or an automatic research pipeline. Glasser's documented workflow is Search → Inspect → Run: Search discovers operations in its catalog, Inspect checks the contract and price, and Run retrieves provider data. Catalog Search itself does not search the public web.

Choose the operation by the evidence you need

For a Google result list, Glasser's DataForSEO page documents an operation returning ranked URLs, descriptions, and SERP blocks for a keyword and location. That can help the agent discover pages or inspect search positions. It does not establish that the operation returns full article text.

If your task needs a source passage, ask the agent to inspect an operation that supplies the required page content. If you need a ranking audit, preserve the keyword, location, language, observation time, and returned organic positions. Match the operation to the task before authorizing execution.

Review one small result first

Approve a small request after inspecting its price and scope. Check that the returned URLs answer the question, that dates are within the requested window, and that summaries use evidence the agent actually read. Expand only when the sample exposes a specific missing fact.

Reduce repeated searches and make failures recoverable

Faster work starts with fewer unnecessary steps. Use these recommendations to evaluate your agent workflow; this article does not report a latency benchmark or promise that a Glasser operation will outperform your current search tool.

Search again only for a named evidence gap

Ask the agent to name the missing fact before adding another query. Rephrasing a broad query repeatedly can retrieve the same pages. Reading a relevant primary source may resolve the question without more searches; requesting every result's full text can add work before relevance is established.

For repeated tasks, preserve your task instructions and output format. Recheck the current endpoint contract and price when executing a new task. These instructions help the agent keep its work consistent; they do not configure a Glasser cache or automatic fallback.

Check execution, evidence, and cost separately

Glasser's execution documentation distinguishes a Run's status, provider_response, and charge_usd. A COMPLETED Run can contain a provider error, and a FAILED Run can still have a charge under its price rules.

CheckAsk the agent to report
ExecutionIs the Run still QUEUED or RUNNING, or has it finished?
Provider responseDid the provider return useful results, an empty response, or an error?
Source evidenceWhich requested claims have page-level support? Which remain unverified?
CostWhat was the actual charge, including unsuccessful attempts?

If a Run is still in progress, read that Run's status before creating another execution. After a timeout or lost connection, Glasser documents retrying with the same idempotency key and unchanged execution parameters to retrieve the original Run without another charge. Starting a different execution requires a new key.

For MCP rate limits, the official MCP documentation tells the agent to read retry_after_ms before retrying. An alternate provider is a new selection and spending decision: inspect its contract and price, then obtain authorization for the additional work.

Compare time to a usable answer

Evaluate a few tasks you actually perform: an announcement lookup, a documentation check, and a company research question. Record elapsed time to a verified answer, number of paid Runs, actual cost, and unresolved claims. Keep the questions and evidence requirements the same when comparing your previous workflow.

A task finishes when the answer has the evidence you requested. If you need provider-specific evaluation next, use the Tavily vs Brave comparison; broader free-access options are covered in the free web search API guide.

Do I need to write Python code?

You can use the Glasser Skill with a local agent or connect a supported assistant through MCP. The agent handles the documented tool calls; your setup still needs the required client access and sign-in.

Does every web search operation return full page content?

The selected operation's contract determines its output. Inspect it first, then request a separate content operation when the search response does not provide enough evidence for your answer.

Will Skill or MCP make my agent's search faster?

They provide ways for the agent to use Glasser, and this article does not establish a speed improvement. Measure time to a verified answer while reducing redundant queries and unnecessary content retrieval.

What if the connection works but a search fails?

A successful balance check confirms connectivity, while an individual Run depends on access, funds, inputs, and provider behavior. Ask the agent to report the actual refusal or Run result and charge before retrying or choosing another operation.