Skip to main content
Glama
FutureAtoms

Agentic Control Framework (ACF)

by FutureAtoms

force_terminate

Terminate a running process by its PID to stop unresponsive tasks or free system resources.

Instructions

Force terminate

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidYes

Implementation Reference

  • Core implementation of forceTerminate - finds session by PID, kills the process tree using tree-kill, marks session as terminated, and returns success/failure.
    async function forceTerminate(pid) {
      try {
        // Find session by PID
        let session = null;
        for (const [id, s] of sessions) {
          if (s.pid === pid) {
            session = s;
            break;
          }
        }
    
        if (!session) {
          return {
            success: false,
            message: `No session found with PID ${pid}`
          };
        }
    
        // Kill the process tree (cross-platform)
        await new Promise((resolve, reject) => {
          treeKill(pid, undefined, (err) => {
            if (err) reject(err);
            else resolve();
          });
        });
    
        session.status = 'terminated';
        session.endTime = Date.now();
    
        return {
          success: true,
          message: `Process ${pid} terminated successfully`,
          pid,
          sessionId: session.id
        };
    
      } catch (error) {
        logger.error(`Error terminating process: ${error.message}`);
        return {
          success: false,
          message: error.message
        };
      }
    }
  • Input schema for force_terminate tool - requires pid (number) as input.
    { name:'force_terminate', description:'Force terminate', inputSchema:{ type:'object', properties:{ pid:{type:'number'} }, required:['pid'] } },
  • Registration/dispatch for force_terminate - routes incoming 'force_terminate' calls to terminalTools.forceTerminate(args.pid).
    case 'force_terminate': data = await terminalTools.forceTerminate(args.pid); break;
  • Import of tree-kill library used by forceTerminate to kill process trees cross-platform.
    const treeKill = require('tree-kill');
  • Module export that exposes forceTerminate for use by server.js.
    module.exports = {
      getConfig,
      setConfigValue,
      executeCommand,
      readOutput,
      forceTerminate,
      listSessions,
      listProcesses,
      killProcess
    };
Behavior2/5

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

With no annotations, the description carries full burden. 'Force terminate' implies abrupt termination but provides no details on signals sent, permissions needed, or side effects. The agent cannot assess risk.

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

Conciseness2/5

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

The description is only two words, which is extremely concise, but it is underspecified to the point of being unhelpful. True conciseness requires clarity.

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

Completeness1/5

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

Despite the tool's simplicity (1 param, no annotations, no output schema), the description is completely inadequate. An agent cannot determine correct usage or expected behavior.

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

Parameters1/5

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

The only parameter 'pid' is not explained. With 0% schema coverage, the description should clarify what 'pid' represents (e.g., process ID). It adds no meaning beyond the schema.

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

Purpose2/5

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

The description 'Force terminate' is vague and barely more than a tautology. It does not specify what is being terminated (e.g., process, session), and could be confused with sibling tool 'kill_process'.

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

Usage Guidelines1/5

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

No guidance is given on when to use this tool versus alternatives like 'kill_process' or 'list_processes'. There are no context, exclusions, or when-not instructions.

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/FutureAtoms/agentic-control-framework'

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