Skip to main content
Glama

Set font

set_font
Idempotent

Restyle text by setting font-family, size, and weight. Each property is validated, and glyph coverage is checked to prevent missing characters.

Instructions

Set font-family / font-size / font-weight on one or more text objects.

When to use: restyling text typography. To change the words use replace_text; for non-font fill/stroke use set_fill / set_stroke.

Key params: provide any of family, size, weight (at least one required); each is validated and written to every target's inline style.

Return shape: SetFontResult — all EditResult fields (operation_id, snapshot_id, changed, before/after preview; the edit lands on the working copy only, reversible) PLUS glyph coverage: coverage_ok is False when a target now names a family that cannot render its text, and font_coverage lists per object the uncovered_chars (read from the font's OWN cmap, never fontconfig substitution) and a suggested_family that covers them — so a non-covering font choice is checkable at apply time instead of silently shipping tofu.

Example: set_font(doc_id, ["title"], family="Inter", size="24px")

Render and look before you trust this edit: render with render_preview (or live_render_view) and inspect the result before relying on it; restore_snapshot reverts it if it is wrong.

Risk class: medium (reversible style edit on the working copy; original untouched).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNo
doc_idYes
familyNo
weightNo
object_idsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYes
changedYes
summaryNo
coverage_okNo
snapshot_idYes
operation_idYes
font_coverageNo
preview_afterNo
preview_beforeNo
Behavior5/5

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

Description goes beyond annotations (readOnlyHint=false, idempotentHint=true, destructiveHint=false) by explaining the edit is reversible, lands on the working copy, and includes risk class and detailed return shape with glyph coverage handling. No contradiction with annotations.

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?

Well-structured with sections: core purpose, use guidelines, key params, return shape, example, caution note, and risk class. Front-loaded with primary action; every sentence adds value; no extraneous text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (5 params, output schema), the description covers all essential aspects: purpose, usage, parameters, return values (including edge cases like uncovered characters), example, and risk. Nothing is missing for an agent to correctly invoke and interpret results.

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 coverage is 0%, so the description fully compensates by explaining key parameters: family, size, weight (at least one required), validation, and effect. It provides an example and clarifies the required fields (doc_id, object_ids) implicitly.

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?

The description clearly states it sets font-family/font-size/font-weight on text objects, distinguishing from sibling tools like replace_text (for words) and set_fill/set_stroke (for non-font styling). The verb+resource combination is specific and unambiguous.

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?

The description explicitly says 'When to use: restyling text typography' and contrasts with alternatives: 'To change the words use replace_text; for non-font fill/stroke use set_fill / set_stroke.' This provides clear context and exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jjjsood/inkscape-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server