Skip to main content
Glama

User agent parser

user_agent_parse
Read-only

Parse a User-Agent header into browser, operating system, device and rendering engine. Use when reading server logs or request headers. Runs locally with no network call. Returns JSON {browser:{name,version}, os:{name,version}, device:{type,vendor,model}, engine:{name}}; unknown fields are empty strings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uaYesThe full User-Agent header value.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / ua / description
      Previous value: -"Full User-Agent header value as sent by the browser or HTTP client, e.g. \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36\"."New value: +"The full User-Agent header value."
  2. Changed1 schema field changed
    • changedInput schema / properties / ua / description
      Previous value: -"User-Agent header value"New value: +"Full User-Agent header value as sent by the browser or HTTP client, e.g. \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36\"."
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description adds valuable behavioral details: execution runs locally with no network call, the exact JSON return shape is specified, and unknown fields are revealed to be empty strings. This is particularly important because there is no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences: the first states the primary function, the second gives usage context, and the third details return structure and edge-case behavior. Every sentence earns its place with no redundancy.

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 simple, single-parameter parser, the description is fully self-sufficient. It covers purpose, usage context, runtime behavior, return shape, and unknown-value handling, so an agent can invoke it correctly without any external reference.

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?

The input schema already fully describes the single 'ua' parameter with 100% coverage, so the description doesn't need to add parameter-level detail. It stays at the baseline 3 since there is no extra semantic value beyond the schema.

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 opens with a precise verb and resource: 'Parse a User-Agent header into browser, operating system, device and rendering engine.' This clearly distinguishes the tool from sibling decode/parse utilities and states exactly what output categories are produced.

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 gives explicit context for when to use the tool: 'Use when reading server logs or request headers.' It also notes it runs locally with no network call, which helps an agent choose it over network-dependent sibling tools, though it doesn't explicitly list exclusions or alternative tools.

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