Skip to main content
Glama

stake_quote

Retrieve cryptocurrency staking quotes to evaluate potential returns before committing assets to staking protocols.

Instructions

Retrieve a stake quote. Expects a StakeQuoteRequestContainer, returns a SwapQuoteRequestContainer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stake_quote_requestsYes

Implementation Reference

  • The main handler function for the 'stake_quote' MCP tool. It validates login, calls the armor_client.stake_quote method with the input container, and returns the result or an error.
    @mcp.tool() async def stake_quote(stake_quote_requests: StakeQuoteRequestContainer) -> SwapQuoteRequestContainer: """ Retrieve a stake quote. Expects a StakeQuoteRequestContainer, returns a SwapQuoteRequestContainer. """ if not armor_client: return [{"error": "Not logged in"}] try: result: StakeQuoteRequestContainer = await armor_client.stake_quote(stake_quote_requests) return result except Exception as e: return [{"error": str(e)}]
  • Pydantic model defining the input parameters for a single stake quote request (wallet, SOL input, LSD output token, amount). Used within StakeQuoteRequestContainer.
    class StakeQuoteRequest(BaseModel): from_wallet: str = Field(description="The name of the wallet that input_token is in.") input_token: str = "So11111111111111111111111111111111111111112" # Hardcoded SOL token address output_token: str = Field(description="the public mint address of the output liquid staking derivative token to stake.") # "jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v" input_amount: float = Field(description="input amount to swap")
  • Pydantic container model for the tool input: list of StakeQuoteRequest objects. This is the expected input type for the stake_quote tool.
    class StakeQuoteRequestContainer(BaseModel): stake_quote_requests: List[StakeQuoteRequest]
  • Helper method in ArmorWalletAPIClient that prepares the payload from StakeQuoteRequestContainer and makes the POST API call to /transactions/quote/ to fetch the stake quote.
    async def stake_quote(self, data: StakeQuoteRequestContainer) -> StakeQuoteRequestContainer: """Obtain a stake quote.""" payload = data.model_dump(exclude_none=True)['stake_quote_requests'] return await self._api_call("POST", "transactions/quote/", payload)
  • Pydantic model for the output container (list of SwapQuoteResponse), referenced in the tool's return type (though code uses StakeQuoteRequestContainer).
    class SwapQuoteRequestContainer(BaseModel): swap_quote_requests: List[SwapQuoteRequest]

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/emmaThompson07/armor-crypto-mcp'

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