Skip to main content
Glama

Users by margin, worst first

list_users_by_margin
Read-onlyIdempotent

Each user's AI cost, revenue and margin over a period, the users losing the most money first. 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": "list_users_by_margin"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoHow many days back to look, counting today.
limitNo
losingOnlyNoOnly users whose AI cost is above their revenue.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

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

The annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint=false, so the safety profile is fully covered. The description adds a real prerequisite (the app's key) and the default ordering, but says nothing about result size, defaults, or pagination behavior for large user sets. Against this annotation coverage, that is adequate but not rich.

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, front-loaded with what the tool returns and the sort order, with the prerequisite trailing. No filler or repetition of the title; the only mild weakness is that 'the app's key' is terse to the point of ambiguity.

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?

For a three-parameter, read-only, no-output-schema tool, the definition covers what is returned (cost, revenue, margin per user), the window semantics, the ordering, and an auth prerequisite. It omits what 'limit' does and what the app key is, but nothing else needed to invoke it correctly is missing.

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 coverage is 67%: 'days' and 'losingOnly' are self-documented in the schema, but 'limit' has no description anywhere. The description's phrase 'over a period' loosely maps to 'days' and 'losing the most money first' adds ordering meaning not present in the schema, but it does not compensate for the undocumented 'limit' parameter. Baseline 3 applies.

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?

The description states a specific resource set (each user's AI cost, revenue, and margin) and an explicit sort order ('users losing the most money first'), which clearly separates it from an aggregate view like get_margin_overview or a plan-level view. It stops short of naming any sibling, so the differentiation is inferred rather than asserted.

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

Usage Guidelines3/5

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

Usage is implied by the framing ('users losing the most money first') and one prerequisite is stated ('Needs the app's key'). There is no explicit when-to-use versus when-to-prefer-an-alternative guidance, and no exclusion such as a note about when the aggregate overview is a better fit.

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.