Skip to main content
Glama

add_custom_metric

Log one entry of a custom metric; the first entry for a new key creates it with its unit.

Reuse keys from list_custom_metrics exactly (lowercase a-z, 0-9, _). The unit is fixed at creation: omit it afterwards. Omit recorded_at to log it as now; pass it only for a past moment, as the user's local time with no UTC offset, like 2026-09-18T19:00.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
unitNo
valueYes
recorded_atNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only state readOnlyHint=false and destructiveHint=false; the description adds crucial behavioral detail: that creating a metric fixes its unit, that unit must be omitted on subsequent entries, and that recorded_at should be local time without UTC offset. This goes beyond the annotations and clarifies side effects of creation.

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 two paragraphs, but every sentence adds value: the first defines the core action and creation behavior, the second covers key reuse and parameter rules. It is slightly longer than strictly necessary, but there is no filler or repetition, so it earns its length.

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 tool with an output schema (which likely describes return values), the description covers all call-time decisions: key selection, unit handling, and timestamp formatting. It doesn't explain what the response contains, but the output schema covers that. The only minor gap is that it doesn't explicitly warn that a misformatted key could fail, but the instruction to reuse keys exactly implies that.

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?

With 0% schema description coverage, the description carries the full semantic burden for parameters. It explains key format (lowercase a-z, 0-9, _), the unit creation rule, and the recorded_at timezone convention. Every parameter that could be ambiguous is addressed, making the description essential and effective.

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 states the exact action (log one entry) and resource (custom metric), and explicitly notes that the first entry for a new key creates it with its unit. This clearly distinguishes it from sibling tools like list_custom_metrics or delete_custom_metric_entry, leaving no ambiguity about its role.

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?

The description gives explicit rules for when to include or omit unit and recorded_at, and instructs the agent to reuse keys exactly as returned by list_custom_metrics. While it doesn't explicitly contrast with alternatives, the constraints on parameters make the intended usage unambiguous.

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