MCP server for Perplexity Chat Completions API with optimized performance via internal streaming
Single tool 'perplexity-completions' with well-structured schema and reasonable descriptions. Schema is complete with proper type definitions, enums, and constraints. Descriptions are present but could be more LLM-optimized. The tool combines multiple responsibilities (search modes, model selection, streaming) which ideally would be separated, but acceptable for a wrapper around a single API. No error handling guidance visible in the schema or documentation. Output schema (ChatCompletionResponse, SearchResult) is typed in code but not documented in the tool definition itself, LLMs cannot see this and must infer output structure. Parameters are well-constrained with enums and min/max, but some descriptions lack actionable detail (e.g., 'reasoning_effort' is described but not tied to when it applies, only 'sonar-deep-research' model). Missing tool annotations (readOnlyHint, destructiveHint, idempotentHint) despite read-only nature being explicit.
Performs AI-powered web search using the Perplexity Chat Completions API. Returns AI-generated answers with real-time web search, citations, and sources. Uses internal streaming from Perplexity for fast TTFT, returns complete response to client.
Output schema not documented in tool definition. Code defines ChatCompletionResponse, SearchResult, Usage types, but tool registration does not expose these to LLM. LLMs cannot see what fields to expect (id, model, choices, search_results, usage) and must infer, risking missed fields in downstream reasoning.
Parameter 'reasoning_effort' has enum [low, medium, high] but no constraint in schema documenting that it only applies to 'sonar-deep-research' model. Undocumented conditional dependency will cause LLMs to pass it with incompatible models, triggering API errors.
Missing tool annotations despite tool being explicitly read-only (no state modification). The 'readOnlyHint' annotation is not present in the tool definition, preventing the agent from optimizing (e.g., allowing safe multi-threading, caching, or retry strategies).
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | C | 66 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 0 | - | v1 |
No error handling documentation. Tool implementation includes retry logic and HTTP error handling (RETRYABLE_STATUS, exponential backoff), but this guidance is not exposed to the LLM. No description of what errors the tool might return or how to recover.
Parameter descriptions lack actionable constraints. E.g., 'max_tokens' says 'default: 1024, max: 2048 for cost control' but doesn't explain when to use high vs low values or how token limits affect response quality. 'search_context_size' maps to implementation detail ('fewer sources') rather than user intent.
Tool combines multiple concerns: search mode selection (web/academic/sec), model selection (sonar/sonar-pro/etc.), recency filtering, and reasoning effort. Ideally split into focused tools (e.g., search_web, search_academic, search_regulatory), but acceptable for a single API wrapper given Perplexity's unified endpoint.