Skip to main content
Glama

fetch_bot_status

Check the current status of open cryptocurrency trades in Freqtrade to monitor active positions and trading bot performance.

Instructions

Retrieve the current status of open trades.

Parameters: ctx (Context): MCP context object for logging and client access.

Returns: str: Stringified JSON response with open trade status, or None if failed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The fetch_bot_status tool handler function that retrieves the current status of open trades from the Freqtrade bot. It extracts the FtRestClient from the MCP context and calls client.status() to get the trade status, returning it as a stringified JSON response.
    @mcp.tool()
    def fetch_bot_status(ctx: Context) -> str:
        """
        Retrieve the current status of open trades.
        
        Parameters:
            ctx (Context): MCP context object for logging and client access.
        
        Returns:
            str: Stringified JSON response with open trade status, or None if failed.
        """
        client: FtRestClient = ctx.request_context.lifespan_context["client"]
        return str(client.status())
  • __main__.py:76-76 (registration)
    The @mcp.tool() decorator registers the fetch_bot_status function as an MCP tool with the FastMCP framework, making it available for invocation by MCP clients.
    @mcp.tool()
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions that it returns 'stringified JSON response with open trade status, or None if failed', which covers basic output behavior. However, it lacks details on error conditions, rate limits, authentication needs, or side effects, which are important for a tool that retrieves data.

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 concise and well-structured with clear sections for purpose, parameters, and returns. It uses minimal sentences that directly convey necessary information without unnecessary elaboration.

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

Completeness3/5

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

Given the tool has no parameters and no output schema, the description adequately covers the basics: what it does and what it returns. However, for a data retrieval tool in a trading bot context, it could benefit from more context on what 'open trade status' entails or how it differs from other fetch tools, especially with no annotations to provide additional metadata.

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?

The input schema has 0 parameters with 100% coverage, so the schema fully documents the lack of parameters. The description mentions 'ctx (Context): MCP context object for logging and client access', which adds context about an implicit parameter, but this isn't reflected in the schema. Since there are no formal parameters, this extra information is helpful but not critical.

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

Purpose4/5

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

The description clearly states the verb ('Retrieve') and resource ('current status of open trades'), making the purpose understandable. However, it doesn't explicitly differentiate this tool from sibling tools like 'fetch_trades' or 'fetch_performance', which might also relate to trade information.

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?

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'fetch_trades' and 'fetch_performance' available, there's no indication of what makes this tool unique or when it should be preferred over others.

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/worlddebugger/freqtrade-mcp'

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