Skip to main content
Glama

cortex_log_tokens

Logs input and output tokens for a session to track API usage after each tool call.

Instructions

Log token usage for the current action. Call after every tool call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYesSession ID
input_tokensYesInput tokens used
output_tokensYesOutput tokens generated
Behavior2/5

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

No annotations are provided, and the description only says to log tokens without disclosing side effects, persistence, or error handling. It does not reveal if logging is destructive or if there are any limits, leaving a transparency gap.

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 extremely concise with two sentences, front-loading the purpose and usage. Every word earns its place with no redundancy.

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?

For a simple logging tool with no output schema and no annotations, the description is minimal but covers the essential call timing. However, it lacks details on token validity, session handling, and behavioral expectations, leaving some 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 coverage is 100% with basic descriptions for each parameter. The tool description adds no additional meaning beyond what the schema already provides, so the baseline score 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?

The description clearly states the tool logs token usage for the current action, distinguishing it from siblings like cortex_get_token_budget which queries budget rather than logging.

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?

Explicitly says to call after every tool call, giving clear context. However, it does not mention when not to use it or alternatives, missing some guidance expected for a full 5.

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/neuralnexustech/cortex-mcp'

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