Skip to main content
Glama

estimate_cost

Read-only

Calculate the token cost of sending a local video to Gemini before upload, using ffprobe duration or file size fallback to avoid surprises.

Instructions

估算把某个本地视频交给 Gemini 识别大概要花多少输入 token,让你发大视频前心里有数。

优先用 ffprobe 读真实时长;读不到(没装 ffprobe / 格式怪)则按文件大小粗估并注明。

Args: path: 本地视频文件路径。

Returns: 一段中文预估说明(文件大小、时长、标清/低清 token 估算、上传通道)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
Behavior5/5

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

The description discloses the estimation method (prefer ffprobe, fallback to file-size estimate) and notes that approximations are marked. The readOnlyHint annotation is consistent, and the description adds meaningful behavioral context beyond the annotation without contradiction.

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 concise and well-structured: a clear purpose statement, a method note, and structured Args/Returns sections. Every sentence adds value, and it is appropriately front-loaded.

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?

For a tool with one parameter and no output schema, the description is complete. It explains the input, the estimation logic, and the return value format, ensuring an agent can invoke it correctly without additional context.

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?

With schema description coverage at 0%, the description compensates by explaining that 'path' is a local video file path. While minimal, it clarifies the only parameter's role and local nature, which is sufficient for a single-param tool.

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: estimating input token costs for sending a local video to Gemini. It uses a specific verb ('估算') and resource ('本地视频'), and is distinct from sibling tools like describe_video or get_upload_url.

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 description provides clear context for when to use the tool ('让你发大视频前心里有数'), indicating it's for pre-upload cost estimation. It does not explicitly mention alternatives or when not to use, but the context is sufficient to differentiate from siblings.

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/SolenmeChiara/Gemini_Video_MCP'

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