Skip to main content
Glama

evm_upload_image_to_ipfs

Uploads an image from a URL or local file path to IPFS via Pinata, returning the IPFS hash, ipfs:// URI, and gateway URL for use in metadata.

Instructions

Upload image to IPFS and get back IPFS hash and URI.

Uploads image file to IPFS using Pinata. Supports both URLs and local file paths. Returns IPFS hash, URI, and gateway URL for the uploaded image.

CRITICAL RULES:

  • Requires PINATA_API_KEY in environment

  • One of imageUrl or imagePath required

  • Returns IPFS hash usable in metadata

PARAMETERS:

  • imageUrl: Image URL (optional)

  • imagePath: Local file path (optional)

  • ipfsApiKey: Override API key (optional)

EXAMPLES: ✅ Upload from URL: {imageUrl: "https://example.com/art.png"} ✅ Upload local file: {imagePath: "/Users/me/art.jpg"}

SUPPORTED EVM CHAINS (7 networks): • ethereum (Sepolia) - EIP-1559 enabled, ~12s blocks, moderate gas costs • polygon (Amoy) - Low fees, fast finality (~2s), layer 2 • avalanche (Fuji C-Chain) - Sub-second finality, dynamic fees • bsc (BNB Testnet) - 3s blocks, low gas costs, Binance ecosystem • arbitrum (Sepolia) - Optimistic rollup, low fees, Ethereum security • base (Sepolia) - Coinbase layer 2, EIP-1559, low fees • worldchain (World Sepolia) - World Network testnet, EIP-1559

CRITICAL GAS CONSIDERATIONS:

  • Ethereum: High gas costs, use gas oracle for timing

  • Polygon/BSC: Very low gas, safe for frequent transactions

  • Arbitrum/Base: L2 optimizations, ~10-50x cheaper than Ethereum

  • Avalanche: Dynamic fees, can spike during congestion

  • Always check gas price before executing transactions

TESTNET TOKENS: All chains use testnet tokens with NO REAL VALUE. Faucets available for all supported networks.

OUTPUT STRUCTURE: • ipfsHash: IPFS CID • uri: ipfs://... format • gatewayUrl: Public URL

Running on Linux.

LINUX-SPECIFIC NOTES:

  • Package manager: apt (Ubuntu/Debian), yum (RHEL/CentOS), or pacman (Arch)

  • Python 3 is typically 'python3' command

  • GNU tools are standard

  • Use 'xdg-open' command to open files/applications

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": "evm_upload_image_to_ipfs"
  }
}

Input Schema

NameRequiredDescriptionDefault
imageUrlNoURL of image to upload
imagePathNoLocal path to image file
ipfsApiKeyNoAPI key for IPFS service (optional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It does disclose the auth requirement (PINATA_API_KEY, overridable per call) and the return shape, which is genuinely helpful. But it omits practical behavior an uploader needs — accepted file formats, size limits, pinning permanence, failure/timeout behavior — and instead spends most of its length on EVM chain/gas/testnet details that have no bearing on an image upload, which risks confusing the agent.

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

Conciseness2/5

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

The first paragraph and the CRITICAL RULES/EXAMPLES blocks are well front-loaded and earn their place. However, roughly two-thirds of the text — supported EVM chains, gas considerations, testnet token notes, and Linux package-manager instructions — is wholly unrelated to uploading an image to IPFS and should be removed.

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?

For a simple three-parameter upload tool with no output schema, the essentials are covered: purpose, auth requirement, parameter exclusivity, examples, and the returned fields. What is missing is operational detail (formats, size caps, error behavior), while the padding on unrelated EVM and OS topics adds length without completeness.

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?

Schema coverage is 100%, and all three parameters already have descriptions, so the baseline would be 3. The description earns extra credit by adding a constraint the schema does not express: the schema marks both imageUrl and imagePath as optional, while the description states one of them is required. The worked examples further disambiguate the two input modes.

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 opening sentence names a specific verb and resource ('Upload image to IPFS') and states the return artifacts (IPFS hash, URI, gateway URL). It is immediately distinguishable from generic contract/wallet siblings. It does not, however, clarify its relationship to the closely related evm_create_nft_with_ipfs / evm_create_nft_metadata tools, which also touch IPFS.

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 CRITICAL RULES block gives real preconditions: PINATA_API_KEY must be in the environment, and exactly one of imageUrl/imagePath is required. That is useful invocation guidance, but there is no statement of when to prefer this tool over the NFT-with-IPFS sibling or what to do after obtaining the hash. Usage is implied rather than routed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools