Skip to main content
Glama

ck_cost_optimizer

Get cost optimization suggestions or compare AI model prices for your task. Analyze recent spending patterns or evaluate providers/models side-by-side.

Instructions

Get cost optimization suggestions or compare AI provider/model prices for a task. Read-only — no budget records are written (use ck_budget to record actual spend). Two modes: suggest returns optimization tips based on recent session spending patterns; compare returns a side-by-side price breakdown for the given task. For suggest mode, pass session_id. For compare mode, pass task_description and estimated_tokens along with top_provider and top_model as the baseline. Use ck_cost_optimizer before choosing a model for expensive multi-agent work; use ck_budget to record and enforce spend limits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
estimated_tokensNo
modeYesOperation mode that determines the tool behavior and return shape.
session_idNoUnique session identifier for correlating findings, proofs, budget, and audit trail.
spendingNo
task_descriptionNoTask description for cost estimation.
top_modelNoPrimary model for cost comparison.
top_providerNoPrimary provider for cost comparison.
Behavior4/5

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

Despite no annotations, the description declares read-only behavior ('no budget records are written'), which is a critical behavioral trait. It also outlines the two operational modes and their differing outputs, but does not detail return structure or limits.

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

Conciseness4/5

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

The description is front-loaded with purpose and mode overview, then details parameter usage. It is efficient for the complexity, though slightly verbose with redundancy (e.g., repeating mode conditions).

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?

Given the complexity (7 params, 2 modes) and lack of output schema, the description provides sufficient context for an AI agent to select and invoke the tool correctly. It covers entry points, mode selection, and key parameter relationships.

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 coverage is 71% (5 of 7 parameters described in schema). The description adds contextual meaning by associating parameters with modes (session_id for suggest, task_description/estimated_tokens/top_provider/top_model for compare), but does not explain the 'spending' parameter which remains undocumented.

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?

Clearly states two modes (suggestions/compare) and distinguishes from sibling ck_budget with specific verb+resource. The description immediately clarifies what the tool does.

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?

Explicitly provides when-to-use (before expensive multi-agent work) and when-not-to-use (use ck_budget for recording spend). Names the alternative tool and specifies mode-specific parameter requirements.

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/aryaminus/controlkeel'

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