Clean-Context

v1.2.0
io.github.ElAdagioDeJP/clean-context Checked 2 days ago Published 2 days ago

Multi-agent context control, handoff inheritance, and herdr worker management for MCP clients.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_context_status

Reads the current agent/session statusline telemetry and compares used context % against the configured limit for the agent's role (orchestrator/solo vs worker).

ParameterTypeDescription
clientstring
cwdstring
rolestring
sessionIdstring

get_config

Returns the active Clean-Context configuration (merged global + optional project override) and config file paths.

ParameterTypeDescription
cwdstring

update_config

Updates Clean-Context configuration (maxContextPercent, models, handoffDir) globally or for the current project.

ParameterTypeDescription
cwdstring
handoffDirstring
orchestratorMaxContextPercentnumber
orchestratorModelstring
scopestring
workerKindstring
workerMaxContextPercentnumber
workerModelstring
workerModelFlagstring

herdr_spawn

Spawns a worker in a split Herdr pane using the configured worker.model and worker.kind, injecting CLEAN_CONTEXT_ROLE=worker.

ParameterTypeDescription
name *string
cwdstring
directionstring
kindstring
modelstring
paneIdstring
promptstring
timeoutMsinteger
waitboolean

herdr_status

Lists live Herdr panes, agents, and tracked Clean-Context workers.

ParameterTypeDescription
namestring
workspaceIdstring

herdr_stop

Cleanly stops a worker by closing its Herdr pane and removing it from tracked workers.

ParameterTypeDescription
namestring
paneIdstring

herdr_cleanup

Detects and closes orphaned, dead, or completed worker panes in Herdr, and prunes stale worker records.

ParameterTypeDescription
dryRunboolean
forceboolean
includeIdleboolean

create_handoff

Generates a structured Markdown handoff file in handoffDir (plus LATEST.md) capturing summary, decisions, files touched, active workers, and the exact next step.

ParameterTypeDescription
nextStep *string
summary *string
activeWorkersarray
contextUsedPercentnumber
cwdstring
decisionsarray
filesTouchedarray
notesstring
rolestring

read_handoff

Reads the latest handoff Markdown file (or a specific handoff file) from handoffDir.

ParameterTypeDescription
cwdstring
fileNamestring