Skip to main content
Glama

get_model_pricing

Read-onlyIdempotent

Look up Portkey pricing for one provider-model pair before setting integration adjustments or custom-model pricing. Returns USD token/unit rates plus cache, audio, image, and fine-tuning metadata.

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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "provider": "<provider>",
      "model": "<model>"
    },
    "name": "get_model_pricing"
  }
}

Input Schema

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

Output 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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.0.9
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Added

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (readOnly/idempotent/non-destructive/openWorld), the description discloses the price units (USD cents per token or provider-specific unit), the breadth of returned metadata (cache, audio, image, fine-tuning, calculation), and that no Portkey authentication is required. That is substantive behavioral context annotations cannot convey.

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?

Two tight sentences with no filler; the core purpose and scope come first, followed by units and the usage/boundary caveat. Every clause carries information an agent would act on.

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?

With only two required, fully documented params and an output schema already present, the description covers everything needed: purpose, exact-match requirement, units, response breadth, and authentication posture. Nothing material is missing for a correct invocation.

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?

Schema coverage is 100%, so the baseline is 3; the description adds real meaning by emphasizing 'one exact provider/model pair', signalling that no wildcards or fuzzy matching are accepted. It doesn't add format/syntax detail beyond the schema examples.

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?

States a specific verb ('Get'), a specific resource ('Portkey's current public pricing configuration'), and the exact scope ('one exact provider/model pair'). This is clearly distinguishable from sibling analytics tools like get_cost_analytics, which report spend rather than catalog prices.

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?

Gives an explicit use case ('use this read-only catalog lookup before setting integration pricing_adjustments or custom-model pricing') and a boundary ('does not return your negotiated integration multiplier'), which tells the agent what this is not for. It stops short of naming an alternative sibling tool for the negotiated-multiplier case, so it isn't a full 5.

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

Deploy Server

Other Tools