x402-gross-margin
Gross Margin: Computes gross margin as revenue minus cost of goods sold, divided by revenue, times 100 🆓 5 free trial calls per signed wallet
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cogs | No | ||
| revenue | No |
Gross Margin: Computes gross margin as revenue minus cost of goods sold, divided by revenue, times 100 🆓 5 free trial calls per signed wallet
| Name | Required | Description | Default |
|---|---|---|---|
| cogs | No | ||
| revenue | No |
Changes observed during successful MCP inspections.
Input schema / properties / cogs / descriptionRemoved value: -"Cogs to process"Input schema / properties / revenue / descriptionRemoved value: -"Revenue to process"Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It does disclose a non-schema behavior trait — '5 free trial calls per signed wallet' — which is genuinely extra context. However, it says nothing about return format, precision, or handling of invalid/zero revenue, so the disclosure is partial.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One front-loaded sentence that states the metric and the formula with no filler. The trailing emoji plus promotional trial note is slightly off-purpose but small.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a stateless two-input computation with no output schema and no annotations, the formula is the essential content and it is present. Missing pieces — that the result is a percentage (implied by 'times 100'), the expected input encoding as strings, and zero-revenue behavior — leave it only adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and neither parameter is documented in the schema, so the description must compensate. Writing out 'revenue minus cost of goods sold, divided by revenue' effectively defines the role of both inputs, which is real value, but it gives no guidance on expected types/units (both are strings) or edge cases like zero revenue.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Names the specific metric (gross margin) and gives the exact formula, so an agent immediately knows what is computed. It does not, however, differentiate itself from close siblings like x402-operating-margin, x402-profit-margin, or x402-margin-calc, which a router would need to disambiguate.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description states the formula but never says when to choose this tool over the many other margin/ratio siblings, nor what preconditions apply. The only ancillary guidance is the free-trial billing note, which is not invocation guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Add one secure layer between your agents and this server.