Skip to main content
Glama
jacob-bd

Perplexity Web MCP

by jacob-bd

pplx_smart_query

Run quota-aware Perplexity queries: checks usage limits, routes to the lowest sufficient model, and returns sourced answers with model and quota metadata.

Instructions

RECOMMENDED DEFAULT TOOL. Quota-aware query — checks limits and picks the best model automatically.

USE THIS FOR EVERY QUERY unless the user explicitly requests a specific model. Default to intent='quick' for most lookups — it routes to Sonar 2 when appropriate. Only escalate intent when the question genuinely requires it.

Intent guide (choose the LOWEST sufficient level):

  • quick: Facts, definitions, simple lookups, 'what is X' → Sonar 2 (check pplx_usage)

  • standard: How-to, comparisons, explanations needing web sources → 1 Pro Search

  • detailed: Complex multi-source analysis, technical deep-dives → 1 Pro Search (premium model)

  • research: Comprehensive report → 1 Deep Research (scarce monthly quota, user must request)

Response includes a metadata block showing the model used, routing reason, and current quota snapshot.

Args: query: The question to ask intent: Query complexity — quick (default for most), standard, detailed, research source_focus: Source type — none (model only, no search), web, academic, social, finance, all, or connector source ID from pplx_connectors(). Omit it to use your saved default (set with pwm config), then web. conversation_id: Pass the ID from a previous response to continue that thread files: Local file paths to attach (PDF or image). On Free-tier accounts an attachment can make the query count as a Pro Search.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesNo
queryYes
intentNostandard
source_focusNo
conversation_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.16.0
    • addedInput schema / properties / files
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / source_focus / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / source_focus / default
      Previous value: -"web"New value: +null
    • removedInput schema / properties / source_focus / type
      Removed value: -"string"
  2. First observedv0.14.0

TDQS

A4.7/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden, and it does disclose notable behavior: automatic quota checks and model selection, a response metadata block with model/routing reason/quota snapshot, and a tier-dependent side effect ('On Free-tier accounts an attachment can make the query count as a Pro Search'). Minor inconsistency: it instructs 'Default to intent=quick' while the schema default is 'standard', which adds a small amount of ambiguity about actual default behavior.

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

Conciseness4/5

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

Front-loaded and sectioned with a clear intent guide, and the argument list is scannable. There is some redundancy ('RECOMMENDED DEFAULT TOOL' / 'USE THIS FOR EVERY QUERY' / 'default for most' repeat the same point), so it is slightly longer than strictly necessary, but every section still earns its place.

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

Completeness5/5

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

For a 5-parameter routing tool with an output schema (so return values need no explanation), the definition covers the gaps that matter: routing policy, quota scarcity per intent level, enum semantics for the two string params, conversation continuation, and tier side effects. Nothing an agent needs to invoke it correctly is missing.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate and does: it documents all five parameters including enum values absent from the schema (intent: quick/standard/detailed/research with routing targets; source_focus: none/web/academic/social/finance/all/connector IDs), the default-resolution chain for source_focus ('omit it to use your saved default, then web'), conversation_id threading behavior, and accepted file types plus tier consequences.

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

Purpose5/5

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

Opens with a specific verb+resource framing ('Quota-aware query — checks limits and picks the best model automatically') and explicitly positions itself as the default against the many model-specific siblings ('RECOMMENDED DEFAULT TOOL', 'USE THIS FOR EVERY QUERY unless the user explicitly requests a specific model'). An agent can distinguish this from pplx_query, pplx_sonar, or pplx_claude_opus without opening any schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use ('USE THIS FOR EVERY QUERY unless the user explicitly requests a specific model'), when-to-escalate ('Only escalate intent when the question genuinely requires it'), and a per-level intent guide tied to concrete question types. The 'choose the LOWEST sufficient level' rule and the 'user must request' gate on research are exactly the routing guidance an agent needs.

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