Skip to main content
Glama
Factor MCP Server

Factor MCP Server

Official
by FactorDAO

factor_decode_error

Decode contract error data to identify why a transaction reverted. Provide hex error data and an optional signature to interpret the failure.

Instructions

Decode contract error data using Foundry cast. Useful for understanding why a transaction reverted.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "data": "<data>"
    },
    "name": "factor_decode_error"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesError data to decode (hex string starting with 0x)
signatureNoKnown error signature to try decoding with

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.9

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the burden. 'Decode' plus 'understanding why' implies a local, non-mutating analysis operation, but the description never states that no chain state is touched, what happens when decoding fails, or what the decoded result looks like.

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

Conciseness4/5

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

Two short sentences with the action front-loaded and the purpose immediately after; no padding. The second sentence is slightly generic but earns its place by supplying the use case.

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?

This is a simple two-parameter utility with no output schema, and the description covers what it does and why. However, for a decode tool the shape of the result (error name, arguments, raw fallback) is exactly what an agent needs and is neither in an output schema nor in the description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so both parameters (data, signature) are already documented in the input schema. The description adds nothing about how the optional signature narrows decoding or what format a signature should take, so baseline 3 applies.

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?

States a specific verb and resource: 'Decode contract error data', with the mechanism ('using Foundry cast') named. It is clearly distinguishable from cast-invocation or transaction-status siblings, though it never explicitly contrasts with them.

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?

'Useful for understanding why a transaction reverted' gives an implied triggering context, but there is no explicit when-to-use rule, no prerequisites (e.g. where to obtain the revert data), and no named alternative or when-not-to-use condition.

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