Skip to main content
Glama

ScorpTech x402 Tools

Selector Specificity

selector_specificity
Read-onlyIdempotent

Specificity of one CSS selector, from Selectors Level 4. a is IDs. b is classes, attributes and pseudo-classes. c is elements and pseudo-elements. :is(), :not() and :has() use only the most specific argument. :where() is zero. :nth-child() and :nth-last-child() are one pseudo-class, plus the most specific selector after of. :host() and :host-context() add one pseudo-class plus the argument. ::slotted() adds one pseudo-element plus the argument. ::part() is one pseudo-element. A comma list returns every selector; the top numbers are the most specific, the first on a tie. against compares those numbers. At most 50 selectors in a list. Backslashes and namespaces are rejected. A bad selector is an error, not dropped. Returns JSON with: a, b, c, tuple, most, count, selectors. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: GET https://scorptech.it.com/api/x402/v1/selector-specificity

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": {
      "selector": "<selector>"
    },
    "name": "selector_specificity"
  }
}

Input Schema

NameRequiredDescriptionDefault
againstNo
selectorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds genuinely new behavioral facts: hard input limits (50 selectors), rejection rules for backslashes and namespaces, fail-loud error handling ('a bad selector is an error, not dropped'), the return field list, and a per-call payment requirement of $0.001 USDC via x402 on Base or Solana. The paid-call model and an equivalent HTTPS endpoint are details an agent could not infer from annotations alone. Minor gap: no statement of rate limits or failure/payment behavior on an invalid selector.

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?

Facts are front-loaded and each sentence carries specific rules (a/b/c mapping, special pseudo-class handling, size limit, output fields, price), with no filler. It is dense and slightly telegraphic, reading as a spec list rather than prose, but nothing is redundant.

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 no output schema, the description compensates by enumerating the JSON return keys (a, b, c, tuple, most, count, selectors) and explaining 'most'. It also covers limits, error semantics, and payment. The only real hole is the missing definition of 'against', which prevents fully correct invocation for the optional second parameter.

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 coverage is 0%, so the description must carry parameter meaning. It does this well for 'selector' — comma-list resolution, 'most' selection with first-wins tie-breaking, and rejected syntax — but 'against' gets only the elliptical clause 'against compares those numbers', leaving it unclear whether it takes a CSS selector, a tuple, or an expected specificity value. One of two parameters is effectively undocumented.

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 opening sentence names the exact resource ('Specificity of one CSS selector, from Selectors Level 4') and the computation performed, and nothing in the sibling list of math/encoding tools overlaps with it. An agent knows immediately what domain and result to expect.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the text explains selector semantics, tie-breaking, the 50-selector cap, and that backslashes/namespaces are rejected, which tells the agent when input will fail. However, there is no explicit statement of when to use this versus any alternative, and the role of the optional 'against' parameter is only alluded to ('against compares those numbers') rather than framed as a use case.

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