# get_example

Get the full source code of an SDK example. Use list_examples first to see available examples.

Agent View of the PolicyLayer registry record for `get_example`. HTML page: https://policylayer.com/tools/com-1inch-business-mcp/get-example

## Facts

- Tool: `get_example`
- Server: 1inch MCP (`https://api.1inch.com/mcp/protocol`) — https://policylayer.com/tools/com-1inch-business-mcp.md
- Homepage: https://github.com/1inch/1inch-ai
- Risk category: Read (Low risk)
- Registry record: grade F, identity unverified
- Server auth posture: open
- Server rate-limited: no
- Parameters: 2 (1 required)
- Recommended policy verdict: Allowed

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `file` | string | no | Optional: specific file path to retrieve (e.g., 'src/evm/swap-native.ts'). If omitted, returns all files. |
| `name` | string | yes | Example name (e.g., '@1inch-examples/intent-swap', '@1inch-examples/limit-order') |

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_example",
    "arguments": {
      "name": "<name>"
    }
  }
}
```

## Why get_example is rated Low

This is a straightforward read operation that queries and returns example source code. The tool has no side effects, does not execute code, and cannot modify or delete data. The blast radius of misuse is minimal—an agent could only retrieve examples that are presumably already public or documented.

From the tool's own definition: "Tool retrieves and returns source code of SDK examples. The description explicitly states 'Get the full source code' which is a read/retrieval operation. No modification, execution, or deletion occurs."

Risk signals: Accepts file system path (file)

## Use case

AI agents call get_example to retrieve information from 1inch MCP 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 1inch MCP:

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

## Other tools on 1inch MCP (8)

- `orderbook` — Financial — https://policylayer.com/tools/com-1inch-business-mcp/orderbook.md
- `product_api` — Financial — https://policylayer.com/tools/com-1inch-business-mcp/product-api.md
- `swap` — Financial — https://policylayer.com/tools/com-1inch-business-mcp/swap.md
- `walletconnect` — Financial — https://policylayer.com/tools/com-1inch-business-mcp/walletconnect.md
- `aqua` — Read — https://policylayer.com/tools/com-1inch-business-mcp/aqua.md
- `debug` — Read — https://policylayer.com/tools/com-1inch-business-mcp/debug.md
- `list_examples` — Read — https://policylayer.com/tools/com-1inch-business-mcp/list-examples.md
- `search` — Read — https://policylayer.com/tools/com-1inch-business-mcp/search.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=com-1inch-business-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/com-1inch-business-mcp
