Skip to main content
Glama
t-rhex

mcp-obsidian-vault

by t-rhex

log_usage

Record token and cost usage for tasks or agents, saving structured records to the Usage/ folder and optionally appending a summary to the task's Agent Log.

Instructions

Record token/cost usage for a task or agent. Stores structured usage records in the Usage/ folder. Optionally appends usage summary to the task's Agent Log.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoLLM model used.
notesNoFree-text notes about this usage record.
task_idNoTask this usage is for.
agent_idYesWhich agent is reporting usage.
cost_usdNoEstimated cost in USD.
project_idNoProject this usage is for.
input_tokensYesInput tokens consumed.
output_tokensYesOutput tokens consumed.
duration_secondsNoHow long the operation took in seconds.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of disclosing behavior. It explicitly states that records are stored ('Stores structured usage records in the Usage/ folder') and that the tool may append to the Agent Log. This is meaningful transparency about persistence and side effects, though it does not cover permissions, overwrite behavior, or error cases.

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 main action is front-loaded ('Record token/cost usage'), followed by the storage location and optional side effect. Every clause carries useful information.

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 straightforward logging tool with 100% schema coverage, the description conveys the essential behavior: what is recorded, where it is stored, and the optional side effect. It lacks any mention of return value or failure modes, but no output schema exists and the operation is simple enough that an agent can reasonably infer behavior. Slightly more detail on prerequisites would push it to a 5.

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 nine parameters already have descriptions in the input schema. The tool description mentions 'token/cost usage' and 'task or agent', which loosely maps to input_tokens/output_tokens/cost_usd and task_id/agent_id, but it adds no detail beyond the schema. Baseline 3 is appropriate.

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 token/cost usage for a task or agent.' It clearly distinguishes this logging tool from siblings like get_usage_report (reading usage) and log_decision (recording decisions) by naming the exact data captured and the storage target ('Usage/ folder').

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 clearly states the context of use: whenever token/cost usage needs to be recorded for a task or agent. It also mentions an optional side effect ('appends usage summary to the task's Agent Log'), which helps an agent decide whether this tool is appropriate. However, it does not explicitly name alternatives or exclusion conditions, so it misses the top score.

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