Skip to main content
Glama
huaqing0
by huaqing0

clash.config.apply_transaction

Apply validated workspace config changes to the persistent config file, with automatic rollback on failure. Requires explicit confirmation.

Instructions

Apply a validated workspace's changes to the persistent config file. Creates a snapshot, writes the file, attempts Mihomo reload, runs health checks, and auto-rolls back on failure. Light confirmation required (confirmed=true).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmedYesMust be true to proceed with persistent modification
workspaceIdYesWorkspace ID from create_workspace (must be VALIDATED)
Behavior5/5

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

Discloses the entire sequence: snapshot creation, file writing, reload attempt, health checks, and automatic rollback on failure. No contradictions with missing annotations.

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?

Single sentence that front-loads the main action and efficiently lists all steps without fluff.

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

Completeness5/5

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

Covers all major aspects of the apply transaction—snapshot, write, reload, health checks, rollback—despite no output schema.

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

Parameters4/5

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

Adds meaningful context beyond the schema: confirmed must be true, workspaceId must come from create_workspace and be validated.

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?

Clearly states it applies a validated workspace's changes to the persistent config file, distinguishing it from sibling tools like preview_change, validate_change, and rollback by describing the full apply action.

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?

Explicitly mentions that light confirmation is required (confirmed=true) and that the workspace must be validated, but could be more explicit about prerequisite steps like validate_change.

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/huaqing0/clash-control-mcp'

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