atomcommands
Control decomposition, check termination status, retrieve conclusions, and adjust depth settings for the Atom-of-Thoughts reasoning process.
Instructions
A command tool to control the decomposition-contraction mechanism and automatic termination of Atom of Thoughts.
Use this tool to access advanced features of AoT:
Decomposition (decompose): Decompose a specified atom into smaller sub-atoms
Complete decomposition (complete_decomposition): Complete an ongoing decomposition process
Check termination status (termination_status): Check the termination status of the current AoT process
Get best conclusion (best_conclusion): Get the verified conclusion with the highest confidence
Change settings (set_max_depth): Change the maximum depth limit
Command descriptions:
command: Command to execute (decompose, complete_decomposition, termination_status, best_conclusion, set_max_depth)
atomId: Atom ID to use with the command (only required for decompose command)
decompositionId: ID of the decomposition process (only required for complete_decomposition command)
maxDepth: Maximum depth value to set (only required for set_max_depth command)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | Command to execute | |
| atomId | No | Atom ID to use with the command | |
| decompositionId | No | ID of the decomposition process to complete | |
| maxDepth | No | Maximum depth value to set |
Implementation Reference
- src/index.ts:780-869 (handler)Main handler logic for the 'atomcommands' tool. Dispatches to AtomOfThoughtsServer methods based on the 'command' parameter (decompose, complete_decomposition, termination_status, best_conclusion, set_max_depth).} else if (request.params.name === "atomcommands") { try { const params = request.params.arguments as Record<string, unknown>; const command = params.command as string; let result: any = { status: 'error', message: 'Unknown command' }; switch (command) { case 'decompose': const atomId = params.atomId as string; if (!atomId) throw new Error('atomId is required for decompose command'); const decompositionId = atomServer.startDecomposition(atomId); result = { status: 'success', command: 'decompose', decompositionId, message: `Started decomposition of atom ${atomId}` }; break; case 'complete_decomposition': const decompId = params.decompositionId as string; if (!decompId) throw new Error('decompositionId is required for complete_decomposition command'); const completed = atomServer.completeDecomposition(decompId); result = { status: 'success', command: 'complete_decomposition', completed, message: `Completed decomposition ${decompId}` }; break; case 'termination_status': const status = atomServer.getTerminationStatus(); result = { status: 'success', command: 'termination_status', ...status }; break; case 'best_conclusion': const bestConclusion = atomServer.getBestConclusion(); result = { status: 'success', command: 'best_conclusion', conclusion: bestConclusion ? { atomId: bestConclusion.atomId, content: bestConclusion.content, confidence: bestConclusion.confidence } : null }; break; case 'set_max_depth': const maxDepth = params.maxDepth as number; if (typeof maxDepth !== 'number' || maxDepth <= 0) throw new Error('maxDepth must be a positive number'); atomServer.maxDepth = maxDepth; result = { status: 'success', command: 'set_max_depth', maxDepth, message: `Maximum depth set to ${maxDepth}` }; break; } return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ status: 'error', error: error instanceof Error ? error.message : String(error) }, null, 2) }], isError: true }; } }
- src/index.ts:713-753 (schema)Tool definition and input schema for 'atomcommands', specifying available commands and parameters.const ATOM_COMMANDS_TOOL: Tool = { name: "atomcommands", description: `A command tool to control the decomposition-contraction mechanism and automatic termination of Atom of Thoughts. Use this tool to access advanced features of AoT: 1. Decomposition (decompose): Decompose a specified atom into smaller sub-atoms 2. Complete decomposition (complete_decomposition): Complete an ongoing decomposition process 3. Check termination status (termination_status): Check the termination status of the current AoT process 4. Get best conclusion (best_conclusion): Get the verified conclusion with the highest confidence 5. Change settings (set_max_depth): Change the maximum depth limit Command descriptions: - command: Command to execute (decompose, complete_decomposition, termination_status, best_conclusion, set_max_depth) - atomId: Atom ID to use with the command (only required for decompose command) - decompositionId: ID of the decomposition process (only required for complete_decomposition command) - maxDepth: Maximum depth value to set (only required for set_max_depth command)`, inputSchema: { type: "object", properties: { command: { type: "string", enum: ["decompose", "complete_decomposition", "termination_status", "best_conclusion", "set_max_depth"], description: "Command to execute" }, atomId: { type: "string", description: "Atom ID to use with the command" }, decompositionId: { type: "string", description: "ID of the decomposition process to complete" }, maxDepth: { type: "number", description: "Maximum depth value to set" } }, required: ["command"] } };
- src/index.ts:771-773 (registration)Registration of the 'atomcommands' tool (as ATOM_COMMANDS_TOOL) in the server's listTools response.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [AOT_TOOL, AOT_LIGHT_TOOL, ATOM_COMMANDS_TOOL], }));