Skip to main content
Glama

Set a counter

set_counter

Assign an exact numeric value to a counter variable, creating it if it doesn't exist. Ideal for resetting counters like deaths to zero.

Instructions

Set a counter variable to an exact numeric value, e.g. reset a death counter to 0. Creates the counter if it doesn't exist yet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe counter variable name, e.g. "deaths".
valueYesThe exact value to set it to.
Behavior4/5

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

Annotations indicate readOnlyHint=false (mutating), and the description adds the non-obvious behavior that the counter is created if it doesn't exist. This provides useful context beyond annotations, though no further side effects or limitations are mentioned.

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?

Two sentences front-load the main purpose and then add a critical behavioral note. No wasted words, efficient and clear.

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 simple two-parameter tool with no output schema and no nested objects, the description covers the essential behavior (setting value, creation) adequately. It is sufficient for the agent to use correctly given the sibling tools are mostly unrelated.

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 clear descriptions for both parameters. The tool description adds only an example value ('deaths') and reiterates that value is exact numeric, which does not significantly enhance understanding beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'set' and resource 'counter variable', with an example (reset death counter to 0). It also notes creation behavior, differentiating from ordinary set operations. However, the presence of a sibling tool 'set_variable' could cause confusion without explicit differentiation.

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 implies usage for setting counters to exact values, but provides no guidance on when not to use it or how it compares to the similar sibling 'set_variable'. No explicit alternatives or exclusions are given.

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/lumiastream/MCP'

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