Skip to main content
Glama
krusch-frontend-mcp

krusch-frontend-mcp

by kruschdev

analyze_layout_structure

Read-onlyIdempotent

Analyzes HTML structure to recommend Flexbox or Grid and returns the CSS needed to implement the layout.

Instructions

Accepts an HTML structure and returns the optimal CSS layout approach (Flexbox vs Grid) and the necessary CSS.

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": {
      "htmlString": "<htmlString>"
    },
    "name": "analyze_layout_structure"
  }
}

Input Schema

NameRequiredDescriptionDefault
htmlStringYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered and the bar is lower. The description does add output behavior (it recommends Flexbox vs Grid and emits the CSS), but says nothing about how 'optimal' is decided, whether it fails gracefully on invalid markup, or what happens with inline styles.

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?

A single front-loaded sentence with no filler; the input and the two-part output are stated in order. It is efficient, though the terseness leaves little earned detail beyond restating the contract.

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

Completeness2/5

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

There is no output schema, so the description carries the burden of describing return values, and 'the necessary CSS' is vague about form (snippet vs full stylesheet) and whether a rationale is included. Combined with an entirely undocumented required parameter, the definition is thin for a tool whose output drives downstream styling decisions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%: the only parameter, htmlString, is documented as a bare string with no hint of format. The description says only 'an HTML structure', without clarifying whether it expects a full document, a fragment, whether class names or existing styles affect the analysis, or any size limits.

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?

States a specific input (HTML structure) and a specific output (recommended layout approach, Flexbox vs Grid, plus the CSS), so the verb and resource are unambiguous. It does not contrast itself with any sibling such as generate_component_styles, so an agent must infer the boundary from names alone.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance, no mention of alternatives, and no prerequisites. The use case is only loosely implied by 'accepts an HTML structure', leaving the agent to guess whether this is the right tool versus the many other CSS/design siblings.

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