Skip to main content
Glama
libragik

universal-ai-agent-bridge

by libragik

llm_get_analytics

Retrieve cost, token usage, and latency analytics for LLM queries, with breakdowns by provider or model. Option to reset ledger statistics.

Instructions

Retrieve comprehensive cost, token usage, and latency analytics from the Antigravity Local LLM Ledger. View total tokens spent, estimated USD expenditure, breakdowns per provider (Dahl, Groq, DeepSeek, Ollama) and per model, or reset ledger statistics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of recent query transactions to include (default 20).
modelNoOptional filter: get analytics or transactions for this specific model.
actionNoAction to perform: 'get' (default) returns current analytics and recent transactions; 'clear' resets the ledger counters.
providerNoOptional filter: get analytics or transactions specifically for this provider alias.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full burden of behavioral disclosure. It mentions the 'reset' action but does not warn about the destructive nature of clearing the ledger, potential data loss, or any side effects. It also does not describe the return format or whether the operation is read-only by default. The description is vague about the consequences of the 'clear' action, which is a significant gap for a tool that can mutate state.

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?

Two sentences with no filler. The primary purpose (retrieve analytics) is front-loaded, and the reset capability is mentioned in the second sentence. Every phrase contributes value, and the structure is clear and efficient.

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

Completeness3/5

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

The tool has 4 optional parameters, no required ones, no output schema, and no annotations. The description explains the high-level return (analytics) but does not specify the exact output structure, the effect of 'clear' beyond resetting, or any limitations like pagination. Given the moderate complexity and missing output schema, the description should provide more detail about the response format and side effects. It is adequate but leaves gaps.

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 each parameter (limit, model, action, provider) already has a clear description. The tool description adds context about what analytics are retrieved (cost, tokens, latency) and mentions provider names, but it does not add meaning beyond what the schema already provides. The baseline of 3 applies because the schema handles parameter documentation.

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 clearly states the tool retrieves cost, token usage, and latency analytics from a specific ledger, and can reset statistics. It names the resource and specific breakdowns, distinguishing it from sibling tools like llm_query or llm_generate_image which are about querying or generation. The verb 'Retrieve' and 'reset' are explicit and the scope is unambiguous.

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 makes it clear this is the analytics tool, and the action parameter (get/clear) implies when to use each. However, it does not explicitly state when to use this vs alternatives or mention any exclusions. Given siblings are clearly different in function, the context is sufficient, but there is no explicit guidance like 'use this when you need ledger statistics' or 'not for generation'.

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