Skip to content

Integration request: native Perplexity Search tool (parity with Exa and Tavily) #18

@jliounis

Description

@jliounis

Integration request: native Perplexity Search tool

Toolhouse currently lists Perplexity only as a BYOK MCP server (app.toolhouse.ai/mcp-servers/perplexity_byok), while comparable web-search providers (Exa, Tavily) are available as native pre-built Tool Store tools. This asymmetry forces users who want Perplexity Search to configure an external MCP server and bring their own infrastructure, when the rest of the Tool Store handles the same shape of integration first-party.

I'd like to request a native perplexity_search tool, in parity with the existing Exa and Tavily tools.

Why a native tool

  • Parity with peer providers. Exa and Tavily are first-party — Perplexity should be too. They're the same category (web search APIs that return structured results).
  • Simpler UX. A single API key in the Toolhouse user's vault, no separate MCP server to host.
  • Better LLM tool-call ergonomics. A purpose-built JSON schema (with domain/recency filters surfaced as parameters) gives the calling model better signal than a generic MCP passthrough.
  • The BYOK MCP listing remains useful for power users who want the full MCP surface, but most users want the simple search tool.

Proposed tool spec

Tool identity

  • Name: perplexity_search
  • Category: Web search (alongside exa_search, tavily_search)
  • Description (user-facing, factual — no Sonar references):

    Search the web using Perplexity's Search API. Returns ranked results with title, URL, snippet, and date. Supports domain filters and date/recency filters.

Auth

Input schema

{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "The search query."
    },
    "max_results": {
      "type": "integer",
      "description": "Maximum number of results to return.",
      "default": 5,
      "minimum": 1,
      "maximum": 20
    },
    "search_domain_filter": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Optional list of domains to allow OR deny. Prefix with '-' to deny (e.g. '-pinterest.com'). Do not mix allow and deny in the same call."
    },
    "search_recency_filter": {
      "type": "string",
      "enum": ["hour", "day", "week", "month", "year"],
      "description": "Restrict results to content published within this window."
    },
    "search_after_date_filter": {
      "type": "string",
      "description": "Only include results after this date (m/d/yyyy)."
    },
    "search_before_date_filter": {
      "type": "string",
      "description": "Only include results before this date (m/d/yyyy)."
    }
  },
  "required": ["query"]
}

Backend request

POST https://api.perplexity.ai/search
Authorization: Bearer $PERPLEXITY_API_KEY
Content-Type: application/json

{
  "query": "<query>",
  "max_results": 5,
  "search_domain_filter": ["nytimes.com", "-pinterest.com"],
  "search_recency_filter": "month",
  "search_after_date_filter": "1/1/2025",
  "search_before_date_filter": "12/31/2025"
}

Optional Python SDK alternative:

from perplexity import Perplexity
client = Perplexity()  # reads PERPLEXITY_API_KEY
res = client.search.create(
    query=query,
    max_results=max_results,
    search_domain_filter=search_domain_filter,
    search_recency_filter=search_recency_filter,
)

Output

Return the structured results array from the response. Each item has:

  • title — page title
  • url — canonical URL
  • snippet — short text excerpt
  • date — publication date (optional)
{
  "results": [
    { "title": "...", "url": "...", "snippet": "...", "date": "..." }
  ]
}

Implementation notes

  • Honor the configurable max_results — do not hardcode (default 5, allow up to 20).
  • Do not mix allowlist and denylist domains in search_domain_filter. Use the -domain.com prefix for negation.
  • Surface domain filter, recency filter, and date filters in the tool schema so the LLM can pass them through.
  • Tool description should reference "Perplexity Search API" — avoid mentioning Sonar models, since Sonar is the chat-completions product, not the search product.

Reference docs

Why I'm filing this on toolhouse-sdk-python

The Tool Store implementations (Exa, Tavily, etc.) appear to live in Toolhouse's closed-source backend — they aren't present in any of the public org repos (toolhouse-sdk-python, toolhouse-sdk-typescript, toolhouse-mcp, mcp-distributed), all of which are thin clients that fetch tool definitions from api.toolhouse.ai. Since there's no public tools repo to PR against, I'm filing this here as the canonical public issue tracker for the platform. Happy to move it if there's a better home.

Follow-ups (separate, if useful)

Once perplexity_search lands, two natural extensions exist (worth their own issues, not blockers here):

  • perplexity_agent — wraps POST /v1/agent for deeper multi-step research.
  • perplexity_embeddings — wraps POST /v1/embeddings (pplx-embed-v1-4b) for retrieval pipelines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions