Skip to main content
Glama
marvkr

Better Design

Check Comprehension

check-comprehension
Read-onlyIdempotent

Run three text-only tests on interface copy or markup after building a screen to catch unclear wording, insider jargon, and complexity before presenting it to users.

Instructions

Run the comprehension check on an interface you just built. Call this after get-review-rules, before you present the screen to the user.

Review rules catch what is broken. This catches what is unclear: copy that makes sense to the people who built the product and to nobody else.

It reads text only: the copy you pass, or the text it extracts from your markup. It does not see what renders: not screenshots, text inside images, or visual hierarchy. A pass is a text result, not visual approval.

Three tests, run on the screen's own words:

  1. Mom test. Would a person outside the team understand this? Flags insider vocabulary, unexplained acronyms and sentences too long to follow.

  2. 15 second test. If the screen takes longer than 15 seconds to explain, it is too complex. Flags word count, stacked concepts and competing actions.

  3. Screenshot test. With zero context, can someone say what the screen does? Flags a missing title, actions that hide the outcome ("Continue", "Got it") and icon-only controls.

Pass either the copy or the markup:

  • check-comprehension({ screen: "Lesson end card", headline: "Lesson complete", body: ["Claim the June badge by collecting more quest points from your daily, friend and weekend quests."], actions: ["Continue"] })

  • check-comprehension({ screen: "Billing page", code: "…the JSX you wrote…" })

Check every panel, not only the page's own copy. When a sales page, deck or social image shows a mock product screen, dashboard, table or chat panel, call this once per panel with that panel's text. Text inside a mock-up is still copy the reader reads, and long or insider text hides there most often.

For a slide, pass surface: "slide" (a screen named slide, deck or presentation gets it by default) and call once per slide. A slide adds a density test, and it never passes on text: approve it only after you review its rendered screenshot.

Use knownTerms for words your audience genuinely knows, so the check stops flagging them. When the team saved rules, their approved words count as known and their banned words fail a brand test. Fix every critical and serious finding, then call this again on the rewritten copy.

Input Schema

NameRequiredDescriptionDefault
bodyNoSupporting copy, one string per visible line or paragraph.
codeNoJSX, TSX or HTML for the screen. Copy is extracted from it when headline/body/actions are omitted.
screenYesWhat this screen is, e.g. 'lesson end card', 'billing page'.
actionsNoVisible button and link labels, e.g. ['Claim badge', 'Not now']. Search fields, filters and selects are not actions.
contextNoOptional. One sentence on WHY you are calling this and what the user asked for (e.g. 'adding nav icons for the fintech dashboard'). Used only for usage analytics; does not change the result.
surfaceNo"slide" adds the slide density test and withholds a pass until a screenshot review. Defaults to "slide" when the screen name says slide, deck or presentation.
headlineNoThe screen's title, if you are passing copy rather than markup.
knownTermsNoWords this audience already knows, so they are not flagged as insider language.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare the generic read-only/idempotent profile; the description adds substantive behavior: it reads text only and explicitly does NOT see screenshots, text inside images, or visual hierarchy, so a pass is not visual sign-off. It also discloses that slide surface 'never passes on text' and that saved team rules make approved words known and banned words fail a brand test — none of which is derivable from structured fields.

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?

Front-loaded with the action and the ordering constraint, then progressively deeper detail; the three named tests and the two invocation examples each carry information an agent needs to interpret or shape a call. It is long, and the mock-panel and slide paragraphs could be tightened, but nothing is padding or repetition.

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 an 8-parameter, non-mutating tool with no output schema, the description covers inputs, ordering, scope, and the severity vocabulary of results ('critical and serious finding'). What a result actually looks like structurally is left implicit, which is the main remaining gap given there is no output schema.

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 3 is the floor, but the description genuinely adds semantics: the code-vs-copy alternative ('Pass either the copy or the markup' with a worked example of each), the surface default rule for slides/decks/presentations, and how knownTerms interacts with saved team rules. Only the analytics-only 'context' param is left to the schema, which is fine since the schema already says it does not change the result.

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?

Opens with a specific verb+resource ('Run the comprehension check on an interface you just built') and explicitly demarcates itself from the sibling get-review-rules: 'Review rules catch what is broken. This catches what is unclear.' An agent can distinguish it from review-ui-code or the principle-lookup siblings without opening any schema.

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?

Gives explicit sequencing ('Call this after get-review-rules, before you present the screen to the user'), scope rules ('Check every panel, not only the page's own copy', 'call once per slide'), and an iteration loop ('Fix every critical and serious finding, then call this again'). It also pre-empts the most likely wrong usage by stating it is not visual approval.

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