Skip to main content
Glama

Refresh Departments

refresh_departments
Idempotent

Refresh department subagent files to the current template after an upgrade, keeping names, codes, domains, models and effort. Reports files with custom edits instead of overwriting them.

Instructions

Làm mới file subagent bộ phận (.claude/agents/dept-*.md) theo mẫu hiện hành, giữ tên, mã, lĩnh vực, vùng sở hữu, model, effort, kỷ luật riêng.

Dùng sau upgrade để bộ phận đã lập nhận luật mới. File đã bị sửa khác mẫu thì bỏ qua và báo.

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>"
    },
    "name": "refresh_departments"
  }
}

Input Schema

NameRequiredDescriptionDefault
dry_runNotrue: chỉ báo file sẽ cập nhật, không ghi
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

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true and destructiveHint=false. The description adds real value beyond them by disclosing the skip-and-report policy for hand-modified files and the fields that survive the rewrite, but it does not state what happens on partial failure or how rewritten files are reported. Useful supplement, not a full behavioral picture.

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, zero filler: the first states the action and what is preserved, the second states when to use it and the exception handling. Front-loaded with the resource before the caveat.

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 two-parameter, idempotent mutation with an output schema present, the description covers action, scope, preservation and the divergent-file rule; return values need not be described. It leaves out only failure/partial-write behavior, a minor gap given the output schema exists.

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%, with both project_dir and dry_run documented inline (including the safer default dry_run=true), so the baseline is 3. The description adds nothing about parameter interplay — e.g. that dry_run previews exactly the files the skip rule would report.

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?

Names a specific verb (làm mới / refresh) plus a precise resource pattern (.claude/agents/dept-*.md) and even enumerates what is preserved (name, code, domain, ownership area, model, effort, discipline). An agent can tell this apart from create_department or upgrade without opening any schema.

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?

Gives an explicit trigger — 'Dùng sau upgrade' — so the agent knows the prerequisite context, and adds an edge-case rule: files diverging from the template are skipped and reported. It stops short of naming the alternative tool for creating a brand-new department, so it is clear context without full alternatives routing.

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