Skip to main content
Glama
vjrivmon

Smart Agent Workflow MCP

by vjrivmon

cleanup_worktree

Merge a worktree branch into main and remove it after tests and build pass. Use force to bypass validation only when necessary.

Instructions

Merges worktree to main and removes it. REQUIRES tests and build to pass first! Run run_e2e_tests and verify_build before calling this. Use force=true to bypass (NOT recommended).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNoForce cleanup even if tests failed. WARNING: This bypasses the testing gate!
worktree_pathYesPath to worktree
commit_messageNoCustom commit message for the merge. If not provided, uses default message.
Behavior4/5

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

With no annotations, the description bears full responsibility for behavioral disclosure. It warns that the operation merges and removes the worktree, establishes a testing gate, and cautions against force bypass. However, it doesn't describe failure behavior or whether the merge is a fast-forward or creates a commit.

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 three sentences with no fluff: purpose, prerequisites, and force warning. It is front-loaded and each sentence adds critical information.

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?

For a destructive tool with three parameters and no output schema, the description covers the essential usage context: what it does, what must happen first, and the safety valve. Minor gaps like failure handling don't undermine its completeness.

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 all three parameters (force, worktree_path, commit_message) already have descriptions. The description adds a caution about force=true, but this duplicates the schema's warning. No additional parameter context is provided.

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 opens with a specific action: 'Merges worktree to main and removes it.' This clearly defines the tool's function and differentiates it from siblings like abort_worktree, which cancels instead of merging.

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?

It explicitly states the prerequisite: 'REQUIRES tests and build to pass first! Run run_e2e_tests and verify_build before calling this.' This tells the agent exactly which sibling tools to run beforehand, and the warning 'Use force=true to bypass (NOT recommended)' provides a clear when-not scenario.

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/vjrivmon/smart-agent-workflow-mcp'

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