Skip to main content
Glama

预估图片生成所需积分

estimate_credits

Estimate the credits required for generating an image based on provider, model, size, and aspect ratio. Returns a synchronous estimate without generating or deducting credits.

Instructions

根据 provider、模型、尺寸、宽高比等参数预估生成图片所需的积分。同步返回,不实际生成图片、不扣除积分。对应 POST /openapi/v1/images/generation/estimate-credits。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries the full burden. It discloses non-mutating behavior (no image generation, no credit deduction) and synchronous execution, along with the API endpoint. However, it omits error behavior, return format, and authentication requirements.

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 compact, consisting of two sentences. It front-loads the purpose, then states side effects and the corresponding endpoint, with no redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers core behavior and side effects, but the mismatch between the empty schema and the implied parameters creates ambiguity. It lacks details on return structure, error handling, and parameter passing, making it less complete for actual invocation.

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?

The input schema is empty, so the description is the only source of parameter information. It lists provider, model, size, and aspect ratio, but does not specify types, requiredness, or how these parameters are passed (e.g., in body or query). This partial information is helpful but incomplete.

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 estimates credits required for image generation using parameters like provider, model, size, and aspect ratio. It explicitly differentiates itself from sibling tools like generate_image by noting it does not actually generate images or deduct credits.

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 implicitly positions the tool as a pre-generation cost estimator by stating it returns synchronously and does not generate or deduct credits. It does not explicitly name alternatives or provide exclusion criteria, but the context makes the intended usage clear.

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/exoticknight/labnana-mcp'

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