Skip to main content
Glama
Factor MCP Server

Factor MCP Server

Official
by FactorDAO

factor_give_approval

Approve an ERC20 token for spending by a specified spender, such as a vault, before depositing when allowance is insufficient; set an exact base-unit amount or "max" for unlimited approval.

Instructions

Approve an ERC20 token for spending by a spender address (e.g., a vault). This MUST be called before depositing tokens into a vault if the vault does not have sufficient allowance. Use "max" amount for unlimited approval, or specify an exact amount in base units. Always call this before factor_deposit if the vault needs allowance.

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": {
      "tokenAddress": "<tokenAddress>",
      "spenderAddress": "<spenderAddress>"
    },
    "name": "factor_give_approval"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountNoAmount to approve in base units (wei), or "max" for unlimited approval. Default: "max"
passwordNoWallet password if the wallet is encrypted
tokenAddressYesThe ERC20 token address to approve
spenderAddressYesThe address to approve spending for (e.g., vault address, factory address)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.9

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden. It does disclose the meaningful behavioral fact that 'max' grants an unlimited approval, but it omits that this is a state-changing on-chain transaction requiring signing and gas, whether re-approval overwrites an existing allowance, and what the caller gets back. Adequate but with clear gaps for a mutation tool.

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

Conciseness3/5

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

The purpose is front-loaded well, but the approval-before-deposit instruction is repeated almost verbatim in the second and fourth sentences ('This MUST be called before depositing...' / 'Always call this before factor_deposit...'). Trimming the duplicate would make the definition tighter without losing information.

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 four-parameter on-chain mutation with no annotations and no output schema, the description covers purpose, ordering, and amount semantics but not transaction outcome, confirmation behavior, or handling of pre-existing allowances. It is usable but leaves the agent under-informed about what happens after the call succeeds or fails.

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 description coverage is 100%, so all four parameters are already documented in the schema, including the 'max' option and base-unit semantics. The description restates the 'max' versus exact-amount choice without adding format detail beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Approve an ERC20 token for spending by a spender address') plus the concrete example of a vault as spender. It also positions itself in the workflow relative to factor_deposit, so an agent can tell it apart from the deposit tool without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit precondition ('MUST be called before depositing tokens into a vault if the vault does not have sufficient allowance') and names the alternative step (factor_deposit). The conditional implicitly defines when not to call it, but no tool for checking existing allowance is named, leaving the agent to guess how to verify the 'sufficient allowance' 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