Skip to main content
Glama
TommeCAD FreeCAD MCP

TommeCAD FreeCAD MCP

get_view_state

Read a FreeCAD document’s camera quaternion, GUI selection, and object visibility, color, and transparency so you can restore exact view state with matching set tools.

Instructions

Read explicit document camera quaternion, GUI selection and appearance for restoration with existing set_visibility/color/transparency tools.

Contract: explicit internal names recommended. Length mm, area mm^2, volume mm^3; field units override defaults. Errors: invalid_arguments, document_not_found, object_not_found, transaction_conflict, operation_failed, execution_timeout; transport failures are possible. Timeout is not cancellation: never blindly retry mutations. Legacy return shape preserved.

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": {
      "doc_name": "<doc_name>",
      "obj_names": "<obj_names>"
    },
    "name": "get_view_state"
  }
}

Input Schema

NameRequiredDescriptionDefault
doc_nameYesExplicit internal Name; no Label or active-document fallback.
obj_namesYesObjects whose visibility, RGB color and transparency to read; empty reads camera and selection only.

Output Schema

NameRequiredDescriptionDefault
dataNo
errorNo
statusYes
warningsNo
referencesNo
contract_versionNo1.0

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.2

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it enumerates error conditions (invalid_arguments, document_not_found, object_not_found, transaction_conflict, operation_failed, execution_timeout), flags transport failures, notes timeout-is-not-cancellation, and states the legacy return shape is preserved. The 'never blindly retry mutations' clause is boilerplate aimed at writers and is mildly confusing on a read tool, which is why this is not 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?

Purpose is front-loaded in the first sentence, followed by a clearly delimited contract (names, units, errors, retry guidance). Dense but every clause either scopes behavior or prevents a known mistake; no filler prose.

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?

An output schema exists, so return values need not be spelled out, and the description still covers units, override rules, empty-input behavior, and the failure modes an agent must handle. Complete for a read tool; the only surplus is mutation-retry guidance that does not apply here.

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 schema already documents both parameters including the explicit-internal-name requirement and the empty-array semantics. The description reinforces name expectations and adds unit conventions, but those units pertain to returned geometry rather than to the two inputs, so it adds little param-level meaning 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 concrete verb and the exact resources read: camera quaternion, GUI selection, and object appearance (visibility, color, transparency). It also positions itself relative to the write-side siblings (set_visibility/color/transparency), so an agent can tell read-state capture apart from state mutation without opening the 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?

Usage is implied clearly: call this to capture state before/alongside restoring it with the set_visibility/color/transparency tools. The contract also notes explicit internal names are recommended and that an empty obj_names reads camera and selection only. No explicit when-not-to-use or steering versus capture_view/set_view, which keeps it one step short of a 5.

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