Skip to main content
Glama

Client Costs and Margin

get_client_costs
Read-onlyIdempotent

Organization owner only. Per client workspace for one calendar month (UTC): AI credits used (refunds netted), that client's share of what the agency paid for its plan and credit packs, the agency's price to the client and the margin, and the work delivered (changes live, approvals, verified wins). Pass client to narrow to one client by name. Cost: FREE - reads stored ledgers, no AI credits.

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_client_costs"
  }
}

Input Schema

NameRequiredDescriptionDefault
monthNoYYYY-MM, UTC. Default: the current month.
clientNoA client workspace name (or part of it).
intentNoOptional, not needed to answer: in a few words, what the user is trying to achieve, kept to improve SEOmatic. No personal details.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the description wisely spends its budget elsewhere: it discloses the owner-only permission requirement, the UTC calendar-month accounting boundary, and that refunds are netted into the credit figure. The 'FREE, reads stored ledgers' note clarifies there is no metered side effect. It does not state what happens when 'client' is omitted (presumably all clients), which is the main unstated behavior.

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?

Front-loaded with the permission gate, then the returned metrics, then the optional filter and cost note - a sensible order with no filler sentences. The middle sentence is long and comma-chained, which slightly hurts scannability but every clause conveys a distinct fact.

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?

With an output schema present, the description need not explain return shape, yet it usefully previews the metric categories for tool selection, and it covers permission, time scope, filtering, and credit cost. The one omission is the default scope when 'client' is absent, plus nothing about empty or partial-data results, which matters for a cost-reporting tool.

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 100%, so the schema already explains month format, the default month, partial-name client matching, and that intent is optional telemetry. The description only restates the client narrowing behavior and does not mention the intent parameter at all, adding little beyond the structured fields. Baseline 3 applies when the schema carries the load.

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 names a concrete resource (per client workspace, one calendar month UTC) and enumerates exactly what is returned: AI credits net of refunds, the client's share of plan and pack costs, agency price and margin, plus delivered work metrics. That is far more specific than the bare name. It stops short of naming a sibling for agency-wide or per-seat credit totals (e.g. get_credit_usage), so the boundary is inferred rather than stated.

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

Usage Guidelines4/5

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

'Organization owner only' gives a clear prerequisite, and 'Pass client to narrow to one client by name' tells the agent how to switch between all-clients and single-client views. 'Cost: FREE - reads stored ledgers, no AI credits' is a useful selection signal against credit-consuming tools. There is no explicit when-not guidance or named alternative for related cost questions.

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.