Skip to main content
Glama

get_model_pricing

Read-onlyIdempotent

Retrieve public pricing for a provider/model pair in USD cents per token, including cache, audio, image, fine-tuning metadata. Use this read-only lookup before setting pricing adjustments.

Instructions

Get Portkey's current public pricing configuration for one exact provider/model pair. Prices are returned in USD cents per token or provider-specific unit and may include cache, audio, image, fine-tuning, and calculation metadata. Use this read-only catalog lookup before setting integration pricing_adjustments or custom-model pricing; it does not return your negotiated integration multiplier or require Portkey authentication.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYesExact provider model identifier, such as gpt-4o
providerYesLowercase Portkey provider identifier, such as openai, anthropic, bedrock, or x-ai

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesWhether the tool call succeeded and returned structured data
dataNoStructured success payload when ok is true
errorNoStructured error payload when ok is false
Behavior5/5

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

Annotations already mark this as read-only, open-world, and idempotent. The description adds valuable context on return semantics (USD cents per token or provider-specific unit), the types of metadata included (cache, audio, image, fine-tuning, calculation), and the exclusion of negotiated pricing. This goes beyond the structured annotations and helps the agent set expectations.

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 three sentences long, front-loaded with the core purpose, and every sentence adds critical information. There is no redundancy or filler, making it easy for an agent to parse.

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?

Given the tool's simplicity (2 params, read-only, output schema present), the description provides complete context: what it returns, its units, content categories, what it excludes, and when to use it. The output schema covers return structure, so no further detail is needed.

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 does not add parameter-specific meaning beyond the schema, but it reinforces the 'exact pair' requirement. Since the schema already handles parameter semantics fully, this is sufficient.

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 states a specific verb and resource ('Get Portkey's current public pricing configuration') and clearly scopes it to one exact provider/model pair. This distinguishes it from any analytics tools or other pricing-related operations. The purpose is unambiguous and immediately understandably.

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 says when to use the tool ('before setting integration pricing_adjustments or custom-model pricing') and what it does not do ('does not return your negotiated integration multiplier or require Portkey authentication'). This gives clear usage boundaries and prevents misuse, even without naming alternative tools.

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/CodesWhat/portkey-admin-mcp'

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