Skip to main content
Glama
adsandcode

mcp-server-serp-title-width

by adsandcode

check_title_files

Reads tags from local HTML files or directories and checks their rendered pixel width against Google search result limits, flagging titles likely to be truncated or violate boilerplate rules.

Instructions

Read the first element from local .html/.htm files and run the same pixel-width checks as measure_titles across all of them. Each path may be a file (read whatever its extension) or a directory; directories are searched recursively for .html and .htm files, skipping node_modules and names that start with '.', and stop with an error after 20000 files. Only the title in the document head counts; titles in comments, , and similar are ignored. Reads only, never writes. Character references &amp; &lt; &gt; &quot; &apos; &nbsp; and numeric references are decoded before measuring. Model: Google search results on google.com with the zh-TW (Traditional Chinese, Taiwan) interface, Chrome on Windows, title font Arial 22px, desktop result column 652px, mobile first line 343px, measured 2026-09-18. Full-width characters (East Asian Width W or F: CJK ideographs, kana, Hangul, full-width punctuation, most emoji) count 22px; printable ASCII uses Arial's own advance widths at 22px; other half-width characters count 12.2px; zero-width characters count 0 and each grapheme cluster (such as an emoji ZWJ sequence) counts once. Kerning is not modelled. Tiers: safe <= 572px, long > 572px (warning), edge > 630px (must fix), cut > 648px (must fix). Japanese and Korean use the same full-width assumption but were not separately measured. Google may rewrite title links, so a passing title is not a guarantee of what is displayed. Fails: tier edge or cut; more than 2 separators (、 or ,) in a title over 572px; more than 1 full-width question mark (?); a trailing phrase after the last 、 or , shared by more than 2 titles in the same call (boilerplate; a site name after a colon is not counted, as Google suggests that pattern); empty title; the same 2-4 ideograph run 3 or more times (keyword stuffing). Warnings: tier long; more than 2 separators in a title within 572px; text before the first ?:、,wider than the 343px mobile first line.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsYesAbsolute paths to HTML files or directories on this machine, e.g. a static site's build output.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so thoroughly: it states that the tool is read-only, never writes, recursively searches directories, skips node_modules and dot-prefixed names, errors after 20000 files, decodes character references, and details the exact measurement model, tiers, failure conditions, and warnings.

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?

The description is long but front-loaded with purpose, path handling, and the most important behavioral rules. The measurement model and fail/warning criteria are dense yet relevant; the single-paragraph structure makes it harder to scan than a headed breakdown would.

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?

There is no output schema, so the description must explain what the checks produce. It does this by defining the tier thresholds and enumerating failure and warning conditions, along with caveats about Google rewriting titles and Japanese/Korean not being separately measured.

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 baseline is a 3, but the description adds meaningful path semantics beyond the schema: each path may be a file or directory, file extensions are read as given, directories are searched recursively, and certain directories are skipped.

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?

The description states a specific verb and resource: reading the first <title> element from local .html/.htm files and running pixel-width checks. It explicitly distinguishes the tool from its sibling by saying it runs the same checks as measure_titles across all of the given files.

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 description makes clear that this is the batch/local-file counterpart to measure_titles and explains directory recursion, skipping rules, and the 20000-file limit. It does not explicitly state when to prefer measure_titles over this tool, so it falls short of full when/when-not guidance.

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

Deploy Server

Other Tools