Skip to main content
Glama

Agent Data Tools: Prices and DeFi

Smart contract risk check: proxy, bytecode and supply red flags for a Base contract before approving it

contract_risk
Read-only

Check a Base contract before you approve or call it: a low to critical risk tier with named flags (proxy, proxy with no implementation, tiny bytecode, zero token supply), plus bytecode size, the EIP-1967 implementation slot and ERC-20 owner, renounced and paused reads. Unreadable reads are null; EOAs return not-applicable. Limited heuristics, not a full security audit. Use before approving a spender or calling an unfamiliar Base contract. Example: address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Price $0.01/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

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": {
      "address": "<address>"
    },
    "name": "contract_risk"
  }
}

Input Schema

NameRequiredDescriptionDefault
addressYesBase chain contract address, 0x-prefixed 20-byte hex

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/openWorld/non-destructive, and the description reinforces that consistently ('Reads or computes only and changes nothing') while adding genuinely new behavior: per-call charging at $0.01 with 10 free calls, failed calls free, and repeats not free — which explains the idempotentHint=false. It also defines edge-case semantics (unreadable reads return null, EOAs return not-applicable) and discloses the heuristic's limitations.

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?

Purpose and trigger are front-loaded, followed by return contents, behavioral caveats, and pricing in a logical order, with no filler sentences. It is a dense single paragraph that could be split into bullets for faster scanning of the flag list and the pricing terms.

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?

No output schema exists, so the description carries the return-value burden and does so fully: risk tier, named flags, raw reads, null/not-applicable fallbacks, and the caveat about heuristic limits. Pricing and payment paths (x402 USDC, card key via /credits) round out what an agent needs before invoking.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With one parameter at 100% schema coverage, the schema already carries the format burden. The description adds value beyond it by supplying a concrete worked example address, grounding the 0x-prefixed 20-byte Base-chain requirement in practice.

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 (risk-check a Base contract) and enumerates exactly what comes back: a low-to-critical tier with named flags (proxy, missing implementation, tiny bytecode, zero supply), bytecode size, EIP-1967 slot, owner/renounced/paused reads. It also bounds scope against a related concept by calling itself 'limited heuristics, not a full security audit.' An agent knows what this returns 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 trigger: 'Use before approving a spender or calling an unfamiliar Base contract,' which is exactly the decision point an agent needs. It does not name siblings such as base_proxy, base_is_contract, or audit_contract, so the agent must infer when a narrower proxy/contract-existence check is preferable.

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