Skip to main content
Glama

Create a P2P offer

p2p_create_offer

Post a loan offer or borrow request on-chain with immediate escrow. Choose to lend principal or borrow collateral; cancel if not taken.

Instructions

Post a loan offer (you lend) or borrow request (you borrow) on-chain. Escrows your side immediately: lenders escrow the principal, borrowers escrow the collateral. Reversible via p2p_cancel while untaken. Requires a signing key; mainnet additionally requires FLASHBANK_MCP_ALLOW_MAINNET=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sideYes"lend" = you provide the principal; "borrow" = you provide the collateral
chainYes
flatFeeYesFlat repayment fee in principal-token units (e.g. "30" = repay principal + 30). NOT a percentage.
graceDaysNoGrace period after maturity (days, default 1)
principalYesPrincipal amount (human units, e.g. "1000")
collateralYesCollateral amount (human units)
allowedTakerNoRestrict who may take (address). Omit for open market.
durationDaysYesLoan term in days
principalTokenYesToken being lent — symbol or address
collateralTokenYesToken pledged as collateral — symbol or address
coolingOffHoursNov2 chains (Sepolia) only: cooling-off window in hours over which the fee vests. Omit or 0 = the protocol minimum for the term; longer is allowed, shorter rejects.
settlementValueNoAgreed value of ALL the collateral in principal-token units; surplus above the debt returns to the borrower on default. Omit for full forfeit.
offerExpiryHoursNoHours until the un-taken offer expires (default: never)
Behavior3/5

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

Annotations already indicate non-read-only, non-idempotent, non-destructive. Description adds immediate escrow behavior and reversibility, providing useful context beyond annotations.

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

Conciseness5/5

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

Three sentences, front-loaded with purpose, efficient with no wasted words.

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?

High schema coverage and description cover creation process and side behavior. Lacks output specification (e.g., offer ID), but acceptable for creation tool without output schema.

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 92%, so baseline is 3. Description reinforces side behavior with escrow explanation and adds mainnet requirement context, adding value beyond schema.

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?

Clearly states the verb 'Post' and the resource 'loan offer or borrow request'. Distinguishes from sibling tools like p2p_cancel by mentioning reversibility.

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?

Tells when to use (to post an offer/request) and mentions reversibility via p2p_cancel. Includes prerequisites (signing key, mainnet config). Does not explicitly say when not to use, but siblings provide alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Rotwang9000/flashbank-net'

If you have feedback or need assistance with the MCP directory API, please join our Discord server