Skip to main content
Glama
IPGeolocation MCP Server

IPGeolocation MCP Server

User-Agent Parser

parse_user_agent
Read-only

Parses a supplied user-agent string into structured details such as browser name, version, device, engine, and operating system, helping identify client type and malformed or scripted strings.

Instructions

Read-only custom user-agent parsing via POST /v3/user-agent. Paid only for POST payload parsing. Cost: 1 credit per successful string. Parses only the explicit uaString value; it cannot read caller headers or transport metadata.

Returns { user_agent_string, name, type, version, version_major, device, engine, operating_system }. Type fields can identify desktop/mobile clients, robots, malformed or scripted strings, anonymized strings, or unknown values. uaString must be the exact non-empty user-agent string; empty/null strings are rejected locally before any API call. force_refresh bypasses cached data, makes a new upstream request, and can consume credits. bulk_parse_user_agent handles multiple strings.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "uaString": "<uaString>"
    },
    "name": "parse_user_agent"
  }
}

Input Schema

NameRequiredDescriptionDefault
uaStringYesThe user-agent string to parse (e.g. Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36).
force_refreshNoDefault false. When true, bypasses cached user-agent parsing data; a successful refresh makes a new upstream request and can consume credits.

Output Schema

NameRequiredDescriptionDefault
dataNoPresent on success: API result after field selection, redaction, and transport limits.
pageNo
errorNoPresent on failure, with isError: true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.0.4
    • addedInput schema / properties / uaString / pattern
      Added value: +"\\S"
  2. Changed2 schema fields changedv2.0.3
    • removedOutput schema / properties / data / additionalProperties / anyOf
      Removed value: -[
      -  {
      -    "type": "null"
      -  },
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "array"
      -  },
      -  {
      -    "type": "object"
      -  }
      -]
    • addedOutput schema / properties / data / additionalProperties / type
      Added value: +[
      +  "null",
      +  "boolean",
      +  "number",
      +  "string",
      +  "array",
      +  "object"
      +]
  3. Addedv2.0.1
  4. Removedv2.0.0
  5. Changed1 schema field changedv1.0.16
    • addedInput schema / properties / uaString / minLength
      Added value: +1
  6. Changed1 schema field changedv1.0.15
    • changedInput schema / properties / force_refresh / description
      Previous value: -"Default false. Leave unset unless the user asks to refresh or rerun."New value: +"Default false. Set true only when the user asks to refresh cached user-agent parsing data; a successful refresh makes a new upstream request and can consume credits."
  7. First observedv1.0.10

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnlyHint/openWorldHint annotations, the description discloses the credit model (1 credit per successful string), that force_refresh triggers a new upstream request and can consume credits, that validation fails locally before any API call, and what the type field can return (robots, scripted, anonymized, unknown). That is exactly the operational context the 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-loaded with the endpoint, cost, and scope in the first two sentences, then the return shape, then the alternative. Slightly dense: 'Paid only for POST payload parsing' and the credit sentence overlap, and the field list partly duplicates the output schema.

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?

Covers cost, caching, validation, scope limits, and the sibling alternative for a two-parameter tool with an output schema present. The return-field enumeration is redundant with the output schema but harmless, and nothing an agent needs to call this correctly is missing.

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 both parameters are already documented and the baseline would be 3. The description still adds meaning: it stresses that uaString must be the exact string rather than a derived or truncated value, and clarifies that rejection of empty values happens locally pre-request, which changes the agent's error-handling expectations.

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?

States a specific verb and resource ('user-agent parsing via POST /v3/user-agent') and scopes it to a single explicit string. The final sentence names the sibling bulk_parse_user_agent and the condition that separates them, so an agent can choose without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use and when-not-to-use conditions: only the explicit uaString is parsed, caller headers and transport metadata are out of scope, empty/null strings are rejected locally, and multi-string work belongs to bulk_parse_user_agent. force_refresh is flagged with its cost consequence before the agent opts in.

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