Skip to main content
Glama
ClockNext

ClockNext MCP Server

Official
by ClockNext

ClockNext: record usage

clocknext_record_usage

Record a single usage event with token-based billing. Uses idempotency keys so retries don't duplicate charges, and returns the resulting usage log.

Instructions

Record ONE real usage signal — it is metered and billed. Prices the tokens against the model and the customer's plan and returns the resulting usage log. Pass an idempotencyKey to make retries safe (a repeat with the same key returns the original result instead of double-recording). For a no-op preflight, use clocknext_verify_signal instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesWhich meter to record against: 'wallet' debits USD at the model's cost; 'credit' draws down a named credit; 'outcome' advances one step of a workflow.
modelYesCatalog model id (e.g. 'gpt-4o'), matched case-insensitively. Use clocknext_list_models to see valid ids.
memberNoOptional customer-member email to attribute the usage to.
agentKeyNoRequired for type 'credit' (the credit's agent key) or 'outcome' (the outcome step's agent key). Ignored for 'wallet'.
customerIdYesThe ClockNext customer id (e.g. cus_…) this usage belongs to.
cacheTokensNoCached (prompt-cache) tokens; defaults to 0 when omitted.
inputTokensYesPrompt tokens for this call.
outputTokensYesCompletion tokens for this call.
idempotencyKeyNoOptional dedup key. Reuse the SAME key across retries of one logical event so a lost response can't double-record it.
Behavior4/5

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

Annotations provide openWorldHint=true and idempotentHint=false, but the description adds important context: the operation is metered and billed, it prices tokens against the plan, and it returns the resulting usage log. It also clarifies the idempotency behavior when using idempotencyKey (repeat returns original result), which goes beyond the bare hint. Minor omissions like auth requirements are not disclosed, but the financial and retry behavior is well covered.

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?

The description is three sentences, front-loaded with the most critical warning (metered and billed), then explains the pricing/return behavior, then provides retry guidance and an alternative. Every sentence carries essential information with no filler or redundancy.

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?

Given nine parameters, no output schema, and only two annotations, the description covers the key contextual aspects: the financial consequence, the return value (usage log), idempotency behavior, and a clear alternative tool. It does not describe error scenarios or the structure of the returned usage log, but for the agent's selection and invocation needs it is largely sufficient. A 5 would require more detail about failure modes or output shape.

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 adds value beyond the schema by explaining the overall pricing behavior and specifically the semantics of idempotencyKey: reusing the same key across retries prevents double-recording and returns the original result. This enriches the parameter understanding even though individual parameter descriptions are already exhaustive in the schema.

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 opens with a specific verb and resource: 'Record ONE real usage signal — it is metered and billed.' It clearly distinguishes the tool from the sibling clocknext_verify_signal by contrasting a real metered record with a no-op preflight, and it states what the tool does (prices tokens, returns a usage log). This is precise and unambiguous.

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

Usage Guidelines5/5

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

The description explicitly tells the agent when to use this tool versus the alternative: 'For a no-op preflight, use clocknext_verify_signal instead.' It also sets expectations that this action is metered and billed, implying it should be used only for actual usage recording, and gives clear guidance about retries with idempotencyKey. This exceeds the baseline with a direct exclusion.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ClockNext/clocknext-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server