Skip to main content
Glama

compute_drift

Compare baseline and candidate extractions to detect UI design drift, returning a 0-100 score, verdict, category scores, and changed, added, or removed design tokens.

Instructions

Compare two dembrandt extractions and return a design-drift report: a 0-100 score (0 = identical), a stable/drift verdict, per-category scores, and the list of changed/added/removed tokens (colors, typography, spacing, radius, shadows). Pure and synchronous, no browser. Takes either an inline extraction or the job_id of a completed one. Use it to check whether generated or updated UI has drifted from a brand baseline.

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

Input Schema

NameRequiredDescriptionDefault
baselineNoA dembrandt extraction object. Omit it and pass job_id instead to read a completed extraction straight out of the job queue, which avoids sending the whole extraction back through the model.
candidateNoA dembrandt extraction object. Omit it and pass job_id instead to read a completed extraction straight out of the job queue, which avoids sending the whole extraction back through the model.
baselineJobIdNojob_id of a completed extraction to read instead of passing result inline
failThresholdNoScore above this yields a 'drift' verdict (default 10)
candidateJobIdNojob_id of a completed extraction to read instead of passing result inline

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations supplied, the description does real work: "Pure and synchronous, no browser" discloses that there are no side effects, no network/browser dependency, and that it is deterministic. It also states the prerequisite that the referenced job must be completed. It stops short of describing failure behavior when neither an inline extraction nor a valid job_id is supplied.

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?

Front-loads what the tool does, then the return shape, then input modes, then the use case - a natural reading order with no filler. Every sentence carries distinct information.

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?

No output schema exists, but the description compensates by enumerating the returned fields (score, verdict, per-category scores, changed/added/removed token lists). Input modes and the failThreshold-driven verdict are covered; only edge-case behavior (missing both inputs, incomplete job) is left unstated.

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%, so the baseline/candidate/failThreshold semantics are already documented; baseline score of 3 applies. The description adds the either/or pattern (inline extraction versus job_id of a completed extraction) and clarifies that the 0-100 score maps to a stable/drift verdict, which is modest added value over the schema.

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 and resource ("Compare two dembrandt extractions") plus the exact artifact produced (a design-drift report). It also enumerates the report contents, so an agent can tell this apart from the sibling getters/exporters without opening a schema.

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?

Explicitly says when to use it: "check whether generated or updated UI has drifted from a brand baseline." It gives no when-not guidance or named alternative for related tasks (e.g. single-extraction inspection via get_design_tokens), but the intended context is unambiguous.

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