Skip to main content
Glama
AIops-tools

io.github.AIops-tools/ceph-aiops

osd_reweight

Destructive

Adjust an OSD's reweight to drain it (0.0) or redistribute data. Preview changes with dry_run before applying.

Instructions

[WRITE][risk=medium] Set an OSD's reweight (0.0 drains it). Reversible → prior weight.

Pass dry_run=True to preview the current→target weight without applying it.

Args: osd_id: Numeric OSD id (from osd_tree). weight: New reweight 0.0–1.0 (0.0 = full drain). dry_run: If True, read the current weight and preview without reweighting. target: Ceph target name from config; omit for the default.

Input Schema

NameRequiredDescriptionDefault
osd_idYes
targetNo
weightYes
dry_runNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.11.5
  2. Removedv0.3.0
  3. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, so the safety profile is covered. The description adds real value beyond that: an explicit [WRITE][risk=medium] tag, the reversibility guarantee (returns to prior weight), the 0.0 = full-drain semantics, and the dry-run preview behavior. It omits permission/authorization requirements, which keeps it from a 5.

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?

Front-loaded with the operation type, risk level, and effect, followed by a single dry-run line and a compact Args block. Efficient overall, though dry_run's behavior is stated twice (inline sentence and Args), a minor redundancy.

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?

With no output schema and no annotation detail on returns, the description still covers the essentials an agent needs: mutation classification, reversibility, dry-run path, and full parameter semantics. Return payload shape is left unspecified, which is the only notable gap.

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

Parameters5/5

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

Schema coverage is 0%, so the description carries the full burden, and it documents every parameter: osd_id with its source (osd_tree), weight with its valid range 0.0–1.0 and drain meaning, dry_run's read-only preview behavior, and target with its config origin and default omission.

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?

States a specific verb and resource ("Set an OSD's reweight") and immediately clarifies the semantic effect ("0.0 drains it"). An agent can distinguish this from the adjacent osd_mark_out/osd_mark_in siblings because reweight is gradational while those are binary in/out operations.

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 concrete operational guidance: pass dry_run=True to preview current→target weight before applying, and that the change is reversible to the prior weight. It doesn't explicitly name when to prefer this over osd_mark_out, but the dry-run and reversibility cues establish clear usage context.

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