Skip to main content
Glama
quequiere

perplexity-web-mcp

by quequiere

login

Authenticate with Perplexity.ai to enable web searches through browser automation. Opens a browser window for login if not already authenticated.

Instructions

Check if you are authenticated on Perplexity.ai. If not, opens a browser window so you can log in.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The 'login' tool is registered in src/index.ts. The execute handler uses `ensureAuthenticated` to manage the authentication flow.
    mcp.addTool({
      name: "login",
      description:
        "Check if you are authenticated on Perplexity.ai. If not, opens a browser window so you can log in.",
      parameters: z.object({}),
      execute: async () => {
        await ensureBrowser();
        const page = await getFirstPage();
        const authenticated = await checkSession(page);
        if (authenticated) {
          return "Already authenticated on Perplexity.ai.";
        }
        await ensureAuthenticated();
        return "Login successful. You are now authenticated on Perplexity.ai.";
      },
    });
  • The 'ensureAuthenticated' function orchestrates the login process, opening the browser and waiting for the session to become active.
    export async function ensureAuthenticated(): Promise<void> {
      await ensureBrowser();
      const page = await getFirstPage();
      await page.goto(PERPLEXITY_HOME, { waitUntil: "domcontentloaded" });
    
      const authenticated = await checkSession(page);
      if (authenticated) {
        log("Session active.");
        return;
      }
    
      log("No active session. Please log in to Perplexity in the browser window...");
      await waitForLogin(page);
      log("Login detected.");
    }
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly describes the tool's two-phase behavior: checking authentication status and potentially opening a browser for login. However, it doesn't specify what happens after login (e.g., whether it returns authentication status, waits for completion, or handles errors).

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

Conciseness5/5

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

The description is perfectly concise with two clear sentences that each earn their place. The first sentence states the primary check, the second explains the fallback action. No wasted words, front-loaded with the main purpose.

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 zero-parameter authentication tool with no output schema, the description provides good context about what the tool does. However, it doesn't specify what information is returned (e.g., authentication status, success/failure indicators) or error handling, leaving some ambiguity about the complete interaction.

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

Parameters4/5

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

The tool has 0 parameters with 100% schema description coverage. The description appropriately doesn't discuss parameters since none exist. It earns a 4 rather than 5 because it could theoretically mention that no parameters are needed, but this is a minor omission given the zero-parameter context.

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?

The description clearly states the tool's purpose with specific verbs ('check' and 'opens') and resources ('authenticated on Perplexity.ai', 'browser window'). It distinguishes itself from sibling tools (search/search_advanced) by focusing on authentication rather than search functionality.

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?

The description explicitly states when to use this tool: 'Check if you are authenticated... If not, opens a browser window so you can log in.' It provides clear context about authentication status checking and login initiation, with no misleading guidance about alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/quequiere/perplexity-web-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server