Skip to main content
Glama

Lago MCP by usefulapi

Create usage event

lago_create_event
Destructive

Records a usage/metering event in Lago. This WILL be counted toward the customer's usage and affects billing. Idempotent via transaction_id. Lago API: POST /events with body { "event": { ... } }.

Input Schema

NameRequiredDescriptionDefault
codeYesThe billable metric code this event targets (required).
timestampNoUnix timestamp in seconds (or ISO); defaults to event reception time.
propertiesNoAdditional event properties used to compute the fee (required for sum/max/unique aggregations).
transaction_idYesUnique identifier for the event — the idempotency key (required).
external_subscription_idYesThe subscription external id to link the event to (required).
precise_total_amount_centsNoPrecise total amount in cents, used by the dynamic pricing model.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / properties / properties / additionalProperties / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  }
      -]
    • addedInput schema / properties / properties / additionalProperties / type
      Added value: +[
      +  "string",
      +  "number"
      +]
    • removedInput schema / properties / timestamp / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  }
      -]
    • addedInput schema / properties / timestamp / type
      Added value: +[
      +  "string",
      +  "number"
      +]
  2. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only declare destructiveHint=true; the description adds real behavioral context beyond that — that the event is billed, and crucially that it is idempotent via transaction_id, which governs safe retries. It stops short of auth/rate-limit details but covers the key operational traits.

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?

Three short sentences, front-loaded with the verb and the billing impact, followed by idempotency. The API endpoint/body note is marginally redundant but harmless; overall tight and well-ordered.

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 mutation tool with no output schema and full schema coverage, the description supplies the missing operational context: billing impact and idempotency. Only auth requirements and response expectations are unaddressed, which is acceptable here.

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 description coverage is 100%, so all six parameters are already documented, including the transaction_id idempotency key. The description adds nothing parameter-specific beyond what the schema provides, so the baseline of 3 applies.

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?

States a specific verb ('Records') and resource ('usage/metering event in Lago'), and the concept is unambiguous. It is trivially distinguishable from the read/list/analytics siblings, so no confusion is possible.

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?

The description makes the effect clear (counted toward usage, affects billing) which helps decide whether to call it, but it offers no explicit when-to-use guidance or exclusions. With no competing sibling, the usage is implied rather than stated.

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.