Skip to main content
Glama

stake_transaction

Execute cryptocurrency staking operations to earn rewards by locking assets, converting stake requests into transaction-ready containers for blockchain processing.

Instructions

Execute a stake transaction.

Expects a StakeTransactionRequestContainer, returns a SwapTransactionRequestContainer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stake_transaction_requestsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
swap_transaction_requestsYes

Implementation Reference

  • MCP tool handler function that executes the stake transaction by calling the armor_client's stake_transaction method, with error handling for authentication.
    @mcp.tool()
    async def stake_transaction(stake_transaction_requests: StakeTransactionRequestContainer) -> SwapTransactionRequestContainer:
        """
        Execute a stake transaction.
        
        Expects a StakeTransactionRequestContainer, returns a SwapTransactionRequestContainer.
        """
        if not armor_client:
            return [{"error": "Not logged in"}]
        try:
            result: SwapTransactionRequestContainer = await armor_client.stake_transaction(stake_transaction_requests)
            return result
        except Exception as e:
            return [{"error": str(e)}]
  • Pydantic model for a single StakeTransactionRequest, containing the transaction_id from the prior stake quote.
    class StakeTransactionRequest(BaseModel):
        transaction_id: str = Field(description="unique id of the generated stake quote")
  • Container Pydantic model holding a list of StakeTransactionRequest for batch processing.
    class StakeTransactionRequestContainer(BaseModel):
        stake_transaction_requests: List[StakeTransactionRequest]
  • Helper method in ArmorWalletAPIClient that sends the stake transaction request to the API endpoint /transactions/swap/.
    async def stake_transaction(self, data: StakeTransactionRequestContainer) -> StakeTransactionRequestContainer:
        """Execute the stake transactions."""
        payload = data.model_dump(exclude_none=True)['stake_transaction_requests']
        return await self._api_call("POST", "transactions/swap/", payload)
  • FastMCP decorator that registers the stake_transaction function as an MCP tool.
    @mcp.tool()
Behavior1/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 but offers minimal information. 'Execute' implies a write/mutation operation, but it doesn't disclose permissions needed, whether it's irreversible, rate limits, or what happens on success/failure. The description mentions input/output container types but doesn't explain their significance or behavioral implications.

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, and the first sentence directly states the action. However, the second sentence about input/output containers feels technical without adding user-facing value, slightly reducing efficiency. Overall, it's brief but under-specified rather 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?

For a transaction execution tool with no annotations, 0% schema coverage, but with an output schema, the description is incomplete. It doesn't explain the mutation nature, security implications, or practical usage context. While the output schema might document return values, the description fails to provide necessary operational context for safe and correct use.

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 but fails to do so adequately. It mentions 'StakeTransactionRequestContainer' as the expected parameter but provides no semantic explanation of what this container contains, what fields are required, or what values are valid. For a single parameter tool with zero schema documentation, this leaves critical gaps.

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

Purpose2/5

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

The description 'Execute a stake transaction' is a tautology that essentially restates the tool name 'stake_transaction' without adding meaningful specificity. It doesn't clarify what 'stake' means in this context, what resources are involved, or how it differs from sibling tools like 'stake_quote' or 'unstake_transaction'.

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

Usage Guidelines1/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, appropriate contexts, or differentiate from related tools like 'stake_quote' (which likely provides a quote) or 'unstake_transaction' (which likely reverses the operation).

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