Skip to main content
Glama

Next Code

next_code
Read-only

Scans project files and generates the next sequential code for a given type and wave, preventing duplicate identifiers.

Instructions

Cấp mã kế tiếp (BL-012, W03-04, CR-W03-02, KT-005…) bằng cách quét hồ sơ, tránh trùng số.

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": {
      "project_dir": "<project_dir>",
      "kind": "<kind>"
    },
    "name": "next_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYesLoại mã. ISSUE, P, CR, Q, CL, QA là mã trong wave, cần wave
waveNoMã wave, ví dụ W03; chỉ cần cho mã trong wave
project_dirYesĐường dẫn tuyệt đối tới gốc repo dự án

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.3

TDQS

B3.2/5.0
Behavior3/5

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

The readOnlyHint annotation already establishes that this is a safe read operation. The description adds useful behavioral context by saying it scans records and avoids duplicate codes, but it does not disclose failure behavior, how missing or malformed files are handled, or what happens when no valid next code exists.

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 description is a single front-loaded sentence with no filler. The parenthetical examples are compact and support the purpose, though the sentence is arguably too terse for a code-generation tool.

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 an output schema and fully described parameters, which reduces what the description must cover. Still, for an operation that scans project records and depends on wave context, the description omits important edge-case behavior and prerequisites.

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 the input schema already documents kind, wave, and project_dir. The description's examples loosely map to some code kinds but add no new parameter semantics 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 states a specific operation: issuing the next code by scanning records and avoiding duplicate numbers. It includes representative code examples, making the resource clear. However, it does not distinguish this tool from sibling tools such as check or status.

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?

The description explains the mechanism but gives no explicit guidance on when to use this tool versus alternatives, nor any exclusions or preconditions. An agent must infer usage from the tool name and schema.

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