Skip to main content
Glama

Uniswap v4 Hook-Delta & Permission Bitflag Audit ($0.02)

defi_uniswap_v4_hook_delta_audit
Idempotent

[Paid x402 / X-Bazaar-Key: 0.02 USDC] Uniswap v4 Hook-Delta & Permission Bitflag Diagnostic Linter: decodes all 14 Uniswap v4 hook address permission flags (beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta, liquidity gates) and fee caps. Non-custodial diagnostic only; 0 bps fees. Also available at alias /v1/x402/defi/uniswap-v4-hook-inspector.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "defi_uniswap_v4_hook_delta_audit"
  }
}

Input Schema

NameRequiredDescriptionDefault
lp_fee_bpsNoPool LP fee in basis points (e.g. 30)
hook_addressNoUniswap v4 hook contract 0x address on Base (low 14 bits encode permissions)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare openWorldHint=true and idempotentHint=true, but the description adds genuinely new operational context: a $0.02 USDC x402 charge, the required X-Bazaar-Key auth header, a non-custodial guarantee, and an alias path. Note the mild tension between 'diagnostic only' and readOnlyHint=false, though the payment flow plausibly explains the write-flagged annotation rather than contradicting it.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single compact passage, but the first thing an agent reads is payment and alias metadata rather than the tool's purpose, so the actual function is not front-loaded. The alias URL and '0 bps fees' remark are useful but consume attention ahead of the core capability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description carries the burden of explaining what comes back — yet it says nothing about whether the result is a decoded flag list, a permission summary, or warnings about delta-returning hooks. With zero required parameters and an openWorld network read, an agent also gets no hint of what happens if hook_address is omitted.

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 description coverage is 100% and the hook_address field already explains that the low 14 bits encode permissions, so the description adds little beyond restating the bitflag concept. The lp_fee_bps parameter is never addressed in the description, leaving fee-cap interpretation to the schema alone. Baseline 3 applies when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource: it 'decodes all 14 Uniswap v4 hook address permission flags (beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta, liquidity gates) and fee caps.' That is far more concrete than the bare name, though the leading paid-endpoint bracket dilutes the opening and no sibling (e.g. defi_clanker_v4_config_linter, defi_unsigned_swap_calldata_linter) is named for contrast.

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 'Non-custodial diagnostic only' and '0 bps fees' lines imply this is a read/analysis tool rather than an execution path, so usage is implied. But there is no explicit statement of when to choose this over adjacent linters like defi_clanker_v4_config_linter or suite_smart_contract_security, and no prerequisites beyond the payment note.

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