Skip to main content
Glama

toggle_agent

Pause or resume an agent's automatic strategy execution in the conviction-mcp server. When paused, the agent stops entering pools via cron while manual entries remain functional.

Instructions

Pause or resume an agent's automatic strategy execution. When paused, the agent stops entering pools via cron. Manual entries via enter_position still work.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idNoThe agent's profile ID. Auto-filled from saved credentials if omitted.
owner_idNoThe owner's profile ID. Auto-filled from saved credentials if omitted.

Implementation Reference

  • The handler for the `toggle_agent` MCP tool, which pauses or resumes an agent's automatic strategy execution by calling the `update-agent` API with the `toggle` action.
    // ── Tool: toggle_agent ──
    
    server.tool(
      "toggle_agent",
      "Pause or resume an agent's automatic strategy execution. When paused, the agent stops entering pools via cron. Manual entries via enter_position still work.",
      {
        agent_id: z.string().optional().describe("The agent's profile ID. Auto-filled from saved credentials if omitted."),
        owner_id: z.string().optional().describe("The owner's profile ID. Auto-filled from saved credentials if omitted."),
      },
      async ({ agent_id, owner_id }) => {
        const saved = loadSavedAgents();
        const resolvedAgent = agent_id || (saved.length > 0 ? saved[saved.length - 1].agentId : null);
        const resolvedOwner = owner_id || (saved.length > 0 ? saved[saved.length - 1].ownerId : null);
        if (!resolvedAgent || !resolvedOwner) {
          return { content: [{ type: "text", text: "No agent found. Create one first with `create_agent`, or pass agent_id and owner_id." }], isError: true };
        }
    
        const result = (await apiPost("update-agent", {
          action: "toggle",
          agentId: resolvedAgent,
          ownerProfileId: resolvedOwner,
        })) as any;
    
        if (!result.success) {
          return {
            content: [{ type: "text", text: `Toggle failed: ${result.error || "Unknown error"}` }],
            isError: true,
          };
        }
    
        return {
          content: [
            {
              type: "text",
              text: `Agent **${agent_id}** is now **${result.active ? "ACTIVE" : "PAUSED"}**. ${result.message || ""}`,
            },
          ],
        };
      }
    );
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by disclosing key behavioral traits: it's a mutation tool (implied by 'pause or resume'), it affects cron-based pool entries, and it clarifies that manual entries remain functional. It doesn't mention permissions, rate limits, or reversibility, but covers essential operational impact.

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 perfectly concise with two sentences that are front-loaded and zero waste. Every word earns its place by explaining the tool's purpose and a key behavioral detail without redundancy.

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

Completeness4/5

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

Given the tool's moderate complexity (mutation with 2 parameters), no annotations, and no output schema, the description is mostly complete. It explains what the tool does and its effect on cron vs. manual entries, but lacks details on return values, error conditions, or prerequisites, leaving minor gaps.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents both parameters fully. The description adds no additional parameter semantics beyond what's in the schema, maintaining the baseline score of 3 for adequate but no extra value.

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 the specific action ('pause or resume') on a specific resource ('agent's automatic strategy execution'), distinguishing it from siblings like 'create_agent' or 'update_strategy'. It precisely defines what the tool does with concrete verbs and scope.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool ('pause or resume an agent's automatic strategy execution') and mentions that 'manual entries via enter_position still work' when paused, which helps differentiate from 'enter_position'. However, it doesn't explicitly state when NOT to use it or name specific alternatives among siblings.

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/abcxz/conviction-fm'

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