Skip to main content
Glama

user_agent_parse

Parses a User-Agent header string to extract browser, operating system, device type, and rendering engine details. Use it to identify client capabilities from server logs or request headers without any network lookups.

Instructions

Parse a User-Agent header string into structured browser, OS, device type, and rendering-engine components. Use to identify client capabilities from a raw UA string, e.g. when analysing server logs or request headers; does not perform any network lookups — entirely local parsing. Runs synchronously using the ua-parser-js library with no external calls. Returns a JSON object with browser.name, browser.version, os.name, os.version, device.type, device.vendor, and engine.name fields; unknown fields are empty strings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uaYesFull 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".
Behavior5/5

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

With no annotations provided, the description fully discloses behavioral traits: it runs synchronously, uses the ua-parser-js library, makes no external calls, and returns specific fields with empty strings for unknowns. This is comprehensive and leaves no ambiguity.

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?

The description is brief (four sentences) but packs all necessary information front-loaded. No redundant words; every sentence adds value.

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?

Despite having no output schema, the description enumerates the return fields (browser.name, etc.) and explains behavior for unknown values. It covers input, processing, output, and constraints, making it fully self-contained for a simple parsing tool.

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 schema already provides a description for the 'ua' parameter with an example. The tool-level description adds context on the output structure but does not significantly enhance understanding of the parameter beyond what the schema provides. Schema coverage is 100%, so baseline 3 is appropriate.

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 clearly states the tool's function: parsing a User-Agent header into structured components (browser, OS, device, engine). It uses a specific verb ('Parse') and resource, and distinguishes itself from sibling tools which are either network or encoding utilities.

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 provides a clear use case (analyzing server logs or request headers) and explicitly states that it performs no network lookups, which sets user expectations. However, it does not explicitly mention when not to use it or provide alternative tools, though no clear alternative exists among siblings.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hikmahtech/drwhome'

If you have feedback or need assistance with the MCP directory API, please join our Discord server