Skip to main content
Glama

obj_get_font_id

Retrieves or creates an Altium font ID for specified font properties and returns it for use with obj_modify to set an object's FontId.

Instructions

Get or create a font ID for the given font properties.

Looks up (or creates) an entry in the Altium font table matching the specified properties and returns its font ID. Use the returned font_id to set an object's FontId property via obj_modify.

Args: size: Font size in points (e.g., 8, 10, 12) font_name: Font family name (default "Arial") bold: Whether the font is bold italic: Whether the font is italic rotation: Text rotation in degrees (0, 90, 180, 270) underline: Whether the font is underlined strikeout: Whether the font has strikeout

Returns: Dictionary with font_id

Input Schema

NameRequiredDescriptionDefault
boldNo
sizeYes
italicNo
rotationNo
font_nameNoArial
strikeoutNo
underlineNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that the tool may create a font-table entry, which is an important side effect. However, it does not state idempotency, persistence, document-state requirements, or whether creation is reversible.

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 description is front-loaded with the core purpose, then structured into Args and Returns sections. Every sentence adds useful information, and there is no redundant filler.

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?

For a 7-parameter tool with no annotations, the description covers purpose, all parameters, return shape, and a key downstream usage. The output schema exists, so return values need not be exhaustively explained. It still lacks guidance on prerequisites or sibling selection.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate, and it does. It documents all seven parameters with meaning: size in points, font family default, bold/italic/underline/strikeout flags, and rotation in degrees with listed values (0, 90, 180, 270).

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?

The description states a specific verb and resource: get or create a font ID for given font properties. It explains that this looks up or creates an entry in the Altium font table. It does not explicitly distinguish this from the sibling obj_get_font_spec, so it falls 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 Guidelines4/5

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

The description gives a clear usage context: use the returned font_id to set an object's FontId via obj_modify. This tells the agent when the tool is needed in a workflow. It does not name exclusions or compare against alternatives such as obj_get_font_spec.

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