Skip to content

mcp

2 posts with the tag “mcp”

What agents do with coverage output

An agent that receives free-form shell output will invent next steps. coverctl returns bounded JSON: passed, summary, domain rows, and on rejection a stable error_code plus remediation.

That boundary does two jobs:

  1. Actionability — the agent knows whether to write tests, lower ambition, or stop.
  2. Safety — dangerous runner flags (--rootdir, --require, …) are rejected before they reach a toolchain.

Read the contract: Rejection schema and Threat model.

Rejection schemas beat prompt hope

Prompt injection against coding agents is not theoretical. If an MCP tool forwards arbitrary flags to pytest or node, a hostile prompt can turn coverage into code execution.

coverctl’s answer is boring and effective: sanitize inputs, reject known-dangerous shapes with stable error codes, and document the schema so agents (and humans) can recover.

Details: Rejection schema. Eval corpus under internal/eval/scenarios/ gates every PR on this boundary.