Skip to main content
Glama

search

Run web queries through Perplexity to get cited answers, verify claims against sources, and save long responses to text files.

Instructions

Search the web using Perplexity.ai with claim-level citation provenance ([1] markers, snippets, dates), optional live claim-source verification (supported/weak/unverified), local caching, cancellation-safe streaming, progress notifications, partial .txt checkpoints, typed error JSON, poolable browser profiles, and optional official Agent API backend. Supports model, thread_url, timeout_seconds (default 900s / max 1800s), profile, backend, verify_claims, no_cache, and output_file / auto .txt spooling (>= 15000 chars).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoOptional Perplexity model name (e.g. 'Best', 'GPT-6.1 Sol', 'Grok 4.7', 'Claude Sonnet 5.5', 'Gemini 4 Hydrogen', 'Kimi K3', or 'sonar' for API backend). Omit to use the currently selected model.
queryYesThe search query or follow-up question
backendNoExecution backend: 'auto' (uses official Perplexity Agent API if PERPLEXITY_API_KEY is configured and thread_url is omitted, otherwise browser Pro session), 'browser' (Playwright Pro UI), or 'api' (official HTTPS Agent API).
profileNoOptional browser profile name or directory path for isolated/concurrent execution (e.g. 'default', 'worker-2'). When omitted, automatically routes to an idle slot in PERPLEXITY_PROFILE_DIRS / default profile.
no_cacheNoIf true, bypasses the local response cache (default TTL 3600s, configurable via PERPLEXITY_CACHE_TTL_SECONDS) and forces a fresh search.
thread_urlNoOptional Perplexity thread URL returned by a previous search to ask a follow-up in the same conversation (browser backend).
output_fileNoOptional .txt file path to save the full answer to (regardless of length). Relative paths resolve inside the server's outputs directory. When omitted, answers at or above 15000 chars (configurable via PERPLEXITY_LONG_OUTPUT_CHARS) are automatically saved to a .txt file with an inline preview and path.
verify_claimsNoIf true (or PERPLEXITY_VERIFY_CLAIMS=1), fetches cited pages and checks key facts (numbers, dates, versions, names) for each claim, marking supported / weak / unverified.
timeout_secondsNoOptional timeout in seconds for waiting on the answer (defaults to server timeout, 900s / 15 minutes; max 1800s for very large code or multi-part responses).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.0

TDQS

B3.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations supplied, the description carries the full burden and does disclose real behavior beyond the schema: local caching with TTL, cancellation-safe streaming, progress notifications, partial .txt checkpoints, typed error JSON, and automatic spooling past 15000 chars. It does not state auth/session requirements or any rate-limit behavior, which is a meaningful omission for a tool that has a sibling named login. The feature-dump style makes the disclosure noisy but substantive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single run-on sentence that stacks a dozen unrelated features, then redundantly re-enumerates parameters the schema already documents. Nothing is front-loaded beyond the first clause, and an agent must parse a long comma chain to find the operative facts. The content is under-organized rather than merely long.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a nine-parameter tool with no output schema, the description does cover what comes back (citation markers, snippets, dates, verification statuses, error JSON, .txt spooling) and the timeout/caching envelope. What is missing is operational context: session/auth prerequisites and how it relates to the other search and model-management tools. Overall complete enough to invoke correctly, though not to choose wisely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already explains all nine parameters in detail, including enums, defaults, and the 1800s cap. The description's parameter sentence largely re-lists names and defaults already present in the schema rather than adding new meaning. Baseline 3 applies when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening clause gives a specific verb and resource — 'Search the web using Perplexity.ai' — and the citation-provenance detail sharpens what kind of search this is. It never contrasts itself with the sibling search_advanced, so an agent cannot tell from this text which of the two search tools to pick. Purpose is clear; differentiation is absent.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use or when-not-to-use guidance, and the obvious alternative (search_advanced) is never mentioned. A few usage conditions are only implied by feature mentions — e.g. verify_claims for fact-checking, thread_url for follow-ups — but the agent has to infer them. No prerequisites (login state, API key requirement) are stated as guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.