Skip to main content
Glama

Liquid Agent

Buy tokenized stocks with USDC

stocks_buy
Read-onlyIdempotent

Free. Invest USDC into your vault from $1 (USDC 6 decimals: "1000000" = $1). Easiest: set usePermit=true with owner, sign the returned typedData off-chain (free), then call again with permitDeadline + permitSignature to get ONE deposit transaction. Without a permit you get two transactions (approve, then deposit). Returns an UNSIGNED transaction {to, data, value, chainId} on Base; nothing happens until you sign it with your own wallet and broadcast it. Liquid never holds keys or funds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usdcYesUSDC to invest, 6 decimals, minimum "1000000" ($1).
ownerNoYour wallet address (required with usePermit).
vaultYesYour vault address.
minSharesNoOptional slippage floor: minimum shares to receive.
usePermitNotrue = return an EIP-2612 permit to sign first (no approve transaction).
permitDeadlineNoDeadline from the permit you signed (second call).
permitSignatureNoYour signature of the permit typedData (second call).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoContract to call
dataNoCalldata, sign and broadcast as-is
modeNopermit: sign typedData first
nextNoWhat to do next
afterNoWhat to do after it confirms
stepsNoWhen two transactions are needed (approve, then deposit), sign and send them in order
valueNoNative value, always 0
chainIdNoChain id (8453 = Base)
typedDataNoEIP-712 permit to sign off-chain (free, no gas)
attributionNoERC-8021 builder attribution suffix info

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

The description goes well beyond the annotations by explaining that the tool is free, returns an unsigned transaction, requires external signing, and that Liquid never holds keys or funds. It also clarifies the two-call permit workflow and the result of omitting it, which fully explains the readOnlyHint=true annotation for a 'buy' operation.

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 description is dense but well-structured: it front-loads cost and amount, then the permit flow, then return behavior, then custody. Every sentence earns its place, though it could be slightly tighter given the schema already covers parameter details.

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

Completeness5/5

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

Given the complexity of a two-call permit flow and the presence of an output schema, the description is complete enough for an agent to understand the transaction lifecycle, the return value nature, and the absence of custody risk. Nothing critical is missing.

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 100%, so each parameter is already documented. The description adds value by explaining how usePermit, owner, permitDeadline, and permitSignature are used together in a two-call sequence, which is not obvious from the individual field descriptions alone.

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?

The description states a specific verb and resource: 'Invest USDC into your vault' for tokenized stocks. It clearly distinguishes this as the actual buy operation from the quote sibling (stocks_buy_quote) by describing a transaction-producing flow, not a price check.

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?

It provides clear internal guidance: use usePermit=true for a one-transaction flow, otherwise expect two. It does not explicitly name alternative sibling tools (e.g., stocks_buy_quote, stocks_sell) or state when not to use this tool, so it falls short of a 5.

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.