Skip to main content
Glama

ui_builder_get_guidelines

Read-only

Read a design's latest design-guidelines result, whoever ran it — a person in the editor on their own key, ui_builder_check_design on this host's key, or an agent that recorded verdicts with ui_builder_record_guidelines. Returns the record (model, revision, rules asked, verdicts, ranBy), the findings it implies, and stale: true when the design has changed since it was checked.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "designId": "<designId>"
    },
    "name": "ui_builder_get_guidelines"
  }
}

Input Schema

NameRequiredDescriptionDefault
tokenNoA grant token from poll_access, when you cannot set the X-Compose-Preview-Token header yourself — an MCP client fixes its headers at connect time, so this is how a token approved during this session is used in it. Prefer the header where you control it.
designIdYes
agentNameNoOptional agent/client name shown to design viewers; self-reported.
agentModelNoOptional current model name shown to design viewers; self-reported. Omit when unknown.

Output Schema

NameRequiredDescriptionDefault
staleNo
recordNo
schemaYes
summaryYes
designIdYes
findingsNo
unansweredNo
currentRevisionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed1 schema field changed
    • changedOutput schema / properties / findings / items / properties / measured / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "height": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "ratio": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "required": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "unit": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "width": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "height": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "ratio": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "required": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "theme": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "unit": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "width": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  4. Changed1 schema field changed
    • changedOutput schema / properties / record / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "asked": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "designId": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "model": {
      -        "type": "string"
      -      },
      -      "ranBy": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "recordedAtEpochMillis": {
      -        "anyOf": [
      -          {
      -            "type": "integer"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "revision": {
      -        "type": "integer"
      -      },
      -      "rulesVersion": {
      -        "type": "integer"
      -      },
      -      "schema": {
      -        "type": "string"
      -      },
      -      "verdicts": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "confidence": {
      -              "type": "number"
      -            },
      -            "nodeIds": {
      -              "items": {
      -                "type": "string"
      -              },
      -              "type": "array"
      -            },
      -            "reason": {
      -              "type": "string"
      -            },
      -            "ruleId": {
      -              "type": "string"
      -            },
      -            "verdict": {
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "ruleId",
      -            "verdict"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      }
      -    },
      -    "required": [
      -      "revision",
      -      "model",
      -      "rulesVersion",
      -      "asked",
      -      "verdicts"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "asked": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "costUsd": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "designId": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "generationId": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "model": {
      +        "type": "string"
      +      },
      +      "provider": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "ranBy": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "recordedAtEpochMillis": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "revision": {
      +        "type": "integer"
      +      },
      +      "routing": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "probability": {
      +                "anyOf": [
      +                  {
      +                    "type": "number"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "reason": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "router": {
      +                "type": "string"
      +              },
      +              "scores": {
      +                "additionalProperties": {
      +                  "type": "number"
      +                },
      +                "type": "object"
      +              },
      +              "version": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              }
      +            },
      +            "required": [
      +              "router"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "rulesVersion": {
      +        "type": "integer"
      +      },
      +      "schema": {
      +        "type": "string"
      +      },
      +      "servedModel": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "verdicts": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "confidence": {
      +              "type": "number"
      +            },
      +            "nodeIds": {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "reason": {
      +              "type": "string"
      +            },
      +            "ruleId": {
      +              "type": "string"
      +            },
      +            "verdict": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "ruleId",
      +            "verdict"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "revision",
      +      "model",
      +      "rulesVersion",
      +      "asked",
      +      "verdicts"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  5. Added

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered. The description adds genuine context beyond that: it enumerates what the record contains (model, revision, rules asked, verdicts, ranBy) and discloses the `stale: true` flag when the design changed after the check — a non-obvious behavioral trait. It stops short of the full bar because it says nothing about what happens when no result exists yet, or what `findings` contains when the record is stale.

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 verb and resource, then the disambiguating provenance clause, then the return shape. Dense but every clause carries information; the em-dash parenthetical listing the three result sources is slightly heavy but is exactly what disambiguates against siblings.

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

Completeness3/5

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

An output schema exists, so return values need not be spelled out, and the description still sketches them usefully; the read-only annotation covers safety. For a single-required-parameter tool this is nearly adequate, but the 404/empty case and stale-vs-findings interaction are left unstated, which an agent deciding how to present results would want.

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 75% and the description contributes nothing about parameters — the one undocumented parameter, designId, is only implied by 'a design's ... result'. Baseline 3 applies given the schema already documents token, agentName, and agentModel in detail.

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 ('Read a design's latest design-guidelines result') and immediately separates itself from siblings by naming the three ways a result can come to exist (editor user, ui_builder_check_design, ui_builder_record_guidelines). An agent can distinguish this read-only retrieval tool from the check/record tools 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 Guidelines4/5

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

The provenance clause makes clear this tool retrieves existing results rather than producing new ones, which implicitly routes an agent to ui_builder_check_design or ui_builder_record_guidelines when it needs to create a result. It never states an explicit exclusion ('do not use this to run a check') or a when-not condition, so it falls short of full 5-level guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.