Skip to main content
Glama

unstake_transaction

Execute an unstake transaction to withdraw staked cryptocurrency assets, converting them into a swap transaction request for further trading operations.

Instructions

Execute an unstake transaction.

Expects a UnstakeTransactionRequestContainer, returns a SwapTransactionRequestContainer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unstake_transaction_requestsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
swap_transaction_requestsYes

Implementation Reference

  • MCP tool handler for 'unstake_transaction'. Registers the tool and delegates execution to the ArmorWalletAPIClient.unstake_transaction method, handling errors and authentication check.
    @mcp.tool()
    async def unstake_transaction(unstake_transaction_requests: UnstakeTransactionRequestContainer) -> SwapTransactionRequestContainer:
        """
        Execute an unstake transaction.
        
        Expects a UnstakeTransactionRequestContainer, returns a SwapTransactionRequestContainer.
        """
        if not armor_client:
            return [{"error": "Not logged in"}]
        try:
            result: SwapTransactionRequestContainer = await armor_client.unstake_transaction(unstake_transaction_requests)
            return result
        except Exception as e:
            return [{"error": str(e)}]
  • Core implementation in ArmorWalletAPIClient that prepares the payload from UnstakeTransactionRequestContainer and calls the backend API endpoint '/transactions/swap/' to execute the unstake transaction.
    async def unstake_transaction(self, data: UnstakeTransactionRequestContainer) -> UnstakeTransactionRequestContainer:
        """Execute the unstake transactions."""
        payload = data.model_dump(exclude_none=True)['unstake_transaction_requests']
        return await self._api_call("POST", "transactions/swap/", payload)
  • Pydantic schema for the input container, holding a list of UnstakeTransactionRequest objects used by the unstake_transaction tool.
    class UnstakeTransactionRequestContainer(BaseModel):
        unstake_transaction_requests: List[UnstakeTransactionRequest]
  • Pydantic schema for individual unstake transaction request, containing the transaction_id from a prior unstake quote.
    class UnstakeTransactionRequest(BaseModel):
        transaction_id: str = Field(description="unique id of the generated unstake quote")
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the input/output containers but doesn't describe what the tool actually does behaviorally: whether it's a blockchain transaction submission, if it requires confirmation, what happens to the staked assets, potential fees, irreversible nature, or any side effects. 'Execute' implies a write/mutative operation, but no further behavioral context is given.

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 extremely concise with just two sentences that directly state the action and input/output types. There's no wasted text or unnecessary elaboration. However, the extreme brevity comes at the cost of completeness, making it more under-specified than optimally concise.

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

Completeness2/5

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

Given this is a financial transaction tool with no annotations, 0% schema coverage, but with an output schema, the description is incomplete. It doesn't explain the unstaking operation's purpose, risks, or workflow context. While the output schema may document the return structure, the description fails to provide necessary context about what 'unstake' means, when to use it, or what behavioral outcomes to expect.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It only states 'Expects a UnstakeTransactionRequestContainer' without explaining what this container contains, what fields are needed, or what unstaking parameters are required. This adds minimal value beyond the schema's structural information. For a single parameter tool with 0% schema coverage, this is inadequate.

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

Purpose3/5

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

The description states the tool 'Execute[s] an unstake transaction', which is a clear verb+resource combination. However, it doesn't differentiate from sibling tools like 'unstake_quote' or explain what 'unstake' means in this context. The purpose is understandable but lacks specificity about the financial/blockchain operation involved.

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

Usage Guidelines2/5

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

No guidance is provided about when to use this tool versus alternatives. There's no mention of prerequisites (like needing a staked position first), when-not-to-use scenarios, or comparison to related tools like 'unstake_quote' (which likely provides a quote before execution) or 'stake_transaction' (the opposite operation). The description assumes the user already knows when unstaking is appropriate.

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

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