Skip to main content
Glama
CDT AutoCAD Provider

CDT AutoCAD Provider

object_count

Read-only

Count objects in the current drawing space with optional entity-type and layer filters. Use this read-only query to check entity totals before fetching full object lists.

Instructions

Count objects in the backend's current supported space with optional type and layer filters; no document geometry is modified.

Side-effects: None. Read-only entity count query. Disambiguation: Lightweight count check before fetching full object lists.

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": "object_count"
  }
}

Input Schema

NameRequiredDescriptionDefault
type_filterNoOptional entity type filter (e.g. 'LINE', 'CIRCLE')
layer_filterNoOptional layer name filter

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.1
    • addedInput schema / properties / layer_filter / description
      Added value: +"Optional layer name filter"
    • addedInput schema / properties / type_filter / description
      Added value: +"Optional entity type filter (e.g. 'LINE', 'CIRCLE')"
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the safety profile is known; the description reinforces it with 'no document geometry is modified' and adds the useful scoping detail that counting is limited to the backend's current supported space. Slight redundancy with the annotation, but it adds the space constraint.

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 purpose, then labeled sections for side-effects and disambiguation. There is mild repetition between 'no document geometry is modified', 'Side-effects: None', and 'Read-only', which costs a bit but the rest earns its place.

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, annotations, and fully described parameters, the description covers what an agent needs to call this correctly. The only soft spot is that 'current supported space' is not defined, but the tool is simple enough that this is minor.

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?

Both parameters are already fully documented in the schema (100% coverage, with type examples like 'LINE', 'CIRCLE'). The description only mentions that type and layer filters exist, which the schema already conveys, so baseline 3 applies.

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 ('count objects') plus the scope ('backend's current supported space') and the filterable dimensions. An agent can distinguish it from object_list/object_query without opening a 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?

The disambiguation line gives a clear usage pattern: run a lightweight count first, then fetch full object lists if needed. It doesn't explicitly name object_list/object_query as the alternatives, but the intended workflow is unambiguous.

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