Skip to main content
Glama

freshness

Read-only

Check saved .fig copies against their online Figma files to identify stale local designs before concluding a frame is missing.

Instructions

Tell whether saved .fig copies are older than their online Figma files, before concluding a design lacks a frame: the designs in a mapping (a JSON list of {name, url, file}, file relative to the project root for .figlens/sources.json, else to the mapping's folder), one file found in the nearest .figlens/sources.json at or above it, or one file with its url. Saved time is exported_at in the copy's meta.json; online time is last_touched_at from Figma's REST file metadata, read with an environment token (never an argument or output). The optional account overrides the mapping's account; named accounts resolve tokenEnv in the server user's figlens config/accounts.json, and unnamed entries keep FIGMA_TOKEN. Missing named config/token never falls back. Per-design account/tokenVar/tokenSet describe named routes; top-level tokenVar/tokenSet describe only default FIGMA_TOKEN. Each design is stale, current or unknown with a reason (no_token, account_not_configured, account_config_invalid, no_saved_time, not_mapped, file_missing, url_unrecognized, offline, token_rejected, file_not_found, rate_limited, curl_unavailable, outside_roots, unexpected_response, token_invalid, deadline when a listing ran out of its 60 s, cancelled). A stale copy needs the user to save a new local copy (File > Save local copy); nothing is downloaded. With a token, a node not found or an empty find in a mapped stale copy carries the same hint.

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

Input Schema

NameRequiredDescriptionDefault
urlNowith file: the Figma file URL it was saved from, bypassing mapping and its account; uses FIGMA_TOKEN unless account overrides it
fileNoa local saved .fig to check alone; its mapping is the nearest .figlens/sources.json at or above it unless url is given
accountNoaccount alias overriding every checked entry, including file with url; 1-64 lowercase ASCII letters, digits, '-' or '_', starting with a letter or digit; tokenEnv is configured in the server user's accounts.json
sourcesNopath of a mapping JSON to list every design of; not with file

Output Schema

NameRequiredDescriptionDefault
designsYesname, file (as mapped or given), savedAt, onlineModifiedAt, onlineVersion, state stale|current|unknown, reason when unknown; named routes add account, tokenVar (null when unresolved), tokenSet; never token values
mappingYes
tokenSetYeswhether default FIGMA_TOKEN is nonempty
tokenVarYeslegacy default FIGMA_TOKEN only, not an aggregate of named accounts

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.14.1
    • addedInput schema / properties / account
      Added value: +{
      +  "description": "account alias overriding every checked entry, including file with url; 1-64 lowercase ASCII letters, digits, '-' or '_', starting with a letter or digit; tokenEnv is configured in the server user's accounts.json",
      +  "type": "string"
      +}
    • changedInput schema / properties / url / description
      Previous value: -"with file: the Figma file URL it was saved from, instead of a mapping"New value: +"with file: the Figma file URL it was saved from, bypassing mapping and its account; uses FIGMA_TOKEN unless account overrides it"
    • changedOutput schema / properties / designs / description
      Previous value: -"name, file (as mapped or given), savedAt, onlineModifiedAt, onlineVersion, state stale|current|unknown, reason when unknown"New value: +"name, file (as mapped or given), savedAt, onlineModifiedAt, onlineVersion, state stale|current|unknown, reason when unknown; named routes add account, tokenVar (null when unresolved), tokenSet; never token values"
    • addedOutput schema / properties / tokenSet / description
      Added value: +"whether default FIGMA_TOKEN is nonempty"
    • addedOutput schema / properties / tokenVar / description
      Added value: +"legacy default FIGMA_TOKEN only, not an aggregate of named accounts"
  2. Addedv0.13.1

TDQS

A4/5.0
Behavior5/5

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

Beyond the readOnlyHint and openWorldHint annotations, the description discloses token handling, account resolution rules, fallback behavior, the 60-second listing deadline, that nothing is downloaded, and the full set of stale/current/unknown reasons. This is unusually rich behavioral context for an agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded, but the description is a dense wall of semicolon-heavy clauses, parentheticals, and an exhaustive reason-code list. Most content is relevant, but the structure makes it harder to scan than it needs to be.

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?

For a complex read-only freshness check with rich schema and output schema, the description covers the important operational details: mapping resolution, account and token routing, staleness reasons, deadlines, and the required user follow-up. An agent should have enough context to call and interpret the tool correctly.

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 100%, so the schema already documents the four optional parameters. The description still adds meaningful resolution semantics: relative paths, nearest .figlens/sources.json lookup, mapping account overrides, tokenEnv resolution, and the fact that missing named config never falls back.

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: it tells whether saved .fig copies are older than their online Figma files. The purpose is clear and actionable, but it does not explicitly distinguish this tool from similarly named siblings such as verify or diff.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

The description gives a usage context ('before concluding a design lacks a frame') and explains that stale copies require the user to save a new local copy. However, it does not explicitly name alternatives or state when not to use this tool.

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