# get_contract_info

Get metadata about a verified smart contract: name, compiler, classification, supported adapters, and counts of functions and events. Accepts either a curated slug (uni-eth, usdc-base, …) or chain+address.

Agent View of the PolicyLayer registry record for `get_contract_info`. HTML page: https://policylayer.com/tools/defi-io-smartcontract/get-contract-info

## Facts

- Tool: `get_contract_info`
- Server: Smarts Md (`defi-io/smartcontract`) — https://policylayer.com/tools/defi-io-smartcontract.md
- Homepage: https://github.com/defi-io/smartcontract
- Risk category: Read (Low risk)
- Registry record: grade B, identity unverified
- Server rate-limited: no
- Parameters: 3
- Recommended policy verdict: Allowed

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `slug` | string | no | Curated slug like 'uni-eth' or 'univ3-usdc-weth-eth'. Alternative to chain+address. |
| `chain` | string | no | Chain slug: eth, base, arbitrum, optimism, or polygon. Required unless `slug` is given. |
| `address` | string | no | The 0x-prefixed EVM contract address. Required unless `slug` is given. |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

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

## Why get_contract_info is rated Low

This tool performs read-only queries against a smart contract information database. It returns static metadata about deployed contracts without any side effects, state changes, or code execution. The blast radius of misuse is minimal—an attacker could only retrieve publicly available contract information, which poses no direct risk to systems or users.

From the tool's own definition: "Tool retrieves metadata about smart contracts: name, compiler, classification, supported adapters, and counts of functions and events. Description explicitly indicates data retrieval ('Get metadata') with no modification, deletion, or execution capabilities."

## Use case

AI agents call get_contract_info to retrieve information from Smarts Md without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Smarts Md:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "get_contract_info": {}
  }
}
```

## Other tools on Smarts Md (4)

- `get_erc20_info` — Read — https://policylayer.com/tools/defi-io-smartcontract/get-erc20-info.md
- `get_uniswap_v3_pool` — Read — https://policylayer.com/tools/defi-io-smartcontract/get-uniswap-v3-pool.md
- `inspect_address` — Read — https://policylayer.com/tools/defi-io-smartcontract/inspect-address.md
- `read_contract_state` — Read — https://policylayer.com/tools/defi-io-smartcontract/read-contract-state.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=defi-io-smartcontract · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/defi-io-smartcontract
