Skip to main content
Glama

issue_credits

Issue (add) credits to a user; creates the user if they don't exist (email-first lookup). Pass idempotency_key on anything an agent might retry: a replay returns the original transaction with idempotent_replay: true and issues nothing more (no second webhook or mint). Without a key, every call issues again. For on-chain credit types with mint_on_issue, the response includes on_chain mint status. Costs 1 CRD (platform credit) per call, charged even when the call is then rejected (a 429 RATE_LIMITED costs nothing). Error results include request_id; quote it to support.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "user_id": "<user_id>",
      "credit_type_id": "<credit_type_id>",
      "amount": "<amount>"
    },
    "name": "issue_credits"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesCredits to issue (positive)
reasonNoReason, shown in the ledger
api_keyNoCred API key (optional if set via the x-api-key header)
user_idYesExternal user ID
user_nameNoDisplay name for a new user
project_idNoCred project ID (optional; the API key already identifies the project. Signed in with 1Profile and owning several projects, it picks one)
signup_urlNoApp/page URL a new user signed up from (first-touch attribution)
user_emailNoUser email (matched first, stored on a new user)
reference_idNoYour reference for tracking (not a dedupe key — use idempotency_key)
x402_paymentNoBase64 x402 PaymentPayload, only when a previous call failed with an x402 PaymentRequired because the account is out of CRD
credit_type_idYesCredit type to issue
wallet_addressNoEVM address to mint this issuance to, overriding the one on file (on-chain types only)
idempotency_keyNoUnique key for this issuance (max 255 chars). Retrying with the same key and same arguments returns the first result instead of repeating it; reusing it for different arguments fails with 409 IDEMPOTENCY_KEY_REUSED. Generate a fresh key (e.g. a UUID) per intended operation and reuse it only to retry that operation.
signup_credit_type_idNoCredit type the user signed up for (attribution)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / project_id / description
      Previous value: -"Cred project ID (optional; the API key already identifies the project)"New value: +"Cred project ID (optional; the API key already identifies the project. Signed in with 1Profile and owning several projects, it picks one)"
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: replay returns the original transaction with idempotent_replay: true and triggers no second webhook or mint; a call without a key issues again every time; the call costs 1 CRD even when later rejected, except a 429 RATE_LIMITED; and errors return a request_id to quote to support. These are non-obvious cost, side-effect, and retry traits an agent could not infer elsewhere.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four sentences, zero filler, and the core action plus its upsert behavior are front-loaded before the retry, on-chain, and billing details. Each subsequent sentence covers a distinct risk area (idempotency, mint behavior, cost, error handling) rather than restating the name.

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 14-parameter mutation with no annotations and no output schema, the description covers side effects, per-call cost, idempotency semantics, and error shape unusually well. It does not describe the general response payload beyond the on_chain and idempotent_replay fields, leaving some return-shape ambiguity.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description still adds intent-level meaning by framing idempotency_key as the retry primitive ("pass ... on anything an agent might retry") and by noting the consequence of omitting it. It mostly reinforces rather than extends the very detailed schema descriptions, so it lands just above baseline.

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 opens with a specific verb+resource ("Issue (add) credits to a user") and immediately qualifies scope with an upsert side effect ("creates the user if they don't exist (email-first lookup)"), which clearly separates it from deduction or purchase flows. It never names a sibling tool as the alternative, so it stops short of full differentiation.

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?

Provides concrete conditional guidance: pass idempotency_key "on anything an agent might retry," and use reference_id only for tracking, not dedupe. It does not state when to prefer this tool over alternatives such as deduct_credits or buy_credits_x402, so no exclusions are given at the tool-selection level.

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.

Resources