Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
save_planA

Save an execution plan — ChatGPT writes the plan, PatchWarden stores it for local agent execution. Supports plan_ref to load a plan file already placed inside .patchwarden/plans.

get_planB

Read a saved plan by its plan_id.

health_checkA

Check MCP catalog consistency, watcher freshness/supervisor state, workspace readiness, and configured agents. Agent availability is executable-only unless an explicit provider probe is requested. Use detail=self_diagnostic for expanded read-only evidence.

list_agentsA

List agents from the active runtime config, verify executable and model-argument wiring, and report the config path used by this process. provider_status remains not_checked because this read-only check does not contact a model provider or test account balance.

create_taskA

Create a repo-scoped task from exactly one source. For ChatGPT, prefer the guarded inspect_only, feature_small, or fix_tests template when it fits. A stale watcher preserves the task but returns execution_blocked and directs the client to health_check; otherwise call wait_for_task until terminal. Use execution_mode=assess_only to pre-assess risk and get an assessment_id without creating a task; then invoke the returned next_tool_call using only execution_mode=execute and the full assessment_id.

run_task_loopA

Start a guarded PatchWarden task loop by composing create_task, wait_for_task, safe summaries, and audit_task. By default it returns request_id, lineage_id, and the created main task immediately while Core continues the loop in the background; follow with wait_for_task and get_task_lineage. It does not bypass the watcher, command allow-list, workspace confinement, or confirmation boundaries.

recommend_agent_for_taskA

Return a bounded read-only agent routing recommendation for a repo-scoped task. Does not start an agent, create a task, or read logs.

get_task_lineageA

Read a bounded safe summary for a run_task_loop lineage. Does not return full logs, diffs, stdout, stderr, or markdown artifacts.

export_task_evidence_packA

Export a bounded evidence pack for a run_task_loop lineage. Writes evidence.json and EVIDENCE.md without stdout, stderr, full logs, full diff, or sensitive file contents.

get_project_policyA

Read the bounded effective .patchwarden/project-policy.json summary for a repository. Missing policy returns safe defaults. Project policy never expands PatchWarden command allow-lists, workspace confinement, sensitive-path blocking, or watcher/audit boundaries.

get_task_statusB

Check task status, execution phase, watcher health, pending reason, current command, timeout, and change evidence.

get_resultA

Read result.md, or return structured availability and watcher evidence while the task is not terminal.

get_result_jsonB

Read the structured result.json for deterministic task acceptance.

get_diffB

Read task diff evidence, or return structured availability and watcher evidence while it is not ready.

get_test_logC

Read test.log, or return structured availability and watcher evidence while it is not ready.

list_workspaceA

List files and directories within the workspace (sensitive files excluded).

read_workspace_fileA

Read a file within the workspace. Sensitive files (secrets, keys, tokens) are blocked. In Direct mode (with session_id), reads are scoped to the session's repo_path and return sha256.

list_tasksB

List recent tasks with status/repo/active/history filters plus watcher state and computed pending reasons. Archived history is excluded by default.

cancel_taskA

Request graceful cancellation. The runner that owns the child process performs termination; the MCP server never kills a PID read from task files.

kill_taskA

Request immediate termination of a pending or running task. The runner validates and kills only the child process it owns.

retry_taskB

Create a new task with the same plan, agent, repo_path, and test_command as an existing task. The original task is unchanged.

get_task_stdout_tailA

Read the last N lines of agent stdout/stderr. Reads from real-time stdout.log/stderr.log during execution, falls back to result.md after completion. Works on pending, running, and completed tasks. Default 80 lines.

get_task_log_tailA

Read the last N lines of a task log file (stdout/stderr/test/verify) with automatic secret redaction. Default 80 lines, max 200. Always returns tail only — never the full file. Use this instead of read_workspace_file to avoid triggering platform content filters on log output.

get_task_progressA

Read progress.md for task phases and the most recent heartbeat/current command.

wait_for_taskB

Long-poll a task for up to 30 seconds. If continuation_required=true, call wait_for_task again immediately and do not finish the assistant turn. Terminal responses include get_task_summary acceptance evidence.

get_task_summaryA

Return structured acceptance evidence. Use view=compact first for bounded counts and risk excerpts; use standard only when full changed-file and log-tail detail is required.

audit_taskA

Independently audit a task's outputs. Verifies status, result.md, test.log, git.diff, repo_path consistency, cross-references agent claims with package.json scripts, and flags unverified release/publish claims. Evidence-backed failures, possible heuristic false positives, and manual-verification items are returned separately. Writes independent-review.md to the task directory.

safe_statusA

Return minimal task lifecycle status without exposing diff, log content, file contents, or sensitive paths. Use this when only task state is needed and content-bearing tools may be blocked by upper-layer security.

safe_resultA

Return a low-noise structured task result summary without full logs, markdown, or diff content.

safe_auditA

Run audit_task and return only bounded structured audit evidence without full review markdown.

safe_test_summaryB

Return a compact verification summary for a task without stdout/stderr or test log content.

safe_diff_summaryA

Return changed-file counts and bounded path metadata without returning diff content.

diagnose_taskA

v0.7.0: Diagnose a running or collecting_artifacts task using multi-signal evidence (heartbeat age, log freshness, child PID liveness, watcher ownership, artifact presence). Returns a conservative diagnosis (active_running, stale_running, possibly_stale_running, orphaned_running, artifact_collection_stuck, done_candidate, unknown, terminal) with confidence level and safe_actions. Never relies on a single signal; refuses to call PID-alive tasks 'active' when other signals are stale (PID reuse protection). Read-only — does not modify task state.

reconcile_tasksA

v0.7.0: Scan stale running/collecting_artifacts tasks and either report or safely fix them. report_only (default) returns a diagnosis report without modifying state. safe_fix additionally writes high-confidence status transitions (failed_stale/orphaned/done_by_agent) atomically with backup (status.json.bak), audit fields, and an appended reconcile.log. Never touches tasks still owned by an active watcher; never applies medium/low confidence fixes.

discover_toolsA

v0.7.1: Search candidate tools by natural-language query (Chinese or English). Returns compressed summaries with risk level and schema digest. Filters by profile/mode/riskCeiling. High-risk tools (command/release/credential_sensitive) are hidden by default unless includeHighRisk=true. Read-only — never invokes tools.

explain_toolA

v0.7.1: Expand a single tool's metadata — title, summary, risk level, tags, aliases, profiles, modes, schema digest, and optionally the full inputSchema. Use after discover_tools to understand a specific tool before calling it. Read-only.

invoke_discovered_toolA

v0.8.1: Invoke a previously discovered tool using a discoveryToken. The token must be obtained from discover_tools first. Enforces 10 security checks: token validity, toolName match, profile allowance, risk ceiling, sensitive path guard, assessment requirement, command whitelist, release confirmation, credential block, and invocation logging. Cannot call itself recursively.

create_goalA

v0.8.0: Create a Goal Session for managing a multi-task objective with subgoal dependencies. Generates a structured directory under .patchwarden/goals/{goal_id}/ with GOAL.md, GOALS.md, and goal_status.json. Use list_goals to enumerate existing goals and read_goal to inspect details.

list_goalsA

v0.8.0: List all Goal Sessions with completion summaries. Returns goal_id, title, status, subgoal counts, and last update time. Sorted by updated_at descending.

read_goalA

v0.8.0: Read full Goal Session details including GOAL.md content, goal_status.json, and all subgoals with dependency info. Use after list_goals to inspect a specific goal.

create_subgoal_taskA

v0.8.0: Create a subgoal within a Goal Session and immediately launch an associated task. Atomically: addSubgoal → create_task → linkTask → mark subgoal running. The subgoal depends_on other subgoals (by id) which must be accepted before suggest_next_subgoal returns it.

accept_subgoalA

Accept a subgoal after all associated tasks are accepted by audit_task. Supports both legacy status=accepted and done_by_agent with acceptance_status=accepted.

reject_subgoalA

Reject a subgoal with a reason. Allowed from any non-terminal status (ready/queued/running/done_by_agent/needs_fix). Records rejected_reason in goal_status.json.

suggest_next_subgoalA

v0.8.0: Suggest the next executable subgoal based on the dependency graph. Returns a ready subgoal whose dependencies are all accepted. If none ready, returns blocked_by list. Use to drive goal-directed task sequencing.

summarize_goal_progressB

Summarize goal completion: counts by status (accepted/rejected/queued/running/ready/needs_fix/done_by_agent), completion_rate, blocked_subgoals, and actionable risks.

export_handoffA

v0.8.0: Export a handoff.md document for transferring a Goal Session to a new conversation. Includes current goal, completed/pending subgoals, recent diff/test results, blockers, next steps, and risks. Writes to .patchwarden/goals/{goal_id}/handoff.md.

export_goal_reportB

Export a structured final report for a Goal session, aggregating subgoal completion, task evidence, and risk summary.

import_speckit_tasksB

Import Spec Kit tasks into a Goal session as subgoals, mapping task files to scope hints and acceptance criteria.

check_release_gateA

v1.0.0: Verify release readiness across five sequential stages: local_ready → packed_ready → published_verified → github_release_verified → ci_verified. Remote stages (published/github/ci) query npm registry and GitHub API via node:https read-only GET; network errors return 'not_checked' (not 'failed'). Never claims release complete before published_verified passes. Does not execute shell commands for remote queries.

release_checkA

v1.3.0: Run a bounded release readiness check by wrapping the existing release gate. Local stages use existing guarded release-gate commands; remote stages are read-only. Does not publish, push, tag, or create a GitHub Release.

release_prepareA

v1.3.0: Run project-policy release preparation commands only when each command is already accepted by the existing PatchWarden command guard. Returns command status only, never stdout/stderr. Does not publish, push, tag, or create a GitHub Release.

release_verifyA

v1.3.0: Verify npm/GitHub/CI release facts with read-only HTTPS requests. Does not run local shell commands and does not publish, push, tag, or create a GitHub Release.

release_cleanupA

v1.3.0: Clean up release artifacts using project-policy auto_cleanup rules. Defaults to dry_run=true. Non-dry-run cleanup only removes low-risk ignored/untracked artifacts under repo_path and writes an audit summary.

merge_worktreeA

v1.0.0: Merge an isolated git worktree's changes back into the main workspace. Use after a subgoal task (created with isolate_worktree=true) is accepted. Updates worktree_status.json to status='merged'. Merge failures do NOT delete the worktree (preserved for manual inspection).

discard_worktreeA

v1.0.0: Discard an isolated git worktree safely. Removes the worktree (git worktree remove --force), deletes its branch, and archives status as 'discarded'. Use when a subgoal is rejected or abandoned. All paths pass guardWorkspacePath + sensitiveGuard.

create_direct_sessionB

Create a Direct editing session for ChatGPT to apply patches directly. Requires enableDirectProfile: true in config.

search_workspaceA

Search file contents (grep-like) within a Direct session's repo_path. Skips .git, node_modules, dist, release, and sensitive files.

apply_patchA

Apply JSON patch operations to a file within a Direct session's repo_path. Validates expected_sha256 before applying. Supports replace_exact, insert_before, insert_after, replace_whole_file.

create_fileA

Create a new bounded UTF-8 text file inside an active Direct session. The target and its parent are revalidated, sensitive content is blocked, and existing targets are never overwritten.

mkdirA

Create one new directory level inside an active Direct session. Parent directories must already exist; linked, sensitive, internal, dependency, release, and build-output paths remain blocked.

move_fileA

Move one bounded regular text file within a Direct session. Requires the current source SHA-256 and never overwrites the target.

delete_fileA

Delete one bounded regular text file inside a Direct session. Requires the current SHA-256 and confirm_delete=true; directories and recursive deletion are unsupported.

request_direct_reviewA

Request a policy-bound review for the exact Direct operation to be performed. In enforce mode, pass the returned review_id unchanged to the matching operation before it expires.

run_verificationB

Run a whitelisted verification command within a Direct session. Command must be in the Direct allowlist.

run_direct_verification_bundleA

Run multiple allowlisted Direct verification commands sequentially and return only bounded structured status. Omits stdout/stderr tails and log content.

finalize_direct_sessionA

Finalize a Direct session: capture after snapshot, generate diff/summary/change artifacts, mark session as finalized. Must be called before audit_session.

audit_sessionA

Independently audit a Direct session's changes. Performs 16 deterministic checks and returns pass/warn/fail decision. Requires session to be finalized first.

safe_direct_summaryA

Return a low-noise Direct session summary without diff content or verification stdout/stderr tails.

safe_finalize_direct_sessionA

Finalize a Direct session and return only bounded structured evidence, omitting diff and verification log content.

safe_audit_direct_sessionA

Audit a Direct session and return only bounded structured evidence without verification stdout/stderr tails.

sync_fileA

Copy a file from source to target within the same Direct session repo. This legacy operation is outside the first Direct review MVP and is disabled when directReview.mode=enforce. Both paths must be inside the session repo_path.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/jiezeng2004-design/PatchWarden'

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