pause_agent
Stop an active agent from running scheduled actions by providing its ID. This tool halts automated outreach tasks in the swarmix-mcp server.
Instructions
Pause an active agent. It will stop running scheduled actions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agentId | Yes | The agent ID to pause |
Implementation Reference
- src/tools/agents.ts:59-62 (handler)The handler for the 'pause_agent' tool, which takes an 'agentId' and calls the 'pauseAgent' method on the API client.
handler: async (args: Record<string, unknown>) => { const result = await client.pauseAgent(args.agentId as string); return JSON.stringify(result, null, 2); }, - src/api-client.ts:46-48 (handler)The actual implementation of 'pauseAgent' in the API client, which performs a PUT request to the agent endpoint to set its status to 'paused'.
async pauseAgent(id: string) { return this.request('PUT', `/api/agents/${id}`, { status: 'paused' }); } - src/tools/agents.ts:50-63 (registration)Registration of the 'pause_agent' tool within the 'getAgentTools' function.
name: 'pause_agent', description: 'Pause an active agent. It will stop running scheduled actions.', inputSchema: { type: 'object' as const, properties: { agentId: { type: 'string', description: 'The agent ID to pause' }, }, required: ['agentId'], }, handler: async (args: Record<string, unknown>) => { const result = await client.pauseAgent(args.agentId as string); return JSON.stringify(result, null, 2); }, },