Skip to main content
Glama

get_credits_spend_by_product

Read-only

Read-only: credits spent per product over a date window, as { points: [{ date, isoDate, products: [{ product, value }] }] } — one point per time bucket (daily, weekly, monthly or quarterly by window length), zero-filled. Use it for 'where did my credits go' and 'how much did enrichment cost this week'. since (ISO 8601 date-time, e.g. 2026-11-01T00:00:00Z; periodStartDate from get_credits_usage is in this form) is optional: omit it for all-time spend. to (ISO 8601 date-time) defaults to now; timezone (IANA, default UTC) sets the calendar days. memberIds (team members' 24-hex user ids: userId in list_team_members, or userInfo._id from get_user_info for the user's own) narrows to those people; omit it for the whole account, which for a team member is the whole team (pass their own user id for their own spend). An id that is not the user id of someone currently on the user's team fails with TEAM_MEMBER_NOT_IN_SCOPE. Product labels are credit history's, except that Contact Enrichment is reported as Email Enrichment and Phone Enrichment.

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

Input Schema

NameRequiredDescriptionDefault
toNo
sinceNo
timezoneNoUTC
memberIdsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, but the description adds substantial context beyond them: zero-filled buckets, bucket granularity determined by window length (daily/weekly/monthly/quarterly), team-scope aggregation when memberIds is omitted, a specific error (TEAM_MEMBER_NOT_IN_SCOPE), and product-label exceptions (Contact Enrichment reported as Email and Phone Enrichment).

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 front-loaded with the output shape and practical use cases, and every sentence carries information. It is dense and somewhat long, but the density is justified by the amount of parameter and behavioral detail rather than padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description appropriately documents the return structure in detail. Combined with parameter semantics, aggregation scope, error behavior, and label caveats, it gives an agent everything needed to call the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry parameter meaning and it does: `since` is optional and ISO 8601 with an all-time fallback, `to` defaults to now, `timezone` is IANA and defaults to UTC, and `memberIds` requires 24-hex team-member user ids with guidance on obtaining them from list_team_members or get_user_info. It also explains the scope semantics of omitting memberIds.

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 names a specific verb and resource ("credits spent per product over a date window") and immediately gives the exact return shape. It distinguishes itself from get_credits_usage by noting that get_credits_usage's periodStartDate is a compatible input, implying this tool aggregates a different dimension.

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?

It gives concrete when-to-use examples ("where did my credits go" and "how much did enrichment cost this week") and explains the key alternative: omit `since` for all-time versus supply it for a window. It does not explicitly state when to prefer this tool over get_credits_usage, but the examples and sibling reference make the distinction inferable.

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.