Skip to main content
Glama

kb_define_enum

Defines a named enumeration with unique name-to-value mappings, letting you organize constants and annotate game code in the knowledge base.

Instructions

Define a named enumeration with name-to-value mappings.

Enum names must be unique. All numeric values must be unique within the enum. Names must be non-empty.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "values": "<values>"
    },
    "name": "kb_define_enum"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
valuesYes
commentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden, and it does disclose concrete validation behavior: enum names must be globally unique, values must be unique within the enum, and names must be non-empty. It stops short of saying what happens on a violation (error vs. overwrite), whether definitions persist across sessions, or whether redefining an existing enum is allowed.

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 core purpose is front-loaded in the first sentence and the constraint list is short and scannable. The odd indentation and blank line are cosmetic waste but no sentence is redundant.

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 three-parameter mutation tool with a nested object argument, no annotations, and no output schema, the definition is thin. It omits return values, error/conflict behavior, and the purpose of `comment`, though the constraint rules do cover the most likely failure modes an agent would hit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate and it only partly does: "name-to-value mappings" explains the shape of `values`, but "Names must be non-empty" is ambiguous about whether it refers to the enum `name` or the mapping keys. The third parameter, `comment`, is never mentioned anywhere.

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 opens with a specific verb and resource ("Define a named enumeration with name-to-value mappings"), which is far more informative than the bare tool name. It clearly implies an enum-definition operation distinct from the kb_define_struct / kb_define_function siblings, though it never explicitly contrasts itself with them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to use this tool versus kb_define_struct, kb_define_variable, or kb_annotate, and no prerequisites or ordering guidance. The only conditional content is validation rules, which is not usage guidance.

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