Skip to main content
Glama

Margin per subscription plan

get_plan_margins
Read-onlyIdempotent

AI cost, revenue and margin of each plan or product over a period. Needs the app's key.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_plan_margins"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoHow many days back to look, counting today.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint=false, so the safety profile is fully covered. The description contributes one thing beyond that, the app-key prerequisite, which is genuinely useful context an agent would otherwise miss. It says nothing about the shape of the result, pagination, or what happens when the key is absent or invalid.

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?

Two short sentences with the purpose front-loaded and no wasted wording. The second sentence is terse to the point of ambiguity, however: 'the app's key' is not a declared parameter, so the reader cannot tell how it is supplied.

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?

For a single-parameter read tool with full schema coverage and complete annotations, most of the burden is already met by structured fields, and the description names the metrics returned. It still leaves the app-key prerequisite unexplained (source, format, failure mode) and gives no sense of the result's per-plan grouping or size, which matters for an aggregation tool with no output schema.

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%, and the single 'days' parameter already documents its default, minimum, maximum, and inclusive counting. The phrase 'over a period' merely restates that the window is configurable and adds no syntax or format detail. Baseline 3 is correct when the schema carries the parameter burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

It names the metrics returned (AI cost, revenue, margin), the unit of analysis (each plan or product), and the time window (over a period). That specificity separates it from get_margin_overview and list_users_by_margin without needing their schemas, though it never states the contrast explicitly.

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?

There is no when-to-use guidance and no mention of the sibling tools that report similar margin data at different granularities. The only condition given is the prerequisite "Needs the app's key," which is a requirement rather than routing guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.