Not loaded · from cap-evolve
Optimizes how an agent perceives and uses tools from an external MCP server by editing tool descriptions, parameter docs, and tool curation. Use when an agent mis-selects tools or fills arguments wrong.
Claude Code won't load this skill
It ships in cap-evolve at skills/, but Claude Code only loads skills/<name>/SKILL.md and folders listed under skills in plugin.json. Installing the plugin doesn't add it.
Tools served over the Model Context Protocol
come from a server the agent does not own. The server defines each tool's
name, description, and inputSchema and implements the handler; the
host/client discovers them via tools/list, chooses which to present to the
model, and invokes them via tools/call. So an optimizer here can change how
the agent perceives and is offered those tools, and nothing else.
If the fix needs a tool's types, required fields, or behavior to change, this
capability has been outgrown: negotiate the change with the server owner, or move
the logic into an agent-owned tool and optimize that with the tools capability
instead.
| Edit | Owner | Allowed here |
|---|---|---|
tool description, per-parameter description, in-description examples | client presentation | yes |
which of the server's tools the model sees (add / remove) | client/host curation | yes |
the wire inputSchema — type, required, enum, maximum, properties (schema) | server | no |
the handler implementation (code) | server | no |
a new tool that runs server-side logic (compose) | server | no |
The reason is not politeness: a candidate carrying a schema or handler edit is
invalid against the real server. It cannot be deployed, it will fail at
tools/call, and the run still pays full rollout cost to score it. The safe
levers below are the whole edit space.
The policy checks the edit's LABEL, not its effect — so stay inside the
boundary deliberately. apply() refuses any edit whose kind is outside the
policy and reports the refusal, so a {"kind": "schema"} or {"kind": "code"}
edit comes back as a visible refusal rather than a silent no-op. But two allowed
kinds can carry a forbidden change through:
params value is shallow-merged into parameters, so a value containing
properties, type, required, or enum rewrites the wire schema and is
not refused. Write params values that touch only
properties.<field>.description.add value is appended verbatim, so a code key on it lands unrefused.
add means expose a tool the server already serves; never invent one.validate() will not catch either — it checks well-formedness only (see
"Artifact + handlers"), and reports ok: true on a schema-rewritten artifact.
Nothing downstream re-checks the boundary, so the discipline is yours.
The effective policy is policy.json in the capability dir (not
inputs/policy.json) — that is the path cap_evolve.tool_surface.load_policy
reads — else the restricted default above. If an MCP client genuinely supports
client-side schema overrides, widen it deliberately and record why.
type.get_record(record_id="A-1042").add / remove) — hide overlapping or legacy
tools so the needed ones stand out; add a served tool the host isn't
surfacing. MCP servers may also change their own list at runtime and emit
notifications/tools/list_changed; add/remove here is your curation of
what the model sees, never a change to the server.Re-describe a terse server tool. The server ships "description": "kb search",
so the model cannot tell when it applies.
- "description": "kb search"
+ "description": "Search the internal knowledge base and return matching article
+ snippets with their URLs. Use when the user asks a how-to or policy question
+ that is likely documented. Returns at most 10 hits; refine the query if empty."
Pin a parameter's format without touching the schema. The schema says
{"limit": {"type": "integer"}} and the model sends 1000, so the call fails.
"parameters": { "type": "object", "properties": {
- "limit": { "type": "integer" }
+ "limit": { "type": "integer", "description": "Max hits to return (server caps at 10)." }
} }
Only the field's description is added. Changing its type or adding maximum
would be a schema edit — forbidden here, and (per the boundary section) not
refused for you.
Trim the exposed set. Hide rarely-correct, easily-confused tools so the ones the agent needs stand out:
[ { "tool": "legacy_export_v1", "kind": "remove" },
{ "tool": "legacy_export_v2", "kind": "remove" },
{ "tool": "debug_dump", "kind": "remove" } ]
description the model reads and the user never sees, or
slip in tools via list_changed. Review every description before exposing it.tools).MCP surfaces a tool-execution error as a normal result with isError: true
and an actionable message, which the host feeds back to the model so it retries
with fixed arguments; a protocol error is a JSON-RPC failure the model cannot
act on. When re-describing is the only lever, document the failure mode in the
description so the model self-corrects into the recoverable path.
tools.json — the exposed MCP tool defs {name, description, parameters, examples}. scripts/abstract.py sets this capability's restricted policy and
delegates to cap_evolve.tool_surface:
materialize(dir) — flatten to named text components for a text optimizer.apply(dir, edits) — applies edits whose kind is in the policy, returns
{changed, refused}.validate(dir) — well-formedness only: non-empty artifact, name present, no
duplicate names, non-empty descriptions, parameters is an object. It does
not check the edit policy.is_empty(dir) — whether the artifact is still an empty seed.python scripts/check.py
python scripts/run.py --path <capability_dir>
references/concepts.md — the MCP client/server model,
the Tool object's fields quoted from the 2025-06-18 spec, why the policy is
restricted, the four behavior-hint annotations and why they are untrusted,
human-in-the-loop on sensitive calls, and the tool-poisoning / shadowing /
list_changed attack surface, with cited sources. Load before the first edit
on a server you don't control, or when you need the spec citation for what the
server owns.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub skillberry-ai/cap-evolve --plugin cap-evolve22 skills in this plugin
/agent-optimizeFree-form optimization algorithm for agent orchestration mode: the conversational agent owns the whole search — reading a digest, proposing big coherent capability edits against failure-cluster hypotheses, probing only missing cells, promoting or pruning on a posterior, merging complementary branches, and sealing test once. Use when orchestration_mode is agent and algorithm_skill is agent-optimize. For a deterministic loop use hill-climb, gepa or skillopt instead./baselineEstablish the starting point. Use after implement-and-check and before any algorithm. Creates the run directory, freezes the seeded train/val/test split (written once), scores the unmodified seed capability on val, and records it as the candidate every algorithm must beat. Reports the remaining headroom so a saturated seed stops the run before it spends budget./blackboxThe Skillberry proxy intervention — put the optimized capability in the Skillberry Store and let the Skillberry Proxy-Agent (SPA) inject it into the agent's LLM calls, so the benchmark never sees skill files. Use when a capevolve.yaml sets `intervention: blackbox`, or when you need to provision, start, deploy to, stop or clean that stack./diagnoseExtract the learning signal from execution traces — the textual analogue of a gradient. Use between evaluation and proposing edits. Reads a candidate's rollouts and traces, separates good signals to keep from bad signals to fix, builds a reflective dataset (per failing task — Inputs, Generated Outputs, Feedback) and clusters the failures by a (failure-site, violated-expectation) signature, ranked by the score each cluster can recover, so the optimizer knows what to change and why./evaluateScore a candidate on a split with honest, variance-aware evaluation. Use whenever you need a number for a candidate (the algorithm calls it internally; you can also call it directly to inspect). Runs the target via the adapter for each task, scores each rollout, aggregates mean + standard error, and reports pass^k when trials > 1. Never touches the test split (that is finalize's sealed job)./evographDeprecated agent-mode algorithm (evo-graph port): a weakness-graph search that dispatched one solver agent per failure cluster and reverted a whole round on regression. Do not start new runs with it — its per-weakness fan-out is already `agent-optimize`'s sibling fan-out, done behind the honest val significance gate that evograph never applied, and everything else it did (failure clustering, rejected-edit memory, budget-aware fan-out, free-text stop condition) lives in `agent-optimize` + `phases/diagnose`. Use when reading or repairing an existing evograph run dir, or when writing the run-dir `wiki/` format the dashboard's Weakness-graph tab reads — and to see what to select instead: `agent-optimize` for agent-mode search, `hill-climb`, `gepa`, or `skillopt` for a deterministic loop.Other plugins' skills for the same job