Skip to main content
Glama

ChainGuard Web3 Security & DeFi MCP

check_frontend_hijack

Read-onlyIdempotent

Inspect a live DeFi web application HTTPS URL and optional EIP-1967 proxy contract for supply-chain hijack indicators: missing Content-Security-Policy (CSP), external <script> tags lacking Subresource Integrity (integrity="sha384-..."), suspicious third-party domains, and EIP-1967 implementation slot state. Read-only inspection over HTTPS and EVM RPC (5 free calls/hour per IP or unlimited with X-API-Key). Returns JSON with url, hijack_risk_score (0-100), verdict (PASS, WARN, BLOCK), scripts_analyzed, missing_sri_count, and proxy_implementation.

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": {
      "url": "<url>"
    },
    "name": "check_frontend_hijack"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesFull `https://` URL of the DeFi web application frontend to inspect for script integrity and HTTP security headers (e.g. `https://app.uniswap.org`).
proxyNoOptional 42-character EVM EIP-1967 proxy contract address (`0x...`) to read its on-chain implementation slot (`0x360894...`). Leave empty to skip proxy check.
networkNoEVM network for reading the optional EIP-1967 proxy contract (`base`, `ethereum`, `arbitrum`, `polygon`, `optimism`, `bsc`). Defaults to `base`.base

Output Schema

NameRequiredDescriptionDefault
urlYes
verdictYes
hijack_risk_scoreYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / network / description
      Added value: +"EVM network for reading the optional EIP-1967 proxy contract (`base`, `ethereum`, `arbitrum`, `polygon`, `optimism`, `bsc`). Defaults to `base`."
    • addedInput schema / properties / network / enum
      Added value: +[
      +  "base",
      +  "ethereum",
      +  "arbitrum",
      +  "polygon",
      +  "optimism",
      +  "bsc"
      +]
    • addedInput schema / properties / proxy / description
      Added value: +"Optional 42-character EVM EIP-1967 proxy contract address (`0x...`) to read its on-chain implementation slot (`0x360894...`). Leave empty to skip proxy check."
    • addedInput schema / properties / url / description
      Added value: +"Full `https://` URL of the DeFi web application frontend to inspect for script integrity and HTTP security headers (e.g. `https://app.uniswap.org`)."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "hijack_risk_score": {
      +      "type": "integer"
      +    },
      +    "url": {
      +      "type": "string"
      +    },
      +    "verdict": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "url",
      +    "hijack_risk_score",
      +    "verdict"
      +  ],
      +  "type": "object"
      +}
  2. First observed

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, openWorld, and non-destructive, so safety is covered. The description adds genuinely new operational context: inspection happens over HTTPS plus EVM RPC and is throttled to 5 free calls/hour per IP or unlimited with an X-API-Key, which an agent must know before retry loops. It does not discuss timeouts, failure modes, or what happens when the URL is unreachable.

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 action and target, followed by the indicator list and then operational constraints; no filler sentences. The parenthetical enumerations of header and attribute examples are dense but each earns its place by making the check verifiable.

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 rich annotations, 100% schema coverage, and an output schema, the definition covers the remaining gaps well by disclosing rate limits, auth, transport, and the shape of the verdict. The recap of return fields is mildly redundant given the output schema, and error behavior is unstated, keeping it just short of full completeness.

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 100%, so the schema already documents url, proxy, and network including the enum and defaults. The description only restates the optional proxy/EIP-1967 concept and adds no new parameter semantics such as address validation rules or what happens if a proxy is supplied without a supported network. Baseline 3 applies when the schema carries the weight.

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 ('Inspect') and resource ('live DeFi web application HTTPS URL and optional EIP-1967 proxy contract'), then enumerates exactly what it looks for: missing CSP, external scripts lacking SRI, suspicious third-party domains, and EIP-1967 implementation slot state. This is clearly distinct from sibling checks like check_eip7702_delegation or check_mcp_poisoning without needing to open 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 Guidelines3/5

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

The context is clear (frontend supply-chain hijack screening) and the optional proxy parameter explains when to include the on-chain portion, but the description never states when to prefer this tool over a sibling or when it is not appropriate. Usage is implied by the enumeration of indicators rather than explicitly routed.

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.