Skip to main content
Glama

delete_blacklist

Remove a trading pair from the Freqtrade bot's blacklist to allow trading of previously restricted assets.

Instructions

Remove a pair from the blacklist.

Parameters: pair (str): Trading pair to remove from blacklist (e.g., "ETH/USDT"). ctx (Context): MCP context object for logging and client access.

Returns: str: Stringified JSON response with updated blacklist, or error if failed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pairYes

Implementation Reference

  • The delete_blacklist tool handler function that removes a trading pair from the blacklist. It retrieves the Freqtrade client from context, checks for version compatibility by attempting to call client.delete_blacklist() directly, or falls back to using the _client_delete helper with a DELETE request to the 'blacklist' endpoint with the pair parameter. Logs the removal action and returns the response as a string.
    @mcp.tool()
    def delete_blacklist(pair: str, ctx: Context) -> str:
        """
        Remove a pair from the blacklist.
        
        Parameters:
            pair (str): Trading pair to remove from blacklist (e.g., "ETH/USDT").
            ctx (Context): MCP context object for logging and client access.
        
        Returns:
            str: Stringified JSON response with updated blacklist, or error if failed.
        """
        client: FtRestClient = ctx.request_context.lifespan_context["client"]
        if hasattr(client, "delete_blacklist"):
            response = client.delete_blacklist(pair)
        else:
            response = _client_delete(client, "blacklist", params={"blacklist": pair})
        logger.info(f"Removed {pair} from blacklist")
        return str(response)
  • __main__.py:292-293 (registration)
    The @mcp.tool() decorator registers the delete_blacklist function as an MCP tool with the FastMCP server, making it available for invocation by MCP clients.
    @mcp.tool()
    def delete_blacklist(pair: str, ctx: Context) -> str:
  • Helper function that wraps the _call_client_method utility to make DELETE requests to the Freqtrade REST API. Used as a fallback mechanism in delete_blacklist when the client doesn't have a native delete_blacklist method.
    def _client_delete(client: FtRestClient, path: str, params: Dict[str, Any] | None = None):
        return _call_client_method(client, ["_delete"], path, params=params)
Behavior2/5

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

With no annotations, the description carries full burden but only mentions it 'removes' and may return an error if failed. It lacks details on permissions needed, side effects (e.g., if removal affects trading), rate limits, or what 'updated blacklist' entails. This is inadequate for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections for action, parameters, and returns, using bullet-like formatting. Every sentence adds value without redundancy, making it efficient and easy to parse.

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 mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain behavioral traits like auth needs or what the return value looks like beyond 'stringified JSON', leaving gaps in understanding how to use it effectively.

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 description coverage is 0%, but the description compensates by explaining the 'pair' parameter as 'Trading pair to remove from blacklist' with an example ('ETH/USDT'), adding meaningful context beyond the schema's basic type. Since there's only one parameter, this is sufficient.

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 action ('Remove') and resource ('a pair from the blacklist'), making the purpose understandable. However, it doesn't explicitly differentiate from its sibling 'add_blacklist' beyond the opposite action, missing specific contrast about when each is appropriate.

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 on when to use this tool versus alternatives like 'add_blacklist' or 'fetch_blacklist', or any prerequisites such as needing the pair to already be blacklisted. The description only states what it does without context.

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