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. Price: $0.001 USDC per successful call (x402, 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

A4.3/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: it discloses hard input limits, explicit rejection behavior, error-vs-drop semantics, and — critically — that calls cost $0.001 USDC via x402 on Solana with an HTTPS alternative endpoint. Cost and payment mechanics are exactly the kind of operational context annotations cannot express.

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 core definition and every sentence contributes a real rule. It is dense and unparagraphed — the payment/endpoint sentence sits flush against CSS semantics — which slightly hurts scannability, but little is genuinely wasteful.

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?

For a 2-parameter tool with no output schema, it covers specificity rules for the tricky pseudo-classes, list handling, tie-breaking, limits, and pricing. The remaining gap is the exact shape of the returned specificity (numeric triple? string? how `against` results are presented), which an agent must infer.

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 the load. It does add real meaning for `selector` (supported CSS Level 4 constructs, rejection of backslashes/namespaces, 50-item cap), but the `against` parameter is only described cryptically as 'against compares those numbers', leaving an agent unsure whether it takes a second selector and what comparison result comes back.

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: 'Specificity of one CSS selector, from Selectors Level 4.' This immediately separates it from unrelated siblings like css_length, css_angle, or html_select, which compute different things on different inputs.

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 concrete operating constraints — max 50 selectors per list, backslashes and namespaces rejected, bad selectors are errors rather than dropped — which tell an agent when the tool will refuse. It also explains what `against` is for. It stops short of naming when to prefer a sibling or a mental-model alternative, so not a 5.

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