Skip to content

Network Information Tools

These tools provide essential information about the Somnia blockchain network, including chain details, gas prices, and block information.

Retrieves information about a specific Somnia network.

Parameters:

  • network (optional): Network name or chain ID (defaults to Somnia testnet)

Example:

{
"network": "Somnia Testnet"
}

Response: Returns chain information including name, chain ID, RPC URLs, and native currency details.

Example Prompt:

Get the chain info for Somnia Testnet.

Gets the current gas price on the network.

Parameters:

  • network (optional): Network name or chain ID (defaults to Somnia testnet)

Example:

{
"network": "Somnia Testnet"
}

Response: Returns the current gas price in wei.

Example Prompt:

What is the current gas price on Somnia Testnet?

Retrieves complete fee data including gas price, max fee per gas, and max priority fee per gas.

Parameters:

  • network (optional): Network name or chain ID (defaults to Somnia testnet)

Example:

{
"network": "Somnia Testnet"
}

Response: Returns an object with gasPrice, maxFeePerGas, and maxPriorityFeePerGas.

Example Prompt:

Get the complete fee data for Somnia Testnet.

Gets information about a specific block by its number.

Parameters:

  • network (optional): Network name or chain ID (defaults to Somnia testnet)
  • blockNumber (optional): Block number to retrieve (defaults to latest)

Example:

{
"network": "Somnia Testnet",
"blockNumber": 1234567
}

Response: Returns complete block data including transactions, timestamp, and gas used.

Example Prompt:

Get information about block number 1234567.

Retrieves the most recent block from the network.

Parameters:

  • network (optional): Network name or chain ID (defaults to Somnia testnet)

Example:

{
"network": "Somnia Testnet"
}

Response: Returns the latest block information.

Example Prompt:

What is the latest block on the network?

Resolves an ENS name to its corresponding address.

Parameters:

  • network (optional): Network name or chain ID (defaults to Somnia testnet)
  • ensName: The ENS name to resolve (e.g., ‘alice.eth’, ‘bob.somnia’)

Example:

{
"network": "Somnia Testnet",
"ensName": "alice.somnia"
}

Response: Returns the resolved address for the ENS name.

Example Prompt:

Resolve the ENS name 'alice.somnia' to its address.

Gets the ENS name associated with an address.

Parameters:

  • network (optional): Network name or chain ID (defaults to Somnia testnet)
  • address: The address to reverse lookup

Example:

{
"network": "Somnia Testnet",
"address": "0x1234567890123456789012345678901234567890"
}

Response: Returns the ENS name associated with the address, if any.

Example Prompt:

Get the ENS name for address 0x1234567890123456789012345678901234567890.

All network tools will return error messages if:

  • The specified network is not supported
  • Network connection fails
  • Block number is invalid or not found