Skip to main content
Glama
demwick

polymarket-trader-mcp

monitor.stop

Stop the wallet monitoring loop to end copy-trading, change bot configuration, or switch between preview and live modes. Does not close open positions; exit them separately. Safe to call when monitor is off.

Instructions

Stop the background wallet monitoring loop started by monitor.start. Call this to end a copy-trading session, before changing bot configuration via config.set or config.safety_limits, or when switching between preview and live modes via config.go_live. Does NOT close open positions — use positions.close or positions.set_exit_rules separately to unwind trades. Idempotent: safe to call when the monitor is not running. Returns a short confirmation string. No parameters. Pro feature.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual handler function 'handleStopMonitor' that implements the tool logic: checks license, checks if monitor is running, calls monitor.stop(), and returns a confirmation.
    import { WalletMonitor } from "../services/wallet-monitor.js";
    import { checkLicense, requirePro } from "../utils/license.js";
    
    export async function handleStopMonitor(monitor: WalletMonitor): Promise<string> {
      const isPro = await checkLicense();
      if (!isPro) {
        return requirePro("stop_monitor");
      }
    
      const status = monitor.getStatus();
      if (!status.running) {
        return "Monitor is not running.";
      }
      monitor.stop();
      return "Monitor stopped.";
    }
  • src/index.ts:183-188 (registration)
    Registration of the 'monitor.stop' tool with the MCP server, including its description, empty schema (no params), and the handler callback that invokes handleStopMonitor.
    server.tool(
      "monitor.stop",
      "Stop the background wallet monitoring loop started by monitor.start. Call this to end a copy-trading session, before changing bot configuration via config.set or config.safety_limits, or when switching between preview and live modes via config.go_live. Does NOT close open positions — use positions.close or positions.set_exit_rules separately to unwind trades. Idempotent: safe to call when the monitor is not running. Returns a short confirmation string. No parameters. Pro feature.",
      {},
      safe("monitor.stop", async () => ({ content: [{ type: "text" as const, text: await handleStopMonitor(walletMonitor) }] }))
    );
Behavior5/5

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

With no annotations, the description fully discloses behavior: stops monitoring loop, does not close positions, idempotent, returns short confirmation string, no parameters, Pro feature. No behavioral gaps.

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?

Five sentences, each adding distinct value: purpose, usage guidance, exclusions, idempotency, return value, feature classification. No redundant or wasted text.

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

Completeness5/5

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

Given no annotations, no output schema, and 0 parameters, the description is fully complete. It covers all necessary information for an agent to use this tool correctly.

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?

Tool has 0 parameters, so no param details needed. Description correctly states 'No parameters'. Baseline for 0 params is 4.

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

Purpose5/5

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

The description clearly states it stops the background wallet monitoring loop started by monitor.start, using a specific verb and resource. It distinguishes itself from sibling tool monitor.start by describing its opposite action.

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

Usage Guidelines5/5

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

Explicitly says when to call: to end a copy-trading session, before changing bot configuration, switching between preview and live modes. Also states what it does NOT do (close positions) and suggests alternatives (positions.close, positions.set_exit_rules). Mentions idempotency and safety when not running.

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/demwick/polymarket-trader-mcp'

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