Skip to main content
Glama

margin_calc

Calculate profit margin percentage and markup between cost and revenue to assess profitability.

Instructions

Calculate profit margin percentage and markup from cost and revenue.

Parameters:
    cost — Cost of goods sold.
    revenue — Total revenue.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
costYes
revenueYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries full burden. It correctly implies a safe read-only calculation, but does not disclose edge cases, precision, or the fact that it returns both margin and markup. The behavior is adequately implied for a simple calculator.

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 short and front-loaded with the purpose, followed by parameter descriptions. It wastes no words, but the parameter list format is minimal and lacks explanations for potential questions (e.g., currency, units).

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?

While the tool is simple, the description does not specify the return format (e.g., returns object with margin and markup percentages). An output schema exists but is not shown, and the description does not compensate. Given the simplicity, the gap is moderate.

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?

Schema has 0% description coverage, but the description adds meaning: 'cost — Cost of goods sold' and 'revenue — Total revenue'. This goes beyond the schema titles, clarifying the domain context. However, the schema titles are already fairly clear, so the added value is moderate.

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 it calculates 'profit margin percentage and markup' from 'cost and revenue', using specific verbs and resources. This distinguishes it from sibling tools like 'markup_calc' and 'percentage_calculator'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, nor does it mention prerequisites or exclusions. For example, it doesn't indicate whether it handles negative costs or revenues.

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/scotia1973-bot/api-hub'

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