Skip to main content
Glama
itsablabla

perplexity-control-mcp

by itsablabla

estimate_cost

Calculate the USD cost of a Perplexity API request upfront, with a breakdown by input tokens, output tokens, and tool calls.

Instructions

Estimate the USD cost of a request before sending it. Returns a breakdown by input tokens, output tokens, and tool invocations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYesModel ID to estimate cost for (e.g. 'sonar', 'sonar-pro').
input_tokensYesNumber of input (prompt) tokens.
output_tokensNoNumber of output (completion) tokens.
tool_invocationsNoTool invocation counts (for models that bill per tool call).
Behavior4/5

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

With no annotations, the description carries the behavioral disclosure burden. It explicitly states that the tool estimates cost 'before sending', implying no request is executed, and describes the return breakdown. It does not cover potential limitations like pricing freshness, but the key safety-relevant behavior is communicated.

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 two sentences, front-loaded with the action and resource, and contains zero filler. Every word earns its place.

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?

There is no output schema, but the description covers the return structure ('breakdown by input tokens, output tokens, and tool invocations'), which is sufficient for a straightforward estimator. It could mention pricing source or assumptions, but these are not critical for correct invocation.

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 baseline is 3. The description echoes the parameters (input tokens, output tokens, tool invocations) but adds no new syntax, constraints, or format details beyond what the schema already provides.

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 uses a specific verb ('Estimate') and resource ('USD cost of a request'), clearly stating the tool's function. It distinguishes itself from sibling tools as the only cost estimation tool, with no ambiguity.

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

Usage Guidelines4/5

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

The phrase 'before sending it' provides clear usage context, indicating when to invoke this tool. However, it does not mention alternatives or explicitly state when not to use it, so it falls short of a full 5.

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/itsablabla/perplexity-control-mcp'

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