Skip to main content
Glama

Import & Configure Web Fonts and Assets

ink_import_custom_assets
Read-onlyIdempotent

Configure Google Font imports, preconnect tags, optical line-height variables, and accessible font fallbacks for Arabic and Latin projects. Generate ready-to-use HTML and CSS rules in memory.

Instructions

PURPOSE: Dynamically configure and generate Google Fonts preconnect tags, CSS @import rules, optical line-height variables, and accessible font fallbacks for multilingual Arabic and Latin projects.

BEHAVIOR: Generates HTML link tags, CSS @import rules, and stylesheet font-family declarations purely in-memory. Does not download font binaries or write files to disk directly. Formulates tailored optical line-height variables (1.7-1.85 for Arabic, 1.5-1.6 for Latin) to eliminate clipping.

USAGE GUIDELINES:

  • When to use: Call when setting up web fonts, adding Arabic typographic scales, or loading bespoke font families into a project.

  • When NOT to use: Do NOT use to synthesize fluid clamp font-size scales (use ink_generate_palette_tokens instead) or to scaffold an entire project (use ink_create_base instead).

  • Alternatives: Use ink_generate_palette_tokens for fluid typography size scales; use ink_create_base for full HTML document scaffolding.

RETURNS: ResultEnvelope containing 'htmlLinkTags', 'cssImportRule', 'cssVariables' with font-family definitions, and an accessible 'fallbackStack'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
weightsNoArray of numeric font weights to import (e.g. [400, 600, 700])
displayFontNoOptional display/headline font family name (e.g. 'Amiri', 'Playfair Display', 'Clash Display')
primaryFontNoPrimary font family name to import (e.g. 'IBM Plex Sans Arabic', 'Inter', 'Outfit')IBM Plex Sans Arabic
includeArabicNoWhen true, loads Arabic character subsets, sets optical line heights (1.7-1.85), and adds bidi fallbacks

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesDomain-specific typed payload returned by the tool
statusYesExecution outcome status
summaryYesConcise, human-readable executive summary of the tool outcome
evidenceNoAudit trail, source references, and generated artifact locations
warningsYesOperational cautions, craft advice, or non-blocking warnings
nextActionsNoActionable sequential recommendations or subsequent tool suggestions

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.2.0
    • changedInput schema / properties / displayFont / description
      Previous value: -"Secondary/Display font family name"New value: +"Optional display/headline font family name (e.g. 'Amiri', 'Playfair Display', 'Clash Display')"
    • changedInput schema / properties / includeArabic / description
      Previous value: -"Include Arabic optical sizing and fallback stacks"New value: +"When true, loads Arabic character subsets, sets optical line heights (1.7-1.85), and adds bidi fallbacks"
    • changedInput schema / properties / primaryFont / description
      Previous value: -"Primary font family name to import"New value: +"Primary font family name to import (e.g. 'IBM Plex Sans Arabic', 'Inter', 'Outfit')"
    • changedInput schema / properties / weights / description
      Previous value: -"Font weight numeric values to load"New value: +"Array of numeric font weights to import (e.g. [400, 600, 700])"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "additionalProperties": true,
      +      "description": "Domain-specific typed payload returned by the tool",
      +      "properties": {
      +        "cssImportRule": {
      +          "description": "CSS @import statement for stylesheets",
      +          "type": "string"
      +        },
      +        "cssVariables": {
      +          "description": "CSS font-family and line-height custom property variables",
      +          "type": "string"
      +        },
      +        "displayFont": {
      +          "type": "string"
      +        },
      +        "fallbackStack": {
      +          "description": "Accessible system fallback font stack",
      +          "type": "string"
      +        },
      +        "htmlLinkTags": {
      +          "description": "Preconnect and Google Fonts <link> tags ready for HTML <head>",
      +          "type": "string"
      +        },
      +        "primaryFont": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "primaryFont",
      +        "htmlLinkTags",
      +        "cssImportRule",
      +        "cssVariables",
      +        "fallbackStack"
      +      ],
      +      "type": "object"
      +    },
      +    "evidence": {
      +      "additionalProperties": false,
      +      "description": "Audit trail, source references, and generated artifact locations",
      +      "properties": {
      +        "artifacts": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "label": {
      +                "type": "string"
      +              },
      +              "sha256": {
      +                "type": "string"
      +              },
      +              "uri": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "label"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "inputsDigest": {
      +          "type": "string"
      +        },
      +        "sources": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "label": {
      +                "type": "string"
      +              },
      +              "retrievedAt": {
      +                "type": "string"
      +              },
      +              "uri": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "label"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "nextActions": {
      +      "description": "Actionable sequential recommendations or subsequent tool suggestions",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "status": {
      +      "description": "Execution outcome status",
      +      "enum": [
      +        "success",
      +        "partial",
      +        "blocked",
      +        "failed"
      +      ],
      +      "type": "string"
      +    },
      +    "summary": {
      +      "description": "Concise, human-readable executive summary of the tool outcome",
      +      "type": "string"
      +    },
      +    "warnings": {
      +      "description": "Operational cautions, craft advice, or non-blocking warnings",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "summary",
      +    "data",
      +    "warnings"
      +  ],
      +  "type": "object"
      +}
  2. First observedv1.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the tool is known to be safe and side-effect-free. The description adds valuable context: it generates content purely in-memory, does not write files, and details specific optical line-height ranges (1.7-1.85 Arabic, 1.5-1.6 Latin). This enriches the behavioral profile beyond the annotations without contradiction.

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?

The description is well-structured with PURPOSE, BEHAVIOR, USAGE GUIDELINES, and RETURNS sections. It is front-loaded with the core purpose. While longer than minimal, every section adds distinct value and there is no redundancy. It earns a 4 for clear organization and purposeful detail.

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?

The description covers what the tool does, when to use it (and when not), behavioral details, and the return envelope structure (htmlLinkTags, cssImportRule, cssVariables, fallbackStack). With an output schema present, it doesn't need to enumerate return values further. For a tool with 4 parameters and rich behavior, this is complete.

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% (all four parameters have descriptions). The tool description adds some context (e.g., linking includeArabic to line-heights and fallbacks) but does not significantly expand on what the schema already provides. Per the rubric, with high coverage the baseline is 3, and the description does not elevate beyond that.

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 states a specific purpose: dynamically configure and generate Google Fonts preconnect tags, CSS @import rules, optical line-height variables, and accessible font fallbacks for Arabic/Latin projects. It clearly distinguishes itself from siblings by naming alternatives in the usage guidelines, making it easy for an agent to know when to select this tool.

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?

Explicit 'When to use' and 'When NOT to use' sections with named alternatives (ink_generate_palette_tokens, ink_create_base) provide clear routing. The description leaves no ambiguity about when to call this tool versus others.

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