get_example
Get the full source code of an SDK example. Use list_examples first to see available examples.
This record as markdown: /tools/com-1inch-business-mcp/get-example.md
What get_example does on 1inch MCP
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
file | string | — | 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.
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 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 signalsAccepts file system path (file)
Attacks that exploit this kind of access
The rule that runs get_example safely
PolicyLayer is an MCP gateway: it sits between your AI agents and 1inch MCP, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For get_example, this is the rule to start with:
get_example is read-only, so it stays allowed. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect 1inch MCP, apply this rule, and every get_example call is checked against it from then on.
Questions about get_example
Get the full source code of an SDK example. Use list_examples first to see available examples. It is categorised as a Read tool in the 1inch MCP MCP Server, which means it retrieves data without modifying state.
get_example accepts 2 parameters: file, name. Required: name. The full parameter table on this page comes from the server's own tool schema.
Register the 1inch MCP server in PolicyLayer and add a rule for get_example: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches 1inch MCP. Nothing to install.
get_example is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the get_example rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for get_example. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
get_example is provided by the 1inch MCP server (https://api.1inch.com/mcp/protocol). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on 1inch, and thousands of servers like it.
This server
Across the catalogue