Skip to main content
Glama

estimate_cost

Estimate the token and dollar cost before generating a skill from a YouTube video, article, PDF, or image. Compare options to set expectations and avoid unexpected charges.

Instructions

Estimate the token + dollar cost of generating a skill from a given source, without running the pipeline.

Heuristic-based at v1 — accuracy improves once the API exposes a real /api/v1/skills/estimate endpoint. Use to set caller expectations or to compare options ("a 60-min YouTube vs. a single article") before a paid generation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
source_urlNoOptional. Used to infer source_kind when source_kind is omitted (youtube.com/youtu.be → youtube, .pdf → pdf, image extensions → image, else article).
source_kindNoOptional. Override inference by passing one of "youtube", "article", "pdf", or "image".

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries full burden. It transparently states the tool is heuristic-based at v1 and accuracy will improve with a real endpoint. It does not disclose any rate limits or error behavior, but adequately conveys the non-destructive, estimation-only nature.

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 three sentences with no wasted words. It is front-loaded with the main purpose, followed by contextual caveats and usage guidance. Every sentence earns its place.

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 tool has an output schema (not shown but mentioned), the description does not need to detail return values. It covers purpose, limitations, and usage context. It could mention potential error cases or source size dependencies, but is otherwise sufficiently complete for an AI agent.

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 description coverage is 100%, so baseline is 3. The description does not add additional meaning beyond the schema; it mentions 'Optional' but that is already in the schema. No further enrichment of parameter semantics is provided.

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 that the tool estimates token and dollar cost of generating a skill from a source without running the pipeline. It distinguishes itself from the sibling 'generate_skills' by specifying it is a dry-run estimation, and provides specific use cases like comparing different sources.

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?

The description explicitly instructs when to use the tool: to set caller expectations or compare options before a paid generation. It also implicitly indicates when not to use (actual generation) by referencing 'without running the pipeline' and suggesting 'generate_skills' as an alternative.

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/kopias/loreto-mcp'

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