Skip to main content
Glama

obj_count

Counts PCB/schematic objects by type with optional filters and scope, providing quick totals for active sheet, project, or specific document.

Instructions

Quick count of objects by type, faster than obj_query when you only need the count.

Args: object_type: Altium object type constant (see obj_query for options) scope: "active_doc" (default), "project", or "doc:C:\path\Sheet.SchDoc" for a specific loaded sheet. filter: Pipe-separated property=value conditions (AND logic)

Returns: Dictionary with "count" (and "sheets_processed" for project scope)

Input Schema

NameRequiredDescriptionDefault
scopeNoactive_doc
filterNo
object_typeYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.6/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full load: it declares the exact return keys ("count", plus "sheets_processed" for project scope) and the AND semantics of the filter. It does not mention error behavior, when a sheet fails to load, or performance caveats for project/doc scope beyond the comparative speed claim.

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?

The decisive sentence is front-loaded, followed by a compact Args/Returns block with no filler. Every line adds information an agent needs; nothing is repeated from 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?

An output schema exists, so the return-value explanation is a bonus rather than a requirement, and the parameter and scope behavior are covered. The only meaningful omission is the set of valid object_type constants, which the description pushes to a sibling tool.

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

Parameters4/5

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

Schema coverage is 0%, yet the description compensates well: it enumerates scope values with the default and shows a concrete path form ("doc:C:\path\Sheet.SchDoc"), and defines filter as pipe-separated property=value with AND logic. The one gap is object_type, whose allowed constants are deferred to obj_query rather than listed here, forcing a cross-tool lookup.

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+resource ("Quick count of objects by type") and immediately distinguishes itself from the sibling tool obj_query by noting it is faster when only a count is needed. An agent can tell exactly what it gets back 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Names the alternative (obj_query) and the exact condition that should route the agent here: "when you only need the count." It also clarifies the three scope modes and their default, so the agent knows which context to choose.

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