Skip to main content
Glama

set_leveling_policy

Destructive

Define when automatic bed leveling triggers by setting print-count or hour thresholds, toggling checks, and choosing the G-code command for a target printer.

Instructions

Configure automatic bed leveling policy for a printer.

Args:
    enabled: Enable/disable auto-leveling checks.
    max_prints: Trigger leveling after this many prints.
    max_hours: Trigger leveling after this many hours.
    gcode_command: G-code command to send (G29 or BED_MESH_CALIBRATE).
    printer_name: Target printer.  Omit for the default printer.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "set_leveling_policy"
  }
}

Input Schema

NameRequiredDescriptionDefault
enabledNoEnable/disable auto-leveling checks. Default: true.
max_hoursNoTrigger leveling after this many hours. Default: 48.0.
max_printsNoTrigger leveling after this many prints. Default: 10.
printer_nameNoTarget printer. Omit for the default printer.
gcode_commandNoG-code command to send (G29 or BED_MESH_CALIBRATE). Default: "G29".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.5.1
    • changedInput schema / properties / enabled / description
      Previous value: -"Default: true."New value: +"Enable/disable auto-leveling checks. Default: true."
    • changedInput schema / properties / gcode_command / description
      Previous value: -"Default: \"G29\"."New value: +"G-code command to send (G29 or BED_MESH_CALIBRATE). Default: \"G29\"."
    • changedInput schema / properties / max_hours / description
      Previous value: -"Default: 48.0."New value: +"Trigger leveling after this many hours. Default: 48.0."
    • changedInput schema / properties / max_prints / description
      Previous value: -"Default: 10."New value: +"Trigger leveling after this many prints. Default: 10."
    • addedInput schema / properties / printer_name / description
      Added value: +"Target printer.  Omit for the default printer."
  2. Changed9 schema fields changedv1.5.0
    • removedInput schema / properties / enabled / default
      Removed value: -true
    • addedInput schema / properties / enabled / description
      Added value: +"Default: true."
    • removedInput schema / properties / gcode_command / default
      Removed value: -"G29"
    • addedInput schema / properties / gcode_command / description
      Added value: +"Default: \"G29\"."
    • removedInput schema / properties / max_hours / default
      Removed value: -48
    • addedInput schema / properties / max_hours / description
      Added value: +"Default: 48.0."
    • removedInput schema / properties / max_prints / default
      Removed value: -10
    • addedInput schema / properties / max_prints / description
      Added value: +"Default: 10."
    • removedInput schema / properties / printer_name / default
      Removed value: -null
  3. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, so the safety burden is partly carried. The description adds nothing beyond that: it does not say whether the policy replaces prior settings wholesale, whether it persists across restarts, whether it affects in-progress prints, or what the tool returns. For a mutation tool with only a 'Configure' verb, that leaves the agent guessing about side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening sentence is front-loaded and effective, but the Args section duplicates the schema descriptions verbatim, consuming space without adding information. It is not harmful, but roughly half the text does no work.

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?

Covers the intent and every parameter, which is adequate for a five-param, zero-required mutation with no output schema. It is incomplete on the things that matter for a destructive write: effect of a partial update (since no params are required), persistence, and confirmation or failure behavior.

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 all five parameters (including defaults of true, 48.0, 10, and "G29") are already documented in the schema. The Args block largely restates those same lines and adds no new semantics, so the baseline of 3 applies.

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?

States a specific verb and resource: 'Configure automatic bed leveling policy for a printer.' An agent can tell this is a policy write, not an immediate action, and it distinguishes the tool from the sibling trigger_bed_level by implication. It does not explicitly name that sibling, so it stops short of a 5.

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 when-to-use or when-not-to-use guidance. The sibling set contains trigger_bed_level, bed_level_status, get_bed_mesh and run_calibrate, yet the description never says whether to call this to set a policy versus triggering a level now, nor what prerequisites (printer online, idle) apply.

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

Deploy Server

Other Tools