Skip to main content
Glama
CDT AutoCAD Provider

CDT AutoCAD Provider

viewport_lock

Locks or unlocks a paper-space viewport by handle to prevent accidental zoom or pan changes, returning the verified lock state.

Instructions

Set or clear DisplayLocked for a paper-space viewport by handle and return the verified lock state.

Side-effects: Sets DisplayLocked property on viewport. Disambiguation: Lock viewports to prevent accidental zoom changes during drafting.

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": {
      "handle": "<handle>"
    },
    "name": "viewport_lock"
  }
}

Input Schema

NameRequiredDescriptionDefault
handleYesPersistent CAD handle of the viewport entity
lockedNoTrue to lock viewport display scale against zoom/pan, False to unlock (default: True)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.1
    • addedInput schema / properties / handle / description
      Added value: +"Persistent CAD handle of the viewport entity"
    • addedInput schema / properties / locked / description
      Added value: +"True to lock viewport display scale against zoom/pan, False to unlock (default: True)"
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only supply readOnlyHint=false; the description carries the real burden and does so by declaring the side-effect ('Sets DisplayLocked property on viewport') and that the returned state is verified post-write. It doesn't cover error behavior for an invalid/non-viewport handle or idempotency, which would be needed for 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.

Conciseness5/5

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

Three short labeled lines: the core action first, then side-effects, then disambiguation. Every sentence carries distinct information with no repetition of the schema.

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 an output schema present, return values needn't be explained, and the mutation's side-effect is disclosed. Minor gaps remain around failure modes and whether locking affects other viewport properties, but for a 2-parameter toggle this is nearly complete.

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 both handle and locked are fully documented with defaults and semantics, setting the baseline at 3. The description restates the handle-addressing and the lock-state intent but adds no syntax or format detail beyond the schema.

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 pair (set/clear) plus the exact resource and property (DisplayLocked on a paper-space viewport) and the addressing key (handle). This clearly separates it from sibling tools like viewport_set_scale or viewport_create, which act on the viewport's contents rather than its lock state.

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?

'Disambiguation: Lock viewports to prevent accidental zoom changes during drafting' gives a concrete usage context, and 'set or clear' implies both directions of use. It stops short of explicitly naming alternatives or stating when not to use it (e.g., when you actually want to change scale, use viewport_set_scale).

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