Skip to main content
Glama

calculate_video_translation_quota

Estimate video translation quota before submission using real duration (ms) to avoid inaccurate budgets. No charge; warns if video exceeds plan limits or balance is insufficient.

Instructions

试算视频翻译要消耗多少额度,不扣费。提交 translate_video 前应当先调这个并把结果告诉用户。video_duration 必须是从文件里真实读出来的时长(ffprobe 等),不能按文件大小猜——服务端核实不了这个输入,猜错就等于给用户报了个假预算。计费规则:按 30 秒为一个计费单位向上取整,每单位 4 额度;voice_role 为 clone 且 subtitle_type≠0 时额度翻倍(实测 10 分钟视频:不配音 80 额度,开克隆配音 160 额度)。返回里如果带 limitWarning(视频超出会员档的时长上限)或 quotaWarning(余额不够),请先把那句话原样告诉用户再往下走——这两种情况提交上去会被服务端直接拒,白传一次文件。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
voice_roleNo配音开关,只有两个取值:No=不配音、只做字幕翻译(默认,与产品前端一致);clone=克隆原说话人音色做配音。clone 且 subtitle_type≠0 时**额度翻倍**——10 分钟视频 80 额度会变成 160,所以要不要配音必须先问用户,不要替他决定。服务端对本字段只校验非空,填其他值不会报错但会白扣额度,不要传这两个之外的值。
subtitle_typeNo0=不嵌入字幕, 1=翻译字幕(默认), 2=原始字幕, 3=翻译+原始字幕
video_durationYes视频时长,单位是**毫秒**(不是秒)。例如 2 分 5 秒要传 125000,传成秒会让试算额度远低于实际扣费。必须是文件的真实时长:用 ffprobe(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 <文件>,得到的是秒,乘 1000)或其他媒体信息工具读出来。严禁按文件大小估算——码率差异极大,实测有把 21 秒的 4.8MB 视频猜成 5 分钟的,报给用户的预算因此差了十倍。读不到真实时长就别试算,先告诉用户你读不到。

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: it states '不扣费' (no charge), warns that the server can't verify video_duration, notes that invalid voice_role values '不会报错但会白扣额度', and explains the consequences of warnings (server rejection).

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 long but front-loaded: the first sentence states purpose and side effects, followed by billing rules and warnings. The ffprobe command, concrete examples, and repeated doubling warning each serve a necessary safety purpose, so no sentence feels wasted.

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?

The description thoroughly covers input semantics, billing rules, and warning fields, but because there is no output schema, it does not name the normal return field containing the calculated quota. It mentions limitWarning and quotaWarning explicitly, so the gap is minor but real for an agent needing to read the primary result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Every parameter has rich semantic detail beyond the schema: voice_role enumerates valid values and the doubling rule, subtitle_type lists all mappings, and video_duration specifies milliseconds, gives an ffprobe command, and explicitly forbids file-size estimation. Schema coverage is 100% and the description adds substantial operational value.

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 opens by stating the tool's exact function: '试算视频翻译要消耗多少额度,不扣费' (calculate video translation quota, no deduction). It also explicitly ties it to the workflow before '提交 translate_video 前应当先调这个', clearly distinguishing it from siblings like calculate_rewrite_quota.

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?

It gives explicit when-to-use guidance: call before submitting translate_video and tell the user the result. It also provides a concrete condition for not calling ('读不到真实时长就别试算') and instructs how to handle limitWarning/quotaWarning before proceeding.

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

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/zhang452064326/belindoc-mcp'

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