Skip to main content
Glama

parse_user_agent

Read-onlyIdempotent

utilpeek: parse a User-Agent string. For known x402 monitors and indexers with call rates use identify_x402_client. A User-Agent is self-reported and easy to fake; is_bot is a heuristic (declared crawlers, AI assistants, HTTP libraries, headless browsers). Parsed with ua-parser and the uap-core regexes (Apache-2.0). Typically under 0.1 s (first call up to 0.5 s). Price: USD 0.001. Free: 10 utilpeek calls per IP per UTC day. Docs: https://tanod.dev/learn/user-agent-parser-api.html

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": {
      "user_agent": "<user_agent>"
    },
    "name": "parse_user_agent"
  }
}

Input Schema

NameRequiredDescriptionDefault
user_agentYesUser-Agent string (1-1024 chars).

Output Schema

NameRequiredDescriptionDefault
osNo
noteNo
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
clientNo
deviceNo
frozenNo
is_botNo
lengthNo
sourceNo
browserNo
is_mobileNo
is_tabletNo
bot_reasonNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / client
      Added value: +{
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
  2. Changed2 schema fields changed
    • addedOutput schema / properties / frozen
      Added value: +{
      +  "type": [
      +    "array",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / is_tablet
      Added value: +{
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
  3. Changed6 schema fields changed
    • removedInput schema / properties / user_agent / title
      Removed value: -"User Agent"
    • removedInput schema / title
      Removed value: -"parse_user_agentArguments"
    • removedOutput schema / properties / browser / properties
      Removed value: -{
      -  "family": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "major": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "minor": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "patch": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "version": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  }
      -}
    • removedOutput schema / properties / device / properties
      Removed value: -{
      -  "brand": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "family": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "model": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  }
      -}
    • removedOutput schema / properties / os / properties
      Removed value: -{
      -  "family": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "major": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "minor": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "patch": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "version": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  }
      -}
    • removedOutput schema / properties / source / properties
      Removed value: -{
      -  "library": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "license": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "regexes": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "url": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  }
      -}
  4. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "bot_reason": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "browser": {
      +      "properties": {
      +        "family": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "major": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "minor": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "patch": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "version": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "device": {
      +      "properties": {
      +        "brand": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "family": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "model": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "error": {
      +      "description": "Only on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object."
      +    },
      +    "is_bot": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "is_mobile": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "length": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "note": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "os": {
      +      "properties": {
      +        "family": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "major": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "minor": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "patch": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "version": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "source": {
      +      "properties": {
      +        "library": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "license": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "regexes": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "url": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  5. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent/openWorld annotations: the UA is self-reported and easy to fake, is_bot is explicitly a heuristic over declared crawlers, AI assistants, HTTP libraries and headless browsers, parsing comes from ua-parser/uap-core, and latency (~0.1 s, ~0.5 s first call), price, and the free 10-calls-per-IP-per-day quota are disclosed.

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 action in the first clause and keeps every later sentence informative (alternative, caveat, engine, latency, pricing). The Apache-2.0 licensing parenthetical is the only marginal filler, so it falls just short of a 5.

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 tool with an output schema and rich annotations, nothing an agent needs is missing: routing alternative, heuristic caveat, performance envelope, and cost model are all present, and return values are covered by the output schema.

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?

There is a single required parameter whose schema already documents it at 100% coverage with a 1-1024 char bound. The description adds no format or syntax guidance beyond the schema, so the baseline of 3 applies.

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 ('parse a User-Agent string') and the annotation title enumerates the output dimensions (browser, OS, device, bot). It also names the sibling identify_x402_client and the condition that selects it, so the agent can distinguish this tool without opening a schema.

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 an explicit exclusion: for known x402 monitors and indexers with call rates, use identify_x402_client instead. It does not cover when to prefer this over parse_url or other parsers, but the primary routing decision for this tool is stated clearly.

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