Skip to main content
Glama

User agent parser

hopi_user_agent_parser
Read-onlyIdempotent

Parse a user agent string into its parts: browser and version, rendering engine, operating system and version, device type (mobile, tablet or desktop) and whether it looks like a bot or crawler. Uses an ordered pattern table (Edge before Chrome, Chrome before Safari). User agent strings can be spoofed, so results are best-effort, not proof. Source: https://hopi.co.uk/user-agent-parser/

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uaYesThe user agent string to parse

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
osYes
botYes
deviceYes
engineYes
browserYes
summaryYes
source_urlYesThe tool's page on hopi.co.uk (cite or open to check the figure)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / required
      Added value: +[
      +  "bot",
      +  "browser",
      +  "device",
      +  "engine",
      +  "os",
      +  "source_url",
      +  "summary"
      +]
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations provide readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is already established. The description adds valuable behavioral context beyond those: the use of an ordered pattern table (Edge before Chrome, Chrome before Safari), which explains why matching may not be intuitive, and the explicit spoofing caveat framing results as best-effort. Also cites the source for verification. This exceeds the burden given annotation coverage.

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?

Four sentences total. The first sentence front-loads the core purpose and output list. The second adds essential algorithm detail. The third is a critical caveat. The fourth is the source link. Each sentence earns its place, though the source line could be considered optional metadata in a tool description.

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?

For a single-parameter, read-only parser with an output schema, the description tells the agent everything needed: what it parses, what it returns, how the algorithm behaves, the reliability caveat, and the source. Combined with the annotations and output schema, no meaningful gap remains for correct invocation.

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 coverage is 100% and the single parameter 'ua' is already described as 'The user agent string to parse'. The description reinforces that the string is a user agent and outlines what will be extracted, but doesn't add formatting, length, or validation syntax beyond the schema. Baseline 3 is appropriate when schema fully documents the parameter.

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 action ('Parse a user agent string') and enumerates the exact output components: browser/version, rendering engine, OS/version, device type, and bot detection. It also distinguishes itself from the sibling URL parser and other string utilities by naming its unique resource (user agent strings). This is a clear, specific verb+resource statement.

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 implies when to use it: whenever a user agent string needs decomposition. It does not explicitly name alternatives or exclusions, but among ~170 sibling tools the resource is unique enough that no alternative exists. The caution about spoofing adds context for when results should not be treated as authoritative, which is helpful 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.

Resources