Skip to main content
Glama

Parse a User-Agent (browser, OS, device, bot / AI crawler / AI agent)

parse_user_agent
Read-onlyIdempotent

Parse one User-Agent string. Returns browser, engine, OS, device type and CPU (ua-parser-js 1.0.41), and whether it is a known bot, search crawler, AI crawler (with its AI purpose) or an AI agent acting for a user (is_ai_agent, ai_agent_kind fetch | browsing), plus the bot name, operator, robots.txt token and operator docs link from a curated list of 151 bots (list 2026-10-08). verified is always false: the User-Agent is self-reported and UAParse does no IP or reverse-DNS checks. Read-only, no network lookups. Same engine and limits as the UAParse JSON API (POST /v1/parse); each call is one lookup. UAParse is independent and not affiliated with Meta, OpenAI, Google, Anthropic, Amazon, Perplexity or Mistral AI.

Input Schema

NameRequiredDescriptionDefault
uaYesThe User-Agent string to parse, exactly as sent in the User-Agent header.
include_rawNoAlso return the full POST /v1/parse JSON in structuredContent.raw. Larger output.

Output Schema

NameRequiredDescriptionDefault
osYes
uaYesThe parsed User-Agent (clipped to 300 characters; see ua_length)
botNoPresent when is_bot is true. Fields that are unknown are omitted.
cpuYes
rawNoFull POST /v1/parse response (only when include_raw is true)
tierNo
cachedNo
deviceYes
engineYes
is_botYes
parserNo
browserYes
summaryYesOne-line plain-English verdict
versionYes
ua_lengthYes
is_ai_agentYestrue only for User-Agents the operator documents as acting live for an individual user
list_versionYes
is_ai_crawlerYes
is_search_crawlerYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations, which only declare read-only/idempotent/no-open-world. The description adds that `verified` is always false because the UA is self-reported and no IP or reverse-DNS checks are performed, discloses the underlying parser and version (ua-parser-js 1.0.41), the curated bot-list size and snapshot date (151 bots, 2026-10-08), and the independent/non-affiliated stance. This is exactly the behavioral context annotations cannot carry.

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-loads the core action and result set in the first sentence, then layers caveats and provenance. It is dense but not padded; the corporate non-affiliation sentence and list snapshot date are borderline, yet each clause carries informational weight.

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

Completeness4/5

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

With an output schema present the return shape need not be explained, and the description still supplies the essential caveat (verified always false) plus provenance. The one soft spot is 'same engine and limits as the UAParse JSON API,' which alludes to limits without stating them (e.g., rate limits), leaving an agent to guess at throughput constraints.

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 100% and both parameters (ua, include_raw) are fully documented in the schema, so the baseline is 3. The description adds output semantics (what the classification fields mean) rather than any additional parameter meaning, so it does not raise the score above baseline.

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?

Opens with a specific verb + resource ('Parse one User-Agent string') and enumerates exactly what it extracts (browser, engine, OS, device, CPU, bot/AI-crawler classification). There are no siblings to distinguish from, but the scope statement 'one User-Agent string' and the enumerated outputs leave no ambiguity about what the tool does.

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?

Gives clear operative context: parse the UA exactly as sent in the header, each call is one lookup, read-only with no network lookups, and the same engine/limits as the JSON API. It does not state explicit when-not-to-use conditions or name alternatives, so it falls short of a 5, but the usage envelope is clear.

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