Skip to main content
Glama

Hookr

Build a borrow

hookr_build_borrow
Read-onlyIdempotent

Builds a borrow on the Borrow panel's Longbow markets as the panel sends it, in two passes: first the approval and the typed messages the wallet signs with their deadline, then with the signatures and that deadline the unsigned call, simulated from the wallet, never past the panel's safe line.

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": {
      "wallet": "<wallet>",
      "collateral": "<collateral>",
      "deposit": "<deposit>",
      "borrow": "<borrow>"
    },
    "name": "hookr_build_borrow"
  }
}

Input Schema

NameRequiredDescriptionDefault
borrowYesUSDG to borrow, in its own units.
walletYesThe wallet that deposits, signs and borrows.
depositYesCollateral to deposit, in its own units; 0 to borrow against collateral already in.
deadlineNoThe deadline the first pass gave, with the signatures.
collateralYesThe collateral token, from hookr_borrow_markets.
permitSignatureNoThe wallet's signature of the first pass's permit message.
authorizationSignatureNoThe wallet's signature of the first pass's authorization message.

Output Schema

NameRequiredDescriptionDefault
signNoEIP-712 messages for the wallet to sign.
callsYesUnsigned calls, in the order to send them.
borrowNo
reasonNoWhy the answer is not ok, in words an agent can act on.
statusYesok, needs_approval, needs_signatures, refused or unknown.
depositNo
deadlineNoUnix seconds; pass it back with the signatures.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover safety (readOnlyHint, idempotent, non-destructive), and the description adds genuinely new behavioral context: a two-pass protocol, wallet-signed typed messages, an unsigned call returned in the second pass, wallet-side simulation, and a borrow cap ('the panel's safe line'). It does not explain failure behavior if simulation reverts or what 'safe line' means quantitatively.

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?

The purpose is front-loaded and every clause carries information about the two-pass flow. The single dense sentence is somewhat hard to parse, and phrases like 'as the panel sends it' are slightly opaque, but there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex two-pass signing tool with a full input schema and an output schema, the description explains the flow and the safety boundary adequately; return values need not be described. Remaining gaps are edge-case behavior (simulation failure, exact cap semantics), which are secondary given the structured coverage.

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 the schema already documents all seven parameters, including deadlines and signatures. The description reinforces that signatures and deadline belong to the second pass but adds no syntax or format detail beyond the schema, so the baseline of 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 ('Builds a borrow on the Borrow panel's Longbow markets') and immediately clarifies it is a builder, not an executor, via the two-pass signing flow. It is distinguishable from siblings like hookr_build_swap or hookr_borrow_markets, though it does not explicitly name the sibling that supplies the collateral token.

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 two-pass sequencing (sign messages first, then submit signatures and deadline) gives implied usage guidance and ordering constraints. However, there is no explicit when-to-use/when-not-to-use statement, no mention of prerequisites such as first calling hookr_borrow_markets, and no routing to alternatives.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources